Möbius transformations

T[z_] := I((1+z)/(1-z));
ParametricPlot[{Re[T[r*(E^(I*θ))]],Im[T[r*(E^(I*θ))]]},
{r,0,1},{θ,0,2π}, PlotPoints -> 50,
FrameTicks->False,
Mesh->True,PlotRange -> {{-5,5},{0,3}}]

Mobius transformations have the form

T(z)=((a z+b)/(c z+d)),

where we generally assume that a d-b c≠0.

Visualization

Recall that we visualize a complex function by illustrating its effect on various domains in the complex plane and this is super simple to do using ParametricPlot.  Let’s try it.

T[z_] = I(z+1)/(1-z);
ParametricPlot[{Re[T[x+I*y]],Im[T[x+I*y]]},
{x,-2,2},{y,-2,2}, Mesh->True,
PlotPoints -> 100]

A polar plot.

T[z_] = I(z+1)/(1-z);
ParametricPlot[{Re[T[r*(E^(I*θ))]],Im[T[r*(E^(I*θ))]]},
{r,0,1},{θ,0,2π}, PlotPoints -> 50,
FrameTicks->False,
Mesh->True,PlotRange -> {{-5,5},{0,4}}]

Here's an automorphism of the unit disk; the unit circle is invariant, but the origin is moved.

a = I/2;
λ=(E^(-I π/4));
T[z_] := λ ((a-z)/(1-Conjugate[a]z));
ParametricPlot[{Re[T[r*(E^(I*θ))]],Im[T[r*(E^(I*θ))]]},
{r,0,1},{θ,0,2π}, PlotPoints -> 40,
Mesh->True,PlotRange->{{-2,2},{-2,2}},
BoundaryStyle -> None, Epilog -> {Thick,
Opacity[0.8],Hue[0.67,0.6,0.6],Circle[]}]

I suppose we could try to play with the parameters.

