\chapter{Inversion}
In this lecture we will learn about a remarkable transformation of the plane called inversion. We will see that inversion can be extremely helpful in problems where many circles are involved - it often enables one to simplify such problems considerably.
Before we define what inversion is, we will define the notion of symmetry with respect to a circle.
Let $C$ be a circle with center $O$ and radius $R$. We will call points $P$ and $P'$ symmetric with respect to the circle $C$ if
1. the point $P'$ lies on the ray from $O$ to $P$.
2. $OP\cdot OP'=R^2$.
Note that for every point $P$ in the plane, except for the center $O$, there exists a unique point $P'$ symmetric to it with respect to the circle $C$.
We will find it convenient when dealing with inversions, to compactify our plane by one point at infinity, called $\infty$. One should think of this point not as some object unrelated to the plane, but rather as a point in a new space, "the extended plane", to which all the sequences of points whose absolute values tend to infinity converge.
With this additional point in mind we see that we should define the points $O$ and $\infty$ to be symmetric with respect to the circle $C$. Indeed, it follows from the definition that a sequence of points converges to $O$ if and only if the absolute values of the symmetric points tend to infinity.
This supplement to the definition of symmetric points allows us to claim that for every point $P$ in the extended plane there is a point symmetric to it with respect to the circle $P$ and such a point is unique.
Now we can define what inversion is: inversion with respect to a circle $C$ is the transformation of the extended plane to itself that sends every point to the point symmetric to it with respect to the circle $C$.
For example every point on the circle $C$ gets inverted to itself; the interior and the exterior of the circle $C$ are switched by the inversion.
One can see immediately that inversion is an involution, i.e. inverting twice is the same as doing nothing at all.
Another simple property is that lines passing through the point $O$ get inverted to themselves (in fact every ray with origin $O$ gets inverted to itself).
A less immediate property of the inversion is that lines that do not pass through the point $O$ get inverted to circles that do pass through $O$ (and vice versa - remember that inversion is an involution).
To prove it let $l$ be a line in the plane. Let $P$ denote the foot of the perpendicular from the point $O$ to the line $l$. Let $P'$ denote its image under inversion in a circle with center $O$. We claim then that the image of the line $l$ under inversion is the circle $l'$ for which the segment $OP'$ is the diameter.
What we have to prove is that any point $Q$ on the line $l$ gets mapped after inversion to some point on the circle $l'$. Let $Q'$ denote the image of $Q$ under inversion, i.e. the point on the ray $OQ$ for which $OQ\cdot OQ'=OP\cdot OP'$.We can rewrite this equality in the form $\frac{OQ}{OP'}=\frac{OP}{OQ'}$. This, together with the fact that the angle $\angle QOP=\angle P'OQ'$ is a common angle for triangles $QOP$ and $P'OQ'$, implies that these triangles are similar. In particular $\angle OQ'P'=\angle OPQ=90\degree$, hence the point $Q'$ lies on the circle for which $OP'$ is the diameter.
With this knowledge at hand we can prove a remarkable property of inversion: it preserves angles!!!
What we mean by this is that if two curves intersect at some point $P$ and form angle $\alpha$ at the point of intersection, then their images under inversion will intersect at point $P'$ - the inverted image of $P$ - and form an angle $\alpha$ at this point (more precisely, $-\alpha$ - the magnitude of the angle will be the same, but if we keep track of orientations and the order of the curves, then the direction of the angle changes).
First we observe it's enough to prove the claim for the case where both curves are lines - this is so because the angle between two curves at their point of intersection is defined as the angle between the lines tangent to these curves at the point of intersection.
Now if we have two distinct lines in the plane, not intersecting at $O$, and the angle between them is $\alpha\neq 0$, we can obtain one from the other by rotating the first one by angle $\alpha$ around the point $O$ (this way it becomes parallel to the second one) and then scaling with the same center $O$ by some factor $a$ (equal to the quotient of the distances from $O$ to the lines).
This means that the image under inversion of the second line can be obtained from the image of the first one by rotating around the point $O$ by angle $\alpha$ and then scaling by factor $1/\alpha$.
But we know that the images of the lines under inversion are circles that pass through the point $O$. From what we described above we can conclude that the angle between the circles at the point $O$ is equal to $\alpha$ (the angle at $O$ between the first circle and its copy rotated by angle $\alpha$ is clearly $\alpha$; this angle is not affected if we further scale the rotated copy - the tangent line at the point $O$ remains the same). But for circles, the two angles at the two points of intersection are equal up to sign! Since the angle at the other point of intersection is the one we are interested in, we are done.
Next property of inversion that we would like to discuss is the fact is that it maps any circle that doesn't pass through the point $O$ to a circle (which, of course, doesn't pass through the point $O$).
Before we prove it, let's note that while what the inversion in circle $C$ does to the plane depends very much on the center of circle $C$, it depends much less on its radius. Namely if $C_1$ and $C_2$ are circles with the same center $O$, but with different radii $R_1$ and $R_2$ and $S$ is any shape in the plane, then the inverted images $S_1'$ and $S_2'$ of $S$ in circles $C_1$ and $C_2$ are related by similarity relation: $S_2'$ is obtained from $S_1'$ by scaling with center $O$ and factor $R_2^2/R_1^2$. This follows by checking that for any point $P$ in $S$ the distances $OP_1'$ and $OP_2'$ from $O$ to the inverted images of $P$ in $C_1$ and $C_2$ are related by $OP_1'0/OP_2'=R_1^2/R_2^2$.
Now we can approach the problem of proving that circles invert to circles by first choosing a convenient radius of inversion, and then proving the statement for it. For any other radius of inversion the claim will follow.
We separate two cases of the statement: when the center of inversion $O$ lies outside the circle we are inverting and when it is inside.
In the first case we can choose the radius of the inversion circle to be equal to the length of the tangent lines from $O$ to the circle we are inverting. With this choice the circle of inversion becomes perpendicular to the circle we are inverting (because the tangent line to any circle is perpendicular to the radius of this circle that passes through the point of tangency).
We will show that in this case, i.e. if the circle $s$ we are inverting is perpendicular to the circle $C$, its inversion in $C$ coincides with itself.
For the proof let $P$ be one of the points of intersection of the circle $s$ and the inversion circle $C$ and let $O$ be the center of $C$. Since the circle $s$ is perpendicular to $C$ and the radius $OP$ is also perpendicular to $C$, the segment $OP$ is tangent to $s$ at $P$. Now if $l$ is any ray with origin at $O$ and $Q$ and $Q'$ are its intersection points with $s$, then by a familiar* property of circles $OQ\cdot OQ'=OP^2$. Thus $Q'$ is the inversion of $Q$. Since the ray $l$ was arbitrary, we proved that the image of $s$ under inversion is $s$ itself.
For circle $s_1$ that does contain the inversion center $O$ denote by $AB$ its diameter that contains the point $O$. We will choose the radius $R$ for the inversion circle to be such that $R^2=OA\cdot OB$. We claim that the inversion of $s_1$ in the circle $C$ with center $O$ and such radius is the circle $s_2$ obtained from $s_1$ by rotating by $180\degree$ around point $O$. To check this, let $P_1$ and $P_2$ denote two points on circles $s_1$ and $s_2$ respectively lying on a ray $l$ with origin at $O$. We want to prove $OP_1\cdot OP_2=R^2$. Let $P_2'$ denote the other point of intersection of the line containing $l$ and the circle $s_1$. By definition of the circle $s_2$, the point $P_2'$ can be obtained from the point $P_2$ by rotating by $180\degree$ around the point $O$. Hence $OP_2=OP_2'$. From general properties of circles we know that $OP_1\cdot OP_2'=OA\cdot OB$, hence indeed $OP_1\cdot OP_2=R^2$.
Note that we have proved slightly more: the inverted image of the a circle not containing the inversion center is a circle homothetic to the original one with positive coefficient of homothety (i.e. one can scale the original circle by a positive factor to get its inverted image). Indeed, it is obvious from what we proved that this is true if the radius of inversion circle is equal to the length of the tangents from $O$ to the circle we are inverting (in this case the homothety factor should be $1$). If we change the radius of the inversion circle, the inverted image of any shape gets scaled by a positive factor, which proves our claim.
In a similar fashion we can show that the inverted image of a circle that contains the point $O$ is a circle homothetic to the original one with negative homothety factor, i.e. can be obtained by scaling by a positive factor and rotating by $180\degree$.
Exercise:
Let $C$ be a circle with center $O$ and radius $R$. Let $s$ be a circle with radius $r$ and center $O'$. Let $d$ denote the distance between the centers $O$ and $O'$. Suppose also $d>r$ so that the circle $s$ doesn't contain $O$. Prove that the radius of the circle $s'$ which is obtained from circle $s$ by inverting in circle circle $C$ is $R^2 r/(d^2-r^2)$.
Hint: Let $AB$ denote the diameter of the circle $s$, whose extension contains the point $O$. Let $A'$ and $B'$ denote images of $A$ and $B$ under inversion in circle $C$. Prove that $A'B'$ is the diameter of $s'$ and that $OA=d+r$, $OB=d-r$, $OA'=R^2/(d+r)$, $OB'=R^2/(d-r)$.
Exercise:
Let $C$ denote a circle of radius 1. Let $O$ denote its center and $AB$ be its diameter. Let $D$ denote the circle whose diameter is $AO$. Let $C_0$ denote the circle whose diameter is $OB$. Let $C_1$ be a circle tangent to $C$ from the inside and tangent to $D$ and $C_0$ from the outside (there are two such circles, they are symmetric with respect to $AB$; choose one). Let $C_2$ be the circle tangent to $C$ from the inside and tangent to $D$ and $C_1$ from the outside; there are two such circles - choose the one that is closer to the point $A$. Continue in the same fashion to build $C_3$,$C_4$,... ($C_{n+1}$ is tangent to $C$, $D$ and $C_n$). Prove that the radius of $C_n$ is $\frac{1}{n^2+2}$.
Hint: when we invert this picture in a circle with radius $R$ and center $A$, the circles $C$ and $D$ become parallel lines orthogonal to the diameter $AB$ and distand $R^2/2$ apart. The circles $C_n$ invert to a chain of circles of radius $R^2/4$ tangent to both parallel lines and to each other. Show that the distance $d_n$ from $A$ to the center of inverted image of $C_n$ satisfies $d_n^2= (n^2/4+9/16)R^4$ and use the previous exercise to derive the desired result.
\section{Inversion in $\mathbb{R}^n$}
In this section we generalize the main properties of inversion to the Euclidean space $\mathbb{R}^n$. We will use a little bit of analytic geometry.
Choose a coordinate system in $\mathbb{R}^n$ so that the origin coincides with the center of inversion. Then the inversion with center at the origin and radius $R$ sends the point $x\in \mathbb{R}^n$ to $\frac{x}{|x|^2}$.
How do planes look in $\mathbb{R}^n$? They are all of the form $\{x|<x,y>=c\}$ for some vector $y\in \mathbb{R}^n$ (a normal vector) and $c\in \mathbb{R}$. Similarly a sphere with center $x_0$ and radius $r$ is given by the equation $\{x|<x-x_0,x-x_0>=r^2\}$. We can rewrite this equation in the form $\{x| <x,x>+a<x,y>+b=0\}$ (where $y$ is $-2 x_0$ and $b$ is $<x_0,x_0>-r^2$).
Now the inversion of a plane $\{x|<x,y>=c\}$ is given by the equation $<\frac{x}{|x|^2},y>=c$, or $<x,y>=c<x,x>$. If $c=0$, then this is an equation of the plane $<x,y>=0$. If $c\neq 0$, it is an equation of the sphere ($<x,x>-c^{-1}<x,y>=0$). The origin $0$ clearly belongs to this sphere. Hence planes passing through the origin get inverted to themselves, and those not passing through the origin get inverted into spheres passing through origin.
Now let's figure out what happens to the spheres under inversion. As in the case of the plane $\mathbb{R}^2$, inversion is an involution - doing it twice doesn't change anything. Hence we already showed that the spheres that pass through the origin should get inverted to planes not passing through the origin. So let $<x,x>+a<x,y>+b=0$ be an equation of a sphere not passing through the point $0$: this translates to $b\neq 0$. Then the points on its image under inversion satisfy $<\frac{x}{|x|^2},\frac{x}{|x|^2}>+a<\frac{x}{|x|^2},y>+b=0$, or, multiplying by $<x,x>$ $$1+a<x,y>+b<x,x>=0$$ Since $b\neq 0$, we can rewrite it in the form $<x,x>+\frac{a}{b} <x,y>+\frac{1}{b}=0$, which is an equation of a sphere. Thus we have proved that the spheres not passing through the center of inversion get inverted into spheres not passing through the center of inversion.
It's easy to deduce from this that circles get mapped under inversion to circles. Indeed, a circle is an intersection of several planes and a sphere. Under inversion it must get mapped to the intersection of images of these planes and spheres. But any intersection of spheres and planes is a circle (provided it is one-dimensional, which it is, since we started with a one-dimensional circle).
The only property of inversion we didn't generalize to $\mathbb{R}^n$ yet is the property that inversions preserve angles, but reverse their orientations. To see what a map does to angles, it is enough to consider only its linear approximation; its differential. If this linear approximation preserves angles, the map itself preserves them.
Now how can we compute the linear approximation to the map $x\rightarrow\frac{x}{|x|^2}$? For points $x$ near the unit sphere, i.e. such that $|x|=1+\epsilon$ for some small $\epsilon$, the length of their image under inversion is $\frac{1}{|x|}=\frac{1}{1+\epsilon}=1-\epsilon+\epsilon^2-\epsilon^3+\ldots\approx 1-\epsilon$. Thus near a point on the unit sphere the inversion behaves just like reflection in the tangent space at this point.
See figure ...
Since reflections preserve angles and reverse orientations, we proved that inversion at any point on the sphere of inversion preserves angles, but reverses orientations. For the proof of this fact for other points, recall that inversion with two different radii, but the same center, differ only by scaling: inverting in a sphere of radius $R$ and then scaling by $1/R^2$ is the same as inverting in a sphere of radius $1$ with the same center. So to prove that inversion in the unit sphere preserves angles at a point $x_0$ we first use the fact that the inversion with radius $|x_0|$ preserves angles at $x_0$ (this is what we proved above) and then that scaling by $1/|x_0|^2$ preserves all angles. Since the composition is equal to inversion in the unit sphere, we are done.
\subsection{Stereographic projection}
In complex analysis and sometimes in other circumstances one encounters the following map from a sphere $S$ to plane $\pi$ tangent to it at the "south pole". To find the image of a point $x$ on the sphere under this map, one has to connect the point $x$ to the north pole by a straight line and find the point of intersection of this line with the plane $\pi$. This point of intersection is the stereographic projection of $x$.
This projection has some wonderful properties, which make it very useful. First property is that it maps circles on the sphere $S$ to circles on the plane $\pi$. The other useful property is that it preserves angles.
One can't help but notice that these properties resemble very much the properties of an inversion. And indeed, stereographic projection IS the restriction of the inversion in a sphere with center at the north pole and radius equal to the diameter of the sphere $S$ from which we are projecting. Indeed, such an inversion maps the sphere $S$ to a plane, passing through the south pole of $S$ and orthogonal to the segment connecting the North pole with the south pole. So it maps $S$ to $\pi$. Also the image of every point $x$ on the sphere $S$ under the described inversion lies on the ray starting at the north pole and passing through $x$. Thus the image of $x$ under inversion must coincide with its image under stereographic projection (since the point of intersection of the plane $\pi$ with this ray is unique).
Once we identified the stereographic projection with inversion, its properties become clear: it maps circles on the sphere to circles (or lines) on the plane and it preserves angles.
\section{Appendix}
In this appendix we will prove some of the statements from elementary geometry of the circle we used in proving the porperties of inversion in the plane.
\begin{theorem}
Let $C$ be a circle with center $O$ and let $X$ and $Y$ be points on $Z$ be three points on $C$. Then $\angle XYZ=\frac{1}{2} \angle XOZ$. In particular the angle $\angle XYZ$ is independent of the choice of point $Y$ on the arc $XZ$.
\end{theorem}
\begin{theorem}
Suppose lines $l_1$ and $l_2$ interesect at a point $Z$. Suppose also that the line $l_1$ intersects the circle $C$ at points $X_1,Y_1$ and the line $l_2$ intersects the circle in points $X_2,Y_2$. Then $|ZX_1||ZY_1|=|ZX_2||ZY_2|$.
\end{theorem}

