I'm currently working through a problem to show that there is no continuous injective function from the 2-sphere ($S^2$) to the torus ($T^2$). I saw a similar question posted here (Is there a continuous function from the torus to the sphere? or from sphere to the torus?) but I'm not yet acquainted with second homotopy groups. I suppose a contradiction can be reached somehow, but I'm not sure how to formulate it:
Suppose there exists such a continuous and injective function $f:S^2\rightarrow T^2$. $S^2$ is compact, so $f(S^2)\subset T^2$ must also be compact. $S^2$ is also simply connected while $\pi_1(T^2)$ is $\mathbb{Z}\times\mathbb{Z}$, which I believe may come into play. I don't know where the injective property comes in however. Any guidance or hints would be appreciated, thanks.