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}}]

Möbius 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

Möbius transformations map circles and/or lines to circles and or lines. That is, the image of a circle under a Möbius transformation is another circle or a line. Similarly, the image of a line under a Möbius 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 Möbius transformations map circles and lines to circles and lines.  The first observation is that any Möbius 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 Möbius Transformations

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

Image of a circle

Suppose we want to know the image of a disk under a Möbius transformation. For concreteness sake, suppose the disk is the unit disk and the Möbius 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 Möbius 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]}]

How about the image of the right half plane?

pts = T /@ {I,0,-I}

ParametricPlot[{Re[T[x+I*y]],Im[T[x+I*y]]},
{x,0,8},{y,-4,4}, Mesh->True,
PlotRange -> {{0.48,0.62},{-0.07,0.07}},
PlotPoints -> 100, Epilog->{PointSize[Large],
Point[{Re[#],Im[#]}& /@ pts],
Thick,Circle[{11/20,0},1/20]}]

The cross-ratio

Let’s try to find a Möbius transformation that maps the unit circle to the upper half plane.  Since a Möbius transformation has three degrees of freedom it should be determined by the image of three points.  So, if we could find a Möbius 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 Möbius 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π},
FrameTicks->False,Mesh->True]

Three points -> Three points

Consider the following equation:

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

The Möbius transformation on the left, (Subscript[T, 1]), sends (Subscript[z, 1])->0, (Subscript[z, 2])->1, and (Subscript[z, 3])->∞.  The inverse of the Möbius 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:

MöbiusTransformation[{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 Möbius transformation that sends  1->0, i->1+i, -1->3.

T[z_] = MöbiusTransformation[{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)));
MöbiusTransformation[{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_] = MöbiusTransformation[{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_] = MöbiusTransformation[{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.