In this lecture we will learn about a remarkable transformation of the plane called inversion. We will see that inversion can be extremely helpful in problems where many circles are involved - it often enables one to simplify such problems considerably.

Before we define what inversion is, we will define the notion of symmetry with respect to a circle.

Let $C$ be a circle with center $O$ and radius $R$. We will call points $P$ and $P'$ symmetric with respect to the circle $C$ if

1. the point $P'$ lies on the ray from $O$ to $P$.

2. $OP\cdot OP'=R^2$.

Note that for every point $P$ in the plane, except for the center $O$, there exists a unique point $P'$ symmetric to it with respect to the circle $C$.

We will find it convenient when dealing with inversions, to compactify our plane by one point at infinity, called $\infty$. One should think of this point not as some object unrelated to the plane, but rather as a point in a new space, "the extended plane", to which all the sequences of points whose absolute values tend to infinity converge.

With this additional point in mind we see that we should define the points $O$ and $\infty$ to be symmetric with respect to the circle $C$. Indeed, it follows from the definition that a sequence of points converges to $O$ if and only if the absolute values of the symmetric points tend to infinity.

This supplement to the definition of symmetric points allows us to claim that for every point $P$ in the extended plane there is a point symmetric to it with respect to the circle $P$ and such a point is unique.

Now we can define what inversion is: inversion with respect to a circle $C$ is the transformation of the extended plane to itself that sends every point to the point symmetric to it with respect to the circle $C$.

