Formula for the intersection of a sphere with regards to stereographic projection So I have this question for an assignment and am just completely lost.
Let $S^n$ be the unit sphere with centre at $0$ in the space $R^{n+1}$. Let $N=(0,...,0,1)$ in such a space. Define the stereographic projection $p:S^n\setminus\{N\} \rightarrow R^n = R^n \times \{0\} \subset R^{n+1}$.
For each x in the sphere, the point $p(x)$ is the intersection of the line and the point $x,$ with the hyperplane $x_{n+1} =0.$
I need to find an explicit formula for such $p(x)$ and also its inverse, and then prove $p$ is a homeomorphism. I genuinely have no clue where to start.
From wikipedia and some videos, I have found some equations for $R^3$ but the $n+1$ has me completely lost. How do I derive such an equation, both in $R^3$ and particularly for any $R^{n+1}$?
 A: The Power of a Point

The Power of the point $p$ with respect to the unit circle centered at $O$ is
$$
(p-x)\cdot(p-N)=|p|^2-1\tag1
$$
The Pythagorean Theorem says
$$
|p-N|^2=|p|^2+1\tag2
$$
Therefore,
$$
\begin{align}
(x-N)\cdot(p-N)
&=\left((p-N)-(p-x)\right)\cdot(p-N)\\
&=|p-N|^2-(p-x)\cdot(p-N)\\
&=2\vphantom{N^2}\tag3
\end{align}
$$
Since $x-N\parallel p-N$ we get
$$
p-N=\frac2{|x-N|^2}(x-N)\tag4
$$
and
$$
x-N=\frac2{|p-N|^2}(p-N)\tag5
$$
Equations $(4)$ and $(5)$ give formulas to compute $p$ given $x$ and vice-versa.
A: The line $\mathcal L_x$ through $N$ and $x \in S^n \setminus \{N\}$ can be parameterized by
$$l_x(t) = N + t(x -N) .$$
The coordinate functions of $l_x$ are
$$l^i_x(t) = \begin{cases} tx_i & i = 1,\ldots,n \\ 1 + t(x_{n+1} -1)  & i = n+1 \end{cases}$$
$\mathcal L_x$ intersects $\mathbb R^n \times \{0\}$ in the point $p(x)$. Thus we have to determine $t_0$ such that $l^{n+1}_x(t_0) = 1 + t_0(x_{n+1}-1) = 0$. We get
$$t_0 = \dfrac{1}{1-x_{n+1}}$$
and therefore
$$p(x) = l_x(t_0) = \left(\dfrac{x_1}{1-x_{n+1}},\ldots,\dfrac{x_n}{1-x_{n+1}},0\right) .$$
The inverse of $p$ can be determined as follows. Given $u = (u_1,\ldots,u_n,0) \in \mathbb R^n \times \{0\}$, we want to find $x \in S^n$ such that $p(x) = u$, i.e.
$$(\dfrac{x_1}{1-x_{n+1}},\ldots,\dfrac{x_n}{1-x_{n+1}}) = (u_1,\ldots,u_n).$$
This implies
$$\lVert u \rVert^2 = \sum_{i=1}^n u_i^2 = \dfrac{1}{(1-x_{n+1})^2}\sum_{i=1}^n x_i^2 .$$
We require $x \in S^n$, i.e. $\sum_{i=1}^{n+1} x_i^2 = 1$. Therefore
$$\lVert u \rVert^2 = \dfrac{1}{(1-x_{n+1})^2}(1-x_{n+1}^2) =  \dfrac{1+x_{n+1}}{1-x_{n+1}}$$
which gives
$$x_{n+1} = \dfrac{\lVert u \rVert^2 -1}{\lVert u \rVert^2 +1} $$
and
$$x_i = \dfrac{2u_i}{\lVert u \rVert^2 +1}, i =1, \ldots, n. $$
Thus
$$p^{-1}(u) = \left(\dfrac{2u_1}{\lVert u \rVert^2 +1}, \ldots, \dfrac{2u_n}{\lVert u \rVert^2 +1},\dfrac{\lVert u \rVert^2 -1}{\lVert u \rVert^2 +1}\right) .$$
This approach was purely formal. Alternatively we can do it geometrically. The line $\mathcal L_x$ through $N$ and $x$ is also a line through $N$ and $u = p(x)$ which can be parameterized by
$$g_x(t) = N + t(u -N) .$$
The coordinate functions of $g_x$ are
$$g^i_x(t) = \begin{cases} tu_i & i = 1,\ldots,n \\ 1 + t(u_{n+1} -1) = 1 -t  & i = n+1 \end{cases}$$
It is clear that $\mathcal L_x$ intersects $S^n$ in the two points $N$ and $x$. Thus we have to determine $t$ such that
$$1 = \lVert g_x(t) \rVert^2 = \sum_{i=1}^n t^2u_i^2 + (1-t)^2 =t^2\lVert u \rVert^2 + (1-t)^2. $$
This can be simplified to
$$0 = ((\lVert u \rVert^2 +1)t -2 )t .$$
Solutions are $t_0=0$ (which gives $g_x(0) = N$) and
$$t_1 = \dfrac{2}{\lVert u \rVert^2 + 1} .$$
We obtain
$$x = g_x(t_1) = \left(\dfrac{2u_1}{\lVert u \rVert^2 +1}, \ldots, \dfrac{2u_n}{\lVert u \rVert^2 +1},\dfrac{\lVert u \rVert^2 -1}{\lVert u \rVert^2 +1}\right) .$$
