Why is the stereographic projection a map from $S^2\to\mathbb{R}^2$? How can I understand that the stereographic projection $$X=\cot\left(\frac{\theta}{2}\right)\cos\phi,\hspace{0.5cm}Y=\cot\left(\frac{\theta}{2}\right)\sin\phi\tag{1}$$ is a map from the surface of a unit sphere to a plane? For (1) to be map from $S^2\to \mathbb{R}^2$, shouldn't $X,Y$ vary from $-\infty$ to $+\infty$ for the allowed ranges of $\theta,\phi$?
Does it suffice to see that $X,Y$ are real? I think it's not because $\theta,\phi$ themselves were real. Then why is this a map from $S^2\to \mathbb{R}^2$ and not from $S^2\to \mathcal{M}$ where $\mathcal{M}$ is some other 2-dimensional manifold?

Any point in $\mathbf R^2\smallsetminus\{0\}$ has polar coordinates $(r\cos\phi, r\sin\phi), \; r>0$ . So all you have to prove is that any $r>0$ can be written as $\cot\Bigl(\dfrac\theta2\Bigr)$ for some $\theta$. This is obvious, just taking a look at the curve $y=\cot x$.