For example every point on the circle $C$ gets inverted to itself; the interior and the exterior of the circle $C$ are switched by the inversion.

One can see immediately that inversion is an involution, i.e. inverting twice is the same as doing nothing at all.

Another simple property is that lines passing through the point $O$ get inverted to themselves (in fact every ray with origin $O$ gets inverted to itself).

A less immediate property of the inversion is that lines that do not pass through the point $O$ get inverted to circles that do pass through $O$ (and vice versa - remember that inversion is an involution).

To prove it let $l$ be a line in the plane. Let $P$ denote the foot of the perpendicular from the point $O$ to the line $l$. Let $P'$ denote its image under inversion in a circle with center $O$. We claim then that the image of the line $l$ under inversion is the circle $l'$ for which the segment $OP'$ is the diameter.

What we have to prove is that any point $Q$ on the line $l$ gets mapped after inversion to some point on the circle $l'$. Let $Q'$ denote the image of $Q$ under inversion, i.e. the point on the ray $OQ$ for which $OQ\cdot OQ'=OP\cdot OP'$.We can rewrite this equality in the form $\frac{OQ}{OP'}=\frac{OP}{OQ'}$. This, together with the fact that the angle $\angle QOP=\angle P'OQ'$ is a common angle for triangles $QOP$ and $P'OQ'$, implies that these triangles are similar. In particular $\angle OQ'P'=\angle OPQ=90\degree$, hence the point $Q'$ lies on the circle for which $OP'$ is the diameter.

