I'm trying to prove algebraically that for the stereographic projection $p:S^2\to \mathbb{R}^2\cup\{\infty\}$ $$ p(x,y,z)=\left( \dfrac{x}{1-z},\dfrac{y}{1-z}\right) $$ $$ p^{-1}(a,b)=\left( \dfrac{2a}{a^2+b^2+1},\dfrac{2b}{a^2+b^2+1},\dfrac{a^2+b^2-1}{a^2+b^2+1}\right) $$ circles $T\subset\mathbb{R}^2$ maps to circles $S\subset S^2$, but i am not sure if i am doing something wrong.
Proof
I'm starting with a circle: $A(a^2+b^2)+Ba+Cb+D=0$ in $\mathbb{R}^2\cup\{\infty\}$.
Then by the map $p$ we have:
$$
A\dfrac{x^2+y^2}{(1-z)^2} +B\dfrac{x}{1-z}+C\dfrac{y}{1-z}+D=0
$$
but since $x^2+y^2=1-z^2$ we have:
$$
A(1+z)+Bx+Cy+D(1-z)=0
$$
- If $A=0$ then it's a line that maps to a circle passing through $(0,0,1)\in S^2$
- If $A\neq 0$ then it's a circle that maps to a circle not passing through $(0,0,1)\in S^2$
After that i figure that we take its intersection with the sphere $S^2$ and we expect to get the general equation of a circle to finish the proof, but i can't seem to get it done.
Example, if we substitute $z=-\dfrac{Bx+Cy+D+A}{A-D}$ to $x^2+y^2+z^2=1$ after calculations we get $$ (x^2+y^2)(A-D)^2+(Bx+Cy)^2+x(2BD+2AB)+y(2DC+2CA)+(D+A)^2-(A-D)^2=0 $$ but i don't know how to get rid of (Bx+Cy)^2 for it to be a circle.
Am i going the wrong way or am i screwing up the calculations?
I think it might be easier to start with projecting a circle on a sphere to the plane. A circle on the sphere is the intersection of the sphere and a plane $Ax+By+Cz=D$. Hence points $z=a+ib$, due to the stereographic projection, satisfy $$ A\frac{2a}{|z|^2+1}+B\frac{2b}{|z|^2+1}+C\frac{|z|^2-1}{|z|^2+1}=D$$ rewritten as $$(C-D)(a^2+b^2)+2Aa+2Bb-(C+D)=0$$ If $C=D$, we get a straight line "circle through $\infty$". If $C\neq D$, we get an equation of the form at the line "I'm starting with a circle:". As a projection of a circle on the sphere, the locus must be a circle in the plane (neither point nor empty). You can reverse this argument identifying $C-D = A'$, $2A=B'$, $2B = C'$, $-(C+D)=D'$ where primed coefficients refer to the coefficients of the circle you've started with. You may refer to Complex Analysis by Gamelin, section 1.3.