T[a_,b_,c_,d_][z_]:= ((a*z+b)/(c*z+d));
Manipulate[
ParametricPlot[{Re[#],Im[#]}&[T[a,b,c,d][x+I*y]],
{x,-2,2},{y,-2,2}, Mesh->True,ColorFunction->(White&),
PlotRange->{{-2,2},{-2,2}},
RegionFunction->Function[{x,y},x^2+y^2<400]],
{{a,0},-2,2},{{b,1},-2,2},
{{c,1},0.1,2},{{d,0},-2,2}]

Here’s a particularly fun parametric family.

T[φ_,z_]:=((z+z Cos[φ]-Sin[φ])/(1+Cos[φ]+z Sin[φ]));
Manipulate[
ParametricPlot[{Re[T[φ,x+I*y]],Im[T[φ,x+I*y]]},
{x,-2,2},{y,-2,2}, Mesh->True,
PlotRange->{{-2,2},{-2,2}},ColorFunction->(White&),
RegionFunction->Function[{x,y},x^2+y^2<400]],
{φ,0,Pi}]

Note

T[0,z]

and

Limit[T[φ,z],φ->Pi]

Circle inversion

Mobius transformations map circles and/or lines to circles and or lines. That is, the image of a circle under a Mobius transformation is another circle or a line. Similarly, the image of a line under a Mobius transformation is another line or a circle.

In the right metric, we can even think of a line as a circle with infinite radius and this all seems quite natural. For the time being, let’s focus on the statement above.

Why do we care about circle inversion?

Our objective is to understand why Mobius transformations map circles and lines to circles and lines.  The first observation is that any Mobius transformation is a composition of shifts, dilation, rotations, and inversions.  Recall that, if c=0, then

T(z)=(a/d)z+(b/d),

which is clearly a dilation/rotation followed by a shift.  If c≠0, then

T(z)=((b c-a d)/(c^2))(1/(z+d/c))+(a/c).

This is easy enough to check algebraically.

Clear[a,b,c,d,z];
Simplify[((b*c-a*d)/(c^2))(1/(z+d/c))+(a/c)]

Now, since shifts, dilations and rotations preserve circles and lines, it simply remains to show that inversion maps circles and lines to circles and lines. This is further simplified by the fact that inversion breaks up into circle inversion followed by conjugation.  Conjugation is (geometrically) a simple reflection, so we just have to show that circle inversion is a reflection.

z0=11/10+9I/10;
Graphics[{
{Dashed,Circle[{0,0},1]},
{Arrow[{{0,0},{1.2,0}}]},
{PointSize[Large],Point[{Re[#],Im[#]}&/@{z0,1/z0,1/Conjugate[z0]}]},
{Line[{Re[#],Im[#]}&/@{z0,0,1/z0}]},
{Text["(Subscript[z, 0])",{Re[#],Im[#]}&[z0],1.5{-1,-1}],Text["1/(Subscript[z, 0])",{Re[#],Im[#]}&[1/z0],1.5{-1,-1}],
Text["(Subscript[(OverHat[z]), 0])",{Re[#],-Im[#]}&[1/z0],1.5{1,-1}],
Text["O",{0,0},1.5{1,-1}]}
}]

Observation 1

In the figure below, ΔOAB is similar to ΔO(OverHat[B])(OverHat[A]).

angleMarker[{{a1_,a2_},{b1_,b2_},{c1_,c2_}},
r_:0.1, opts___] := Module[{theta1,theta2,size,color},
theta1 = If[c1-b1>0,ArcTan[(c2-b2)/(c1-b1)],
If[(c2-b2)>0,ArcTan[(c2-b2)/(c1-b1)]+Pi,
If[c1-b1<0,ArcTan[(c2-b2)/(c1-b1)]-Pi,-Pi/2]]];
theta2 = If[a1-b1>0,ArcTan[(a2-b2)/(a1-b1)],
If[(a2-b2)>0,ArcTan[(a2-b2)/(a1-b1)]+Pi,
If[a1-b1<0,ArcTan[(a2-b2)/(a1-b1)]-Pi,-Pi/2]]];
color = Color /. {opts} /.{Color->Black};
If[Abs[theta1 - theta2] ≤ Pi, 
{color,{Opacity[0.3],Disk[{b1,b2}, r, Sort[{theta1,theta2}]]},
Circle[{b1,b2}, r, Sort[{theta1,theta2}]]},
If[Abs[N[theta1 - theta2]] > N[Pi], 
{color,{Opacity[0.3],Disk[{b1,b2}, r, Sort[N@{theta1-2Pi,theta2}]]},
Circle[{b1,b2}, r, Sort[N@{theta1-2Pi,theta2}]]}]]];
invert[{x_,y_}]:= {x,y}/((x^2)+(y^2));
a={-0.4,0.25};
b={-0.55,-0.5};
Graphics[{
{Dashed,Circle[{0,0},1]},
{angleMarker[{{0,0},invert[a],invert[b]},0.1, Color->Red],
angleMarker[{{0,0},b,a},0.1, Color->Red],
angleMarker[{{0,0},a,b},0.1, Color->Blue],
angleMarker[{{0,0},invert[b],invert[a]},0.1, Color->Blue],
angleMarker[{b,{0,0},a},0.1, Color->Green]},{PointSize[Large],Point[{{0,0},a,b,invert[a],invert[b]}]},
{Line[{{0,0},invert[a],invert[b],{0,0}}],
Line[{a,b}]},
{Text["A",a,1.5{-1,-1}],Text["(OverHat[A])",invert[a],1.5{-1,-1}],
Text["B",b,1.5{-1,1}],Text["(OverHat[B])",invert[b],1.5{-1,1}],
Text["O",{0,0},-1.5{1,1}]}
}]

This is simply because

|A||(OverHat[A])|=1=|B||(OverHat[B])|

so

((|B|)/(|(OverHat[A])|))=((|A|)/(|(OverHat[B])|))

and the triangles are similar by side angle side.

Observation 2

A point p in the complex plane is on the unit circle iff the triangle below is right.

rightAngleMarker[{a_,b_,c_}, r_:0.1] := 
With[{ua = (a-b)/Sqrt[(a-b).(a-b)], 
uc = (c-b)/Sqrt[(c-b).(c-b)]},
Line[{b+r ua, b + r ua + r uc, b + r uc}]];
SeedRandom[3];
unitCircle = Circle[{0,0},1];
t = Random[];
a = {Cos[Pi t], Sin[Pi t]};
Show[Graphics[{
unitCircle,
rightAngleMarker[{{1,0},a,{-1,0}}, .08],
Line[{{1,0},a,{-1,0},{1,0}}],
PointSize[Large],Point[a],
Text["p",a,1.8{1,-1}],
Text["1",{1,0},1.8{-1,0}],
Text["-1",{-1,0},1.8{1,0}]}],
AspectRatio -> Automatic]

This is actually Proposition 31 from Book III of Euclid’s Elements.  There’s also a lovely little proof using vectors and dot products.

Lines ⟷ Circles

Under circle inversion, a line that misses the origin maps to a circle that contains the origin and vice-versa.  This follows pretty much immediately from our observations and the following picture.

rightAngleMarker[{a_,b_,c_}, r_:0.1] := 
With[{ua = (a-b)/Sqrt[(a-b).(a-b)], 
uc = (c-b)/Sqrt[(c-b).(c-b)]},
Line[{b+r ua, b + r ua + r uc, b + r uc}]];
invert[{x_,y_}]:= {x,y}/((x^2)+(y^2));
a = {0.5,1.2};
p[t_] := a+t*{a[[2]],-a[[1]]};
b=p[-0.7];
Graphics[{
{Dashed,Circle[]},
{rightAngleMarker[{{0,0},a,b}],rightAngleMarker[{{0,0},invert[b],invert[a]}]},
{Line[{p[-5],p[5]}],Line[{invert[a],invert[b]}],
Line[{{0,0},a,b,{0,0}}], Circle[invert[a]/2,Norm[invert[a]]/2]},
{PointSize[Large],Point[{{0,0},a,b,invert[b],invert[a]}]},
Text["a",a,-1.5a],Text["b",b,-1.5a],Text["O",{0,0},{2,2}],
Text["(OverHat[a])",invert[a],{-3,-1}],Text["(OverHat[b])",invert[b],{4,0}]
},
PlotRange->{{-1.1,2},{-0.5,1.8}}]

Circles ⟷ Circles

A circle not containing the origin maps to a circle not containing the origin.

angleMarker[{{a1_,a2_},{b1_,b2_},{c1_,c2_}},
r_:0.1, opts___] := Module[{theta1,theta2,size,color},
theta1 = If[c1-b1>0,ArcTan[(c2-b2)/(c1-b1)],
If[(c2-b2)>0,ArcTan[(c2-b2)/(c1-b1)]+Pi,
If[c1-b1<0,ArcTan[(c2-b2)/(c1-b1)]-Pi,-Pi/2]]];
theta2 = If[a1-b1>0,ArcTan[(a2-b2)/(a1-b1)],
If[(a2-b2)>0,ArcTan[(a2-b2)/(a1-b1)]+Pi,
If[a1-b1<0,ArcTan[(a2-b2)/(a1-b1)]-Pi,-Pi/2]]];
color = Color /. {opts} /.{Color->Black};
If[Abs[theta1 - theta2] ≤ Pi, 
{color,{Opacity[0.3],Disk[{b1,b2}, r, Sort[{theta1,theta2}]]},
Circle[{b1,b2}, r, Sort[{theta1,theta2}]]},
If[Abs[N[theta1 - theta2]] > N[Pi], 
{color,{Opacity[0.3],Disk[{b1,b2}, r, Sort[N@{theta1-2Pi,theta2}]]},
Circle[{b1,b2}, r, Sort[N@{theta1-2Pi,theta2}]]}]]];
rightAngleMarker[{a_,b_,c_}, r_:0.1] := 
With[{ua = (a-b)/Sqrt[(a-b).(a-b)], 
uc = (c-b)/Sqrt[(c-b).(c-b)]},
Line[{b+r ua, b + r ua + r uc, b + r uc}]];
invert[{x_,y_}]:= {x,y}/((x^2)+(y^2));
a = 0.6{Cos[10Degree],Sin[10Degree]};
b=0.9{Cos[10Degree],Sin[10Degree]};
center=(a+b)/2; radius=Norm[b-center];
c=center+radius*{Cos[75Degree],Sin[75Degree]};
centerHat = (invert[a]+invert[b])/2;
radiusHat= Norm[centerHat-invert[a]];
Graphics[{
{Dashed,Circle[]},
{Circle[center,radius], Circle[centerHat,radiusHat]},
{angleMarker[{{0,0},a,c},0.045,Color->Red],
angleMarker[{{0,0},invert[c],invert[a]},0.045,Color->Red],
angleMarker[{a,b,c},0.045,Color->Blue],
angleMarker[{{0,0},invert[c],invert[b]},0.045,Color->Blue]},
{rightAngleMarker[{a,c,b},0.045],rightAngleMarker[invert/@{b,c,a},0.045]},
{Thin,Line[{invert[a],{0,0},invert[c]}]},
{Line[{a,b,c,a}], Line[invert/@{a,b,c,a}]},
{PointSize[Large],Point[{{0,0},a,b,c,
invert[c],invert[b],invert[a]}]},
Text["a",a,{1.8,1.8}],Text["b",b,{-2,1.8}],Text["O",{0,0},{2,2}],
Text["(OverHat[a])",invert[a],{-3,-1}],Text["(OverHat[b])",invert[b],{3,-1}],
Text["c",c,{0,-2}],Text["(OverHat[c])",invert[c],{0.5,-1.5}]
}, Axes->True,PlotRange->{{-0.1,1.8},{-0.2,0.6}}]

This is a little trickier but it boils down to the fact that the red angle minus the blue angle is a right angle.

Finding Mobius Transformations

We know that a Mobius transformation maps circles and lines to circles and lines. In general, a Mobius transformation has three degrees of freedom.

Image of a circle

Suppose we want to know the image of a disk under a Mobius transformation. For concreteness sake, suppose the disk is the unit disk and the Mobius transformation is

T(z)=((2z+3)/(4z+5)).

Just plug in three points on the boundary:

Clear[T];
T[z_] =(2z+3)/(4z+5);
pts = T/@{1,-1,I}

The image is of the unit circle is exactly the circle containing those three points. Since a Mobius transformation is one-to-one, the disk maps onto either the interior or the exterior of that circle. To see which, just check the image of a particular point - like the origin.

T[0]

Since 3/5 lies between 5/9 and 1, the image of the unit disk is the disk containing those three points.

T[z_] = (2z+3)/(4z+5);
ParametricPlot[{Re[T[r*(E^(I*θ))]],Im[T[r*(E^(I*θ))]]},
{r,0,1},{θ,0,2π}, PlotPoints -> 150,Axes -> False,Frame -> True,
PlotRange -> {{0.4,1.2},{-0.3,0.3}}, Mesh -> True, Epilog->{PointSize[Large],
Point[{Re[#],Im[#]}& /@ pts]}]

The cross-ratio

Let’s try to find a Mobius transformation that maps the unit circle to the upper half plane.  Since a Mobius transformation has three degrees of freedom it should be determined by the image of three points.  So, if we could find a Mobius transformation that fixes 1, maps -i->0, and sends i->∞, then we’d have it.

Given fixed and distinct (Subscript[z, 1]), (Subscript[z, 2]), and (Subscript[z, 3]), the following Mobius transformation (called the cross-ratio) maps (Subscript[z, 1])->0, (Subscript[z, 2])->1, and (Subscript[z, 3])->∞.

CrossRatio[z_,z1_,z2_,z3_] := (((z-z1) (z2-z3))/((z-z3)(z2-z1)));

For example, the following should do what we want.

Simplify[CrossRatio[z,-I,1,I]]

T[z_] = ((1-I z)/(-I+z));
ParametricPlot[{Re[T[r*(E^(I*θ))]],Im[T[r*(E^(I*θ))]]},
{r,0,1},{θ,0,2π}, PlotPoints -> 20,
FrameTicks->False,Mesh->True]

Three points -> Three points

Consider the following equation:

CrossRatio[z,z1,z2,z3] == CrossRatio[w,w1,w2,w3]

The Mobius transformation on the left, (Subscript[T, 1]), sends (Subscript[z, 1])->0, (Subscript[z, 2])->1, and (Subscript[z, 3])->∞.  The inverse of the Mobius transformation on the right (Subscript[T, 2]^(-1)) sends 0->(Subscript[w, 1]), 1->(Subscript[w, 2]), ∞->(Subscript[w, 3]).  Thus, (Subscript[T, 2]^(-1))∘(Subscript[T, 1]) sends (Subscript[z, 1])->(Subscript[w, 1]), (Subscript[z, 2])->(Subscript[w, 2]), and (Subscript[z, 3])->(Subscript[w, 3]).  We simply have to solve the equation for w to find it!  Of course, we can automate this.

MobiusTransformation[{z1_,z2_,z3_},{w1_,w2_,w3_}] :=
First[w/.Solve[CrossRatio[z,z1,z2,z3] == 
CrossRatio[w,w1,w2,w3],w]];

For example, suppose want  a Mobius transformation that sends  1->0, i->1+i, -1->3.

T[z_] = MobiusTransformation[{1,I,-1},{0,1+I,3}]

{T[1],T[I],T[-1]}

Some extensions

There are several natural extensions, which is good since we need to deal with ∞.

CrossRatio[z_,z1_,z2_,z3_] := (((z-z1) (z2-z3))/((z-z3)(z2-z1)));
CrossRatio[z_,z1_,z2_,Infinity] := (((z-z1) )/((z2-z1)));
CrossRatio[z_,z1_,Infinity,z3_] := (((z-z1) )/((z-z3)));
CrossRatio[z_,Infinity,z2_,z3_] := (((z2-z3))/((z-z3)));
MobiusTransformation[{z1_,z2_,z3_},{w1_,w2_,w3_}] :=
First[w/.Solve[CrossRatio[z,z1,z2,z3] == 
CrossRatio[w,w1,w2,w3],w]];

Now, a line can be determined by three collinear points or (often easier) two points and ∞.  For example, suppose we want to map the imaginary axis to the unit circle.  We could map 0->1 and fix ±i.

T[z_] = MobiusTransformation[{0,I,-I},{1,I,-I}]
ParametricPlot[{Re[T[x+I*y]],Im[T[x+I*y]]},
{x,-8,0},{y,-4,4}, Mesh->True, PlotPoints -> 100,
PlotRange -> {{-1.2,1.2},{-1.2,1.2}},
Epilog -> {Thick,Circle[{0,0},1]}]

Alternatively, we could fix i, send -i->1 and map ∞->-1.  We get a different map but it still has the same overall effect on the imaginary axis.

T[z_] = MobiusTransformation[{I,-I,Infinity},{I,1,-1}]
ParametricPlot[{Re[T[x+I*y]],Im[T[x+I*y]]},
{x,-8,0},{y,-4,4}, Mesh->True, PlotPoints -> 100,
PlotRange -> {{-1.2,1.2},{-1.2,1.2}},
Epilog -> {Thick,Circle[{0,0},1]}]

Automorphisms of the unit disk

Let’s take another look at this example:

a = I/2;
λ=(E^(-I π/4));
T[z_] := λ ((a-z)/(1-Conjugate[a]z));
ParametricPlot[{Re[T[r*(E^(I*θ))]],Im[T[r*(E^(I*θ))]]},
{r,0,1},{θ,0,2π}, PlotPoints -> 40,
Mesh->True,BoundaryStyle -> None, Epilog -> {Thick,
Opacity[0.8],Hue[0.67,0.6,0.6],Circle[]}]

The key observations are that 0 maps to λ a (where λ is a pure rotation) and the unit circle is fixed.  To see the latter, note that

((|((a-z)/(1-(OverBar[a])z))|)^2)=((a-z)/(1-(OverBar[a])z))(OverBar[((a-z)/(1-(OverBar[a])z))])=((a-z)/(1-(OverBar[a])z))(((OverBar[a])-(OverBar[z]))/(1-a (OverBar[z])))=((|a((|)^2)-2Re(a (OverBar[z]))+|z((|)^2))/(1-2Re(a (OverBar[z]))+|a((|)^2)))=1,

if |z|=1.

Stereographic projection

One-dimensional projection

The 1D stereographic projection formula maps a point (X,Y) from the unit circle to the line:

Clear[X,Y];
stereo1[{X_,Y_}] := {X/(1-Y),0};

This follows easily from similarity of triangles.

{X,Y}={1/2,-Sqrt[3]/2};
Graphics[{
{Circle[{0,0},1],Line[{{0,1},{X,Y}}]},
{PointSize[Large],Point[{stereo1[{X,Y}],{X,Y}}]},
{Dashed,Line[{{0,1},{0,Y},{X,Y}}]},
{Text["X",{X/2,Y+0.1}],Text["(1-Y)",{-0.14,(Y+1)/2}],Text["(x,0)",{X/(1-Y)+0.1,0.06}]}
}, Axes-> True, PlotRange -> {{-1.4,1.4},{-1.2,1.2}},Ticks -> None,
AxesStyle -> Directive[Thin,Opacity[0.4]]]

To find the inverse transformation, we need to know which (X,Y) on the unit circle maps to a given x. We can just solve the appropriate system of equations to do so:

Clear[x,X,Y];
stereo1Inv[{x_,0}] = {X,Y} /. First[Solve[{(X/(1-Y))==x,(X^2)+(Y^2)==1},{X,Y}]]

I guess we could try to check this.

PT = {Sqrt[3]/2,1/2};
pt = stereo1[PT]

stereo1Inv[pt]

Graphics[{
Circle[{0,0},1],Line[{{0,1},pt}],
PointSize[Large],Point[{{0,1},pt,PT}]},
Axes->True]

Two dimensional projection

Two dimensional stereographic projection is the exact same idea, but now we’re going from the unit spere centered at the origin to the plane containing the equator of the sphere.

Graphics3D[{
{Opacity[0.5],Sphere[],Polygon[{{-3,-3,0},{3,-3,0},{3,3,0},{-3,3,0}}]},
{Line[{{0,0,1},{2,-1,0}}],PointSize[Large],Point[{{0,0,1},{2,-1,2}/3,{2,-1,0}}]},
Line[Table[{Cos[t],Sin[t],0},{t,0,2Pi,2Pi/100}]]
}]

The relevant formulae can be deduced by applying the similar triangle idea to the (X,Z) plane and the (Y,Z) plane, which are essentially independent.

Clear[X,Y,Z,x,y,z];
stereo2[{X_,Y_,Z_}] = {X/(1-Z),Y/(1-Z),0}

We can then solve a system of equations to find the inverse.

stereo2Inv[{x_,y_,0}]={X,Y,Z} /. 
First[Solve[{
X/(1-Z)==x,
Y/(1-Z)==y,
(X^2)+(Y^2)+(Z^2)==1
},{X,Y,Z}]]

Here’s an check:

stereo2[{2,-1,2}/3]

stereo2Inv[{2,-1,0}]

And an illustration:

pt = {2,-1,0};
Graphics3D[{
{Opacity[0.5],Sphere[],Polygon[{{-3,-3,0},{3,-3,0},{3,3,0},{-3,3,0}}]},
{Line[{{0,0,1},pt}],PointSize[Large],Point[{{0,0,1},{2,-1,2}/3,{2,-1,0}}]},
Line[Table[{Cos[t],Sin[t],0},{t,0,2Pi,2Pi/100}]]
}]

Connecting back to Mobius transformations

Our goal now is to understand why the operations we see in Mobius Transformations Revealed correspond to Mobius transformations. Some of the operations are easy. That is, the following correspondences are fairly easy:

Horizontal translation of the sphere corresponds to translation in the plane.

Vertical translation of the sphere corresponds to dilation.

Rotation of the sphere about the North-South pole axis through the angle θ corresponds to rotation of the plane about the origin through the angle θ.

The tricky part is to see how rotation of the sphere through the angle φ about the real line corresponds to a Mobius transformation. Geometrically, this corresponds to multiplication by the following matrix:

RotationMatrix[φ,{1,0,0}]

Let’s deal with the relatively simple case that rotation through the angle π corresponds to inversion first. Here’s the image of a point x+i y in the complex plane under

inverse stereographic projection -> rotation -> stereograph projection.

FullSimplify[stereo2[RotationMatrix[Pi,{1,0,0}].stereo2Inv[{x,y,0}]]]

Here’s the image under inversion.

ComplexExpand[1/(x+I*y)]

More generally, here’s the image of the point x+i y when the rotation is through the angle φ.

Simplify[stereo2[RotationMatrix[φ,{1,0,0}].stereo2Inv[{x,y,0}]]]

Hmm... Looks harder. If this does indeed correspond to a Mobius transformation, that Mobius transformation should fix both 1 and -1 and send ∞ to -i sin(φ)/(1-cos(φ)) because of the following computation:

npImage = stereo2[RotationMatrix[φ,{1,0,0}].{0,0,1}]

Thus, it should be the following Mobius transformation:

mt = MobiusTransformation[{1,-1,∞},{1,-1,-((Sin[φ])/(1-Cos[φ]))*I}]

To check this, the following code expands out mt after substituting z -> x+i*y, extracts out the real and imaginary parts and then simplifies those separately.

expr = ComplexExpand[mt /. z -> x+I*y];
b = First[Cases[expr,I*im_:>im]];
a = expr-I*b;
Simplify[{a,b}]

Amazing!

Putting it all together

(* Projection from the sphere to the plane *)
stereo = Compile[{{xyz, _Real, 1}, {XYZ, _Real, 1}}, Module[{
     r = Sqrt[(xyz[[1]] - XYZ[[1]])^2 + (xyz[[2]] - XYZ[[2]])^2],
     theta = ArcTan[(xyz[[1]] - XYZ[[1]]), (xyz[[2]] - XYZ[[2]])]},
    {(r (1 + xyz[[3]]))/(1 - XYZ[[3]] + xyz[[3]]) Cos[theta + Pi] + xyz[[1]],
     (r (1 + xyz[[3]]))/(1 - XYZ[[3]] + xyz[[3]]) Sin[theta + Pi] + xyz[[2]], 0}]];

(* Projection from the plane to the sphere *)
stereoInv = Compile[{{pq, _Real, 1}, {xyz, _Real, 1}},
   {2 pq[[1]], 2 pq[[2]], 
    pq[[1]]^2 + pq[[2]]^2 - 1}/(pq[[1]]^2 + pq[[2]]^2 + 1) + xyz];

(* The initial grid in the xy-plane *)
gridSpan = 1.2; step = 0.2;
plotSpan = 12;
xGrid = Table[{x, y, 0}, {y, -gridSpan, gridSpan, step}, 
  {x, -gridSpan, gridSpan, step/10}];
yGrid = Table[{x, y, 0}, {x, -gridSpan, gridSpan, step}, 
  {y, -gridSpan, 
    gridSpan, step/10}];
grid = Join[xGrid, yGrid];
(* {0,0} is problematic. *)
grid = DeleteCases[grid, {_?(NumericQ[#] &), _, _}?(Norm[#] < 0.0001 &), Infinity];

mtrPic[phi_, theta_, vp_, showSphere_, xy_, z_] := Module[{warpedGrid},
   Quiet[warpedGrid = Normal[Rotate[
       Rotate[Line[Map[stereoInv[#, Flatten[{xy, z}]] &, grid, {2}]],
        theta, {0, 0, 1}, Flatten[{xy, 0}]], 
       phi, {-Sin[theta], Cos[theta], 0}, Flatten[{xy, z}]]];
    Graphics3D[{
      If[showSphere === True,
       {{Opacity[0.8], Sphere[Flatten[{xy, z}]]}, warpedGrid}, {}],
      {Map[stereo[Flatten[{xy, z}], #] &, warpedGrid, {3}]},
      {Opacity[0.5], 
       Polygon[plotSpan {{-1, -1, 0}, {1, -1, 0}, {1, 1, 0}, {-1, 1, 0}}]},
      {Specularity[White, 20], ColorData["StarryNightColors"][1],
       Tube[{{-12, 0, 0}, {12, 0, 0}}, 0.02],
       Tube[{{0, -12, 0}, {0, 12, 0}}, 0.02],
       Tube[{{0, 0, 0}, {0, 0, 3.8}}, 0.02],
       Cone[{{0, 0, 3.7}, {0, 0, 4}}, 0.1]}
      }, ImageSize -> 500, ViewPoint -> vp, 
     ViewAngle -> 30 Degree, Boxed -> False, 
     PlotRange -> {plotSpan {-1, 1}, plotSpan {-1, 1}, {-1, 4}}],
    Power::infy]
   ];

Manipulate[mtrPic[phi, theta, vp, showSphere, xy, z],
 {{phi, 0}, 0, Pi}, {{theta, 0}, -Pi, Pi},
 {{vp, {1.77141, -2.5135, 1.4121}/4, "view point"},
  {{1.77141, -2.5135, 1.4121}/4 -> "perspective", {0, 0, 2} -> "ortho"}},
 {{showSphere, True, "show sphere"}, {True, False}},
 {{xy, {0, 0}}, (plotSpan - 1) {-1, -1}, (plotSpan - 1) {1, 1}, 
  ControlPlacement -> Left},
 {{z, 1}, 0, 3, VerticalSlider, ControlPlacement -> Left},
 TrackedSymbols -> {phi, theta, vp, xy, z, showSphere},
 SaveDefinitions -> True]