With this knowledge at hand we can prove a remarkable property of inversion: it preserves angles!!!

What we mean by this is that if two curves intersect at some point $P$ and form angle $\alpha$ at the point of intersection, then their images under inversion will intersect at point $P'$ - the inverted image of $P$ - and form an angle $\alpha$ at this point (more precisely, $-\alpha$ - the magnitude of the angle will be the same, but if we keep track of orientations and the order of the curves, then the direction of the angle changes).

First we observe it's enough to prove the claim for the case where both curves are lines - this is so because the angle between two curves at their point of intersection is defined as the angle between the lines tangent to these curves at the point of intersection.

Now if we have two distinct lines in the plane, not intersecting at $O$, and the angle between them is $\alpha\neq 0$, we can obtain one from the other by rotating the first one by angle $\alpha$ around the point $O$ (this way it becomes parallel to the second one) and then scaling with the same center $O$ by some factor $a$ (equal to the quotient of the distances from $O$ to the lines).

This means that the image under inversion of the second line can be obtained from the image of the first one by rotating around the point $O$ by angle $\alpha$ and then scaling by factor $1/\alpha$.

But we know that the images of the lines under inversion are circles that pass through the point $O$. From what we described above we can conclude that the angle between the circles at the point $O$ is equal to $\alpha$ (the angle at $O$ between the first circle and its copy rotated by angle $\alpha$ is clearly $\alpha$; this angle is not affected if we further scale the rotated copy - the tangent line at the point $O$ remains the same). But for circles, the two angles at the two points of intersection are equal up to sign! Since the angle at the other point of intersection is the one we are interested in, we are done.

Next property of inversion that we would like to discuss is the fact is that it maps any circle that doesn't pass through the point $O$ to a circle (which, of course, doesn't pass through the point $O$).

Before we prove it, let's note that while what the inversion in circle $C$ does to the plane depends very much on the center of circle $C$, it depends much less on its radius. Namely if $C_1$ and $C_2$ are circles with the same center $O$, but with different radii $R_1$ and $R_2$ and $S$ is any shape in the plane, then the inverted images $S_1'$ and $S_2'$ of $S$ in circles $C_1$ and $C_2$ are related by similarity relation: $S_2'$ is obtained from $S_1'$ by scaling with center $O$ and factor $R_2^2/R_1^2$. This follows by checking that for any point $P$ in $S$ the distances $OP_1'$ and $OP_2'$ from $O$ to the inverted images of $P$ in $C_1$ and $C_2$ are related by $OP_1'0/OP_2'=R_1^2/R_2^2$.

Now we can approach the problem of proving that circles invert to circles by first choosing a convenient radius of inversion, and then proving the statement for it. For any other radius of inversion the claim will follow.

We separate two cases of the statement: when the center of inversion $O$ lies outside the circle we are inverting and when it is inside.

In the first case we can choose the radius of the inversion circle to be equal to the length of the tangent lines from $O$ to the circle we are inverting. With this choice the circle of inversion becomes perpendicular to the circle we are inverting (because the tangent line to any circle is perpendicular to the radius of this circle that passes through the point of tangency).

We will show that in this case, i.e. if the circle $s$ we are inverting is perpendicular to the circle $C$, its inversion in $C$ coincides with itself.

For the proof let $P$ be one of the points of intersection of the circle $s$ and the inversion circle $C$ and let $O$ be the center of $C$. Since the circle $s$ is perpendicular to $C$ and the radius $OP$ is also perpendicular to $C$, the segment $OP$ is tangent to $s$ at $P$. Now if $l$ is any ray with origin at $O$ and $Q$ and $Q'$ are its intersection points with $s$, then by a familiar* property of circles $OQ\cdot OQ'=OP^2$. Thus $Q'$ is the inversion of $Q$. Since the ray $l$ was arbitrary, we proved that the image of $s$ under inversion is $s$ itself.

For circle $s_1$ that does contain the inversion center $O$ denote by $AB$ its diameter that contains the point $O$. We will choose the radius $R$ for the inversion circle to be such that $R^2=OA\cdot OB$. We claim that the inversion of $s_1$ in the circle $C$ with center $O$ and such radius is the circle $s_2$ obtained from $s_1$ by rotating by $180\degree$ around point $O$. To check this, let $P_1$ and $P_2$ denote two points on circles $s_1$ and $s_2$ respectively lying on a ray $l$ with origin at $O$. We want to prove $OP_1\cdot OP_2=R^2$. Let $P_2'$ denote the other point of intersection of the line containing $l$ and the circle $s_1$. By definition of the circle $s_2$, the point $P_2'$ can be obtained from the point $P_2$ by rotating by $180\degree$ around the point $O$. Hence $OP_2=OP_2'$. From general properties of circles we know that $OP_1\cdot OP_2'=OA\cdot OB$, hence indeed $OP_1\cdot OP_2=R^2$.

Note that we have proved slightly more: the inverted image of the a circle not containing the inversion center is a circle homothetic to the original one with positive coefficient of homothety (i.e. one can scale the original circle by a positive factor to get its inverted image). Indeed, it is obvious from what we proved that this is true if the radius of inversion circle is equal to the length of the tangents from $O$ to the circle we are inverting (in this case the homothety factor should be $1$). If we change the radius of the inversion circle, the inverted image of any shape gets scaled by a positive factor, which proves our claim.

In a similar fashion we can show that the inverted image of a circle that contains the point $O$ is a circle homothetic to the original one with negative homothety factor, i.e. can be obtained by scaling by a positive factor and rotating by $180\degree$.

Exercise:

Let $C$ be a circle with center $O$ and radius $R$. Let $s$ be a circle with radius $r$ and center $O'$. Let $d$ denote the distance between the centers $O$ and $O'$. Suppose also $d>r$ so that the circle $s$ doesn't contain $O$. Prove that the radius of the circle $s'$ which is obtained from circle $s$ by inverting in circle circle $C$ is $R^2 r/(d^2-r^2)$.

Hint: Let $AB$ denote the diameter of the circle $s$, whose extension contains the point $O$. Let $A'$ and $B'$ denote images of $A$ and $B$ under inversion in circle $C$. Prove that $A'B'$ is the diameter of $s'$ and that $OA=d+r$, $OB=d-r$, $OA'=R^2/(d+r)$, $OB'=R^2/(d-r)$.

Exercise:

Let $C$ denote a circle of radius 1. Let $O$ denote its center and $AB$ be its diameter. Let $D$ denote the circle whose diameter is $AO$. Let $C_0$ denote the circle whose diameter is $OB$. Let $C_1$ be a circle tangent to $C$ from the inside and tangent to $D$ and $C_0$ from the outside (there are two such circles, they are symmetric with respect to $AB$; choose one). Let $C_2$ be the circle tangent to $C$ from the inside and tangent to $D$ and $C_1$ from the outside; there are two such circles - choose the one that is closer to the point $A$. Continue in the same fashion to build $C_3$,$C_4$,... ($C_{n+1}$ is tangent to $C$, $D$ and $C_n$). Prove that the radius of $C_n$ is $\frac{1}{n^2+2}$.

Hint: when we invert this picture in a circle with radius $R$ and center $A$, the circles $C$ and $D$ become parallel lines orthogonal to the diameter $AB$ and distand $R^2/2$ apart. The circles $C_n$ invert to a chain of circles of radius $R^2/4$ tangent to both parallel lines and to each other. Show that the distance $d_n$ from $A$ to the center of inverted image of $C_n$ satisfies $d_n^2= (n^2/4+9/16)R^4$ and use the previous exercise to derive the desired result.

\section{Inversion in $\mathbb{R}^n$}

In this section we generalize the main properties of inversion to the Euclidean space $\mathbb{R}^n$. We will use a little bit of analytic geometry.

Choose a coordinate system in $\mathbb{R}^n$ so that the origin coincides with the center of inversion. Then the inversion with center at the origin and radius $R$ sends the point $x\in \mathbb{R}^n$ to $\frac{x}{|x|^2}$.

How do planes look in $\mathbb{R}^n$? They are all of the form $\{x|<x,y>=c\}$ for some vector $y\in \mathbb{R}^n$ (a normal vector) and $c\in \mathbb{R}$. Similarly a sphere with center $x_0$ and radius $r$ is given by the equation $\{x|<x-x_0,x-x_0>=r^2\}$. We can rewrite this equation in the form $\{x| <x,x>+a<x,y>+b=0\}$ (where $y$ is $-2 x_0$ and $b$ is $<x_0,x_0>-r^2$).

Now the inversion of a plane $\{x|<x,y>=c\}$ is given by the equation $<\frac{x}{|x|^2},y>=c$, or $<x,y>=c<x,x>$. If $c=0$, then this is an equation of the plane $<x,y>=0$. If $c\neq 0$, it is an equation of the sphere ($<x,x>-c^{-1}<x,y>=0$). The origin $0$ clearly belongs to this sphere. Hence planes passing through the origin get inverted to themselves, and those not passing through the origin get inverted into spheres passing through origin.

Now let's figure out what happens to the spheres under inversion. As in the case of the plane $\mathbb{R}^2$, inversion is an involution - doing it twice doesn't change anything. Hence we already showed that the spheres that pass through the origin should get inverted to planes not passing through the origin. So let $<x,x>+a<x,y>+b=0$ be an equation of a sphere not passing through the point $0$: this translates to $b\neq 0$. Then the points on its image under inversion satisfy $<\frac{x}{|x|^2},\frac{x}{|x|^2}>+a<\frac{x}{|x|^2},y>+b=0$, or, multiplying by $<x,x>$ $$1+a<x,y>+b<x,x>=0$$ Since $b\neq 0$, we can rewrite it in the form $<x,x>+\frac{a}{b} <x,y>+\frac{1}{b}=0$, which is an equation of a sphere. Thus we have proved that the spheres not passing through the center of inversion get inverted into spheres not passing through the center of inversion.

It's easy to deduce from this that circles get mapped under inversion to circles. Indeed, a circle is an intersection of several planes and a sphere. Under inversion it must get mapped to the intersection of images of these planes and spheres. But any intersection of spheres and planes is a circle (provided it is one-dimensional, which it is, since we started with a one-dimensional circle).

The only property of inversion we didn't generalize to $\mathbb{R}^n$ yet is the property that inversions preserve angles, but reverse their orientations. To see what a map does to angles, it is enough to consider only its linear approximation; its differential. If this linear approximation preserves angles, the map itself preserves them.

Now how can we compute the linear approximation to the map $x\rightarrow\frac{x}{|x|^2}$? For points $x$ near the unit sphere, i.e. such that $|x|=1+\epsilon$ for some small $\epsilon$, the length of their image under inversion is $\frac{1}{|x|}=\frac{1}{1+\epsilon}=1-\epsilon+\epsilon^2-\epsilon^3+\ldots\approx 1-\epsilon$. Thus near a point on the unit sphere the inversion behaves just like reflection in the tangent space at this point.

See figure ...

Since reflections preserve angles and reverse orientations, we proved that inversion at any point on the sphere of inversion preserves angles, but reverses orientations. For the proof of this fact for other points, recall that inversion with two different radii, but the same center, differ only by scaling: inverting in a sphere of radius $R$ and then scaling by $1/R^2$ is the same as inverting in a sphere of radius $1$ with the same center. So to prove that inversion in the unit sphere preserves angles at a point $x_0$ we first use the fact that the inversion with radius $|x_0|$ preserves angles at $x_0$ (this is what we proved above) and then that scaling by $1/|x_0|^2$ preserves all angles. Since the composition is equal to inversion in the unit sphere, we are done.

\subsection{Stereographic projection}

In complex analysis and sometimes in other circumstances one encounters the following map from a sphere $S$ to plane $\pi$ tangent to it at the "south pole". To find the image of a point $x$ on the sphere under this map, one has to connect the point $x$ to the north pole by a straight line and find the point of intersection of this line with the plane $\pi$. This point of intersection is the stereographic projection of $x$.

This projection has some wonderful properties, which make it very useful. First property is that it maps circles on the sphere $S$ to circles on the plane $\pi$. The other useful property is that it preserves angles.

One can't help but notice that these properties resemble very much the properties of an inversion. And indeed, stereographic projection IS the restriction of the inversion in a sphere with center at the north pole and radius equal to the diameter of the sphere $S$ from which we are projecting. Indeed, such an inversion maps the sphere $S$ to a plane, passing through the south pole of $S$ and orthogonal to the segment connecting the North pole with the south pole. So it maps $S$ to $\pi$. Also the image of every point $x$ on the sphere $S$ under the described inversion lies on the ray starting at the north pole and passing through $x$. Thus the image of $x$ under inversion must coincide with its image under stereographic projection (since the point of intersection of the plane $\pi$ with this ray is unique).

Once we identified the stereographic projection with inversion, its properties become clear: it maps circles on the sphere to circles (or lines) on the plane and it preserves angles.

\section{Appendix}

In this appendix we will prove some of the statements from elementary geometry of the circle we used in proving the porperties of inversion in the plane.

\begin{theorem}

Let $C$ be a circle with center $O$ and let $X$ and $Y$ be points on $Z$ be three points on $C$. Then $\angle XYZ=\frac{1}{2} \angle XOZ$. In particular the angle $\angle XYZ$ is independent of the choice of point $Y$ on the arc $XZ$.

\end{theorem}

\begin{theorem}

Suppose lines $l_1$ and $l_2$ interesect at a point $Z$. Suppose also that the line $l_1$ intersects the circle $C$ at points $X_1,Y_1$ and the line $l_2$ intersects the circle in points $X_2,Y_2$. Then $|ZX_1||ZY_1|=|ZX_2||ZY_2|$.

\end{theorem}