In Euclidean plane geometry, Apollonius's problem is to construct circles that are tangent to three given circles in a plane (Figure 1). Apollonius of Perga (c. 262 BC – c. 190 BC) posed and solved this famous problem in his work Ἐπαφαί (Epaphaí, "Tangencies"); this work has been lost, but a 4thcentury AD report of his results by Pappus of Alexandria has survived. Three given circles generically have eight different circles that are tangent to them (Figure 2), a pair of solutions for each way to divide the three given circles in two subsets (there are 4 ways to divide a set of cardinality 3 in 2 parts).
In the 16th century, Adriaan van Roomen solved the problem using intersecting hyperbolas, but this solution does not use only straightedge and compass constructions. François Viète found such a solution by exploiting limiting cases: any of the three given circles can be shrunk to zero radius (a point) or expanded to infinite radius (a line). Viète's approach, which uses simpler limiting cases to solve more complicated ones, is considered a plausible reconstruction of Apollonius' method. The method of van Roomen was simplified by Isaac Newton, who showed that Apollonius' problem is equivalent to finding a position from the differences of its distances to three known points. This has applications in navigation and positioning systems such as LORAN.
Later mathematicians introduced algebraic methods, which transform a geometric problem into algebraic equations. These methods were simplified by exploiting symmetries inherent in the problem of Apollonius: for instance solution circles generically occur in pairs, with one solution enclosing the given circles that the other excludes (Figure 2). Joseph Diaz Gergonne used this symmetry to provide an elegant straightedge and compass solution, while other mathematicians used geometrical transformations such as reflection in a circle to simplify the configuration of the given circles. These developments provide a geometrical setting for algebraic methods (using Lie sphere geometry) and a classification of solutions according to 33 essentially different configurations of the given circles.
Apollonius' problem has stimulated much further work. Generalizations to three dimensions—constructing a sphere tangent to four given spheres—and beyond have been studied. The configuration of three mutually tangent circles has received particular attention. René Descartes gave a formula relating the radii of the solution circles and the given circles, now known as Descartes' theorem. Solving Apollonius' problem iteratively in this case leads to the Apollonian gasket, which is one of the earliest fractals to be described in print, and is important in number theory via Ford circles and the Hardy–Littlewood circle method.
The general statement of Apollonius' problem is to construct one or more circles that are tangent to three given objects in a plane, where an object may be a line, a point or a circle of any size.^{[1]}^{[2]}^{[3]}^{[4]} These objects may be arranged in any way and may cross one another; however, they are usually taken to be distinct, meaning that they do not coincide. Solutions to Apollonius' problem are sometimes called Apollonius circles, although the term is also used for other types of circles associated with Apollonius.
The property of tangency is defined as follows. First, a point, line or circle is assumed to be tangent to itself; hence, if a given circle is already tangent to the other two given objects, it is counted as a solution to Apollonius' problem. Two distinct geometrical objects are said to intersect if they have a point in common. By definition, a point is tangent to a circle or a line if it intersects them, that is, if it lies on them; thus, two distinct points cannot be tangent. If the angle between lines or circles at an intersection point is zero, they are said to be tangent; the intersection point is called a tangent point or a point of tangency. (The word "tangent" derives from the Latin present participle, tangens, meaning "touching".) In practice, two distinct circles are tangent if they intersect at only one point; if they intersect at zero or two points, they are not tangent. The same holds true for a line and a circle. Two distinct lines cannot be tangent in the plane, although two parallel lines can be considered as tangent at a point at infinity in inversive geometry (see below).^{[5]}^{[6]}
The solution circle may be either internally or externally tangent to each of the given circles. An external tangency is one where the two circles bend away from each other at their point of contact; they lie on opposite sides of the tangent line at that point, and they exclude one another. The distance between their centers equals the sum of their radii. By contrast, an internal tangency is one in which the two circles curve in the same way at their point of contact; the two circles lie on the same side of the tangent line, and one circle encloses the other. In this case, the distance between their centers equals the difference of their radii. As an illustration, in Figure 1, the pink solution circle is internally tangent to the mediumsized given black circle on the right, whereas it is externally tangent to the smallest and largest given circles on the left.
Apollonius' problem can also be formulated as the problem of locating one or more points such that the differences of its distances to three given points equal three known values. Consider a solution circle of radius r_{s} and three given circles of radii r_{1}, r_{2} and r_{3}. If the solution circle is externally tangent to all three given circles, the distances between the center of the solution circle and the centers of the given circles equal d_{1} = r_{1} + r_{s}, d_{2} = r_{2} + r_{s} and d_{3} = r_{3} + r_{s}, respectively. Therefore, differences in these distances are constants, such as d_{1} − d_{2} = r_{1} − r_{2}; they depend only on the known radii of the given circles and not on the radius r_{s} of the solution circle, which cancels out. This second formulation of Apollonius' problem can be generalized to internally tangent solution circles (for which the centercenter distance equals the difference of radii), by changing the corresponding differences of distances to sums of distances, so that the solutioncircle radius r_{s} again cancels out. The reformulation in terms of centercenter distances is useful in the solutions below of Adriaan van Roomen and Isaac Newton, and also in hyperbolic positioning or trilateration, which is the task of locating a position from differences in distances to three known points. For example, navigation systems such as LORAN identify a receiver's position from the differences in arrival times of signals from three fixed positions, which correspond to the differences in distances to those transmitters.^{[7]}^{[8]}
A rich repertoire of geometrical and algebraic methods have been developed to solve Apollonius' problem,^{[9]}^{[10]} which has been called "the most famous of all" geometry problems.^{[3]} The original approach of Apollonius of Perga has been lost, but reconstructions have been offered by François Viète and others, based on the clues in the description by Pappus of Alexandria.^{[11]}^{[12]} The first new solution method was published in 1596 by Adriaan van Roomen, who identified the centers of the solution circles as the intersection points of two hyperbolas.^{[13]}^{[14]} Van Roomen's method was refined in 1687 by Isaac Newton in his Principia,^{[15]}^{[16]} and by John Casey in 1881.^{[17]}
Although successful in solving Apollonius' problem, van Roomen's method has a drawback. A prized property in classical Euclidean geometry is the ability to solve problems using only a compass and a straightedge.^{[18]} Many constructions are impossible using only these tools, such as dividing an angle in three equal parts. However, many such "impossible" problems can be solved by intersecting curves such as hyperbolas, ellipses and parabolas (conic sections). For example, doubling the cube (the problem of constructing a cube of twice the volume of a given cube) cannot be done using only a straightedge and compass, but Menaechmus showed that the problem can be solved by using the intersections of two parabolas.^{[19]} Therefore, van Roomen's solution—which uses the intersection of two hyperbolas—did not determine if the problem satisfied the straightedgeandcompass property.
Van Roomen's friend François Viète, who had urged van Roomen to work on Apollonius' problem in the first place, developed a method that used only compass and straightedge.^{[20]} Prior to Viète's solution, Regiomontanus doubted whether Apollonius' problem could be solved by straightedge and compass.^{[21]} Viète first solved some simple special cases of Apollonius' problem, such as finding a circle that passes through three given points which has only one solution if the points are distinct; he then built up to solving more complicated special cases, in some cases by shrinking or swelling the given circles.^{[1]} According to the 4thcentury report of Pappus, Apollonius' own book on this problem—entitled Ἐπαφαί (Epaphaí, "Tangencies"; Latin: De tactionibus, De contactibus)—followed a similar progressive approach.^{[11]} Hence, Viète's solution is considered to be a plausible reconstruction of Apollonius' solution, although other reconstructions have been published independently by three different authors.^{[22]}
Several other geometrical solutions to Apollonius' problem were developed in the 19th century. The most notable solutions are those of JeanVictor Poncelet (1811)^{[23]} and of Joseph Diaz Gergonne (1814).^{[24]} Whereas Poncelet's proof relies on homothetic centers of circles and the power of a point theorem, Gergonne's method exploits the conjugate relation between lines and their poles in a circle. Methods using circle inversion were pioneered by Julius Petersen in 1879;^{[25]} one example is the annular solution method of HSM Coxeter.^{[2]} Another approach uses Lie sphere geometry,^{[26]} which was developed by Sophus Lie.
Algebraic solutions to Apollonius' problem were pioneered in the 17th century by René Descartes and Princess Elisabeth of Bohemia, although their solutions were rather complex.^{[9]} Practical algebraic methods were developed in the late 18th and 19th centuries by several mathematicians, including Leonhard Euler,^{[27]} Nicolas Fuss,^{[9]} Carl Friedrich Gauss,^{[28]} Lazare Carnot,^{[29]} and Augustin Louis Cauchy.^{[30]}
The solution of Adriaan van Roomen (1596) is based on the intersection of two hyperbolas.^{[13]}^{[14]} Let the given circles be denoted as C_{1}, C_{2} and C_{3}. Van Roomen solved the general problem by solving a simpler problem, that of finding the circles that are tangent to two given circles, such as C_{1} and C_{2}. He noted that the center of a circle tangent to both given circles must lie on a hyperbola whose foci are the centers of the given circles. To understand this, let the radii of the solution circle and the two given circles be denoted as r_{s}, r_{1} and r_{2}, respectively (Figure 3). The distance d_{1} between the centers of the solution circle and C_{1} is either r_{s} + r_{1} or r_{s} − r_{1}, depending on whether these circles are chosen to be externally or internally tangent, respectively. Similarly, the distance d_{2} between the centers of the solution circle and C_{2} is either r_{s} + r_{2} or r_{s} − r_{2}, again depending on their chosen tangency. Thus, the difference d_{1} − d_{2} between these distances is always a constant that is independent of r_{s}. This property, of having a fixed difference between the distances to the foci, characterizes hyperbolas, so the possible centers of the solution circle lie on a hyperbola. A second hyperbola can be drawn for the pair of given circles C_{2} and C_{3}, where the internal or external tangency of the solution and C_{2} should be chosen consistently with that of the first hyperbola. An intersection of these two hyperbolas (if any) gives the center of a solution circle that has the chosen internal and external tangencies to the three given circles. The full set of solutions to Apollonius' problem can be found by considering all possible combinations of internal and external tangency of the solution circle to the three given circles.
Isaac Newton (1687) refined van Roomen's solution, so that the solutioncircle centers were located at the intersections of a line with a circle.^{[15]} Newton formulates Apollonius' problem as a problem in trilateration: to locate a point Z from three given points A, B and C, such that the differences in distances from Z to the three given points have known values.^{[31]} These four points correspond to the center of the solution circle (Z) and the centers of the three given circles (A, B and C).
Instead of solving for the two hyperbolas, Newton constructs their directrix lines instead. For any hyperbola, the ratio of distances from a point Z to a focus A and to the directrix is a fixed constant called the eccentricity. The two directrices intersect at a point T, and from their two known distance ratios, Newton constructs a line passing through T on which Z must lie. However, the ratio of distances TZ/TA is also known; hence, Z also lies on a known circle, since Apollonius had shown that a circle can be defined as the set of points that have a given ratio of distances to two fixed points. (As an aside, this definition is the basis of bipolar coordinates.) Thus, the solutions to Apollonius' problem are the intersections of a line with a circle.
As described below, Apollonius' problem has ten special cases, depending on the nature of the three given objects, which may be a circle (C), line (L) or point (P). By custom, these ten cases are distinguished by three letter codes such as CCP.^{[32]} Viète solved all ten of these cases using only compass and straightedge constructions, and used the solutions of simpler cases to solve the more complex cases.^{[1]}^{[20]}
Viète began by solving the PPP case (three points) following the method of Euclid in his Elements. From this, he derived a lemma corresponding to the power of a point theorem, which he used to solve the LPP case (a line and two points). Following Euclid a second time, Viète solved the LLL case (three lines) using the angle bisectors. He then derived a lemma for constructing the line perpendicular to an angle bisector that passes through a point, which he used to solve the LLP problem (two lines and a point). This accounts for the first four cases of Apollonius' problem, those that do not involve circles.
To solve the remaining problems, Viète exploited the fact that the given circles and the solution circle may be resized in tandem while preserving their tangencies (Figure 4). If the solutioncircle radius is changed by an amount Δr, the radius of its internally tangent given circles must be likewise changed by Δr, whereas the radius of its externally tangent given circles must be changed by −Δr. Thus, as the solution circle swells, the internally tangent given circles must swell in tandem, whereas the externally tangent given circles must shrink, to maintain their tangencies.
Viète used this approach to shrink one of the given circles to a point, thus reducing the problem to a simpler, already solved case. He first solved the CLL case (a circle and two lines) by shrinking the circle into a point, rendering it an LLP case. He then solved the CLP case (a circle, a line and a point) using three lemmas. Again shrinking one circle to a point, Viète transformed the CCL case into a CLP case. He then solved the CPP case (a circle and two points) and the CCP case (two circles and a point), the latter case by two lemmas. Finally, Viète solved the general CCC case (three circles) by shrinking one circle to a point, rendering it a CCP case.
Apollonius' problem can be framed as a system of three equations for the center and radius of the solution circle.^{[33]} Since the three given circles and any solution circle must lie in the same plane, their positions can be specified in terms of the (x, y) coordinates of their centers. For example, the center positions of the three given circles may be written as (x_{1}, y_{1}), (x_{2}, y_{2}) and (x_{3}, y_{3}), whereas that of a solution circle can be written as (x_{s}, y_{s}). Similarly, the radii of the given circles and a solution circle can be written as r_{1}, r_{2}, r_{3} and r_{s}, respectively. The requirement that a solution circle must exactly touch each of the three given circles can be expressed as three coupled quadratic equations for x_{s}, y_{s} and r_{s}:
The three numbers s_{1}, s_{2} and s_{3} on the righthand side, called signs, may equal ±1, and specify whether the desired solution circle should touch the corresponding given circle internally (s = 1) or externally (s = −1). For example, in Figures 1 and 4, the pink solution is internally tangent to the mediumsized given circle on the right and externally tangent to the smallest and largest given circles on the left; if the given circles are ordered by radius, the signs for this solution are "− + −". Since the three signs may be chosen independently, there are eight possible sets of equations (2 × 2 × 2 = 8), each set corresponding to one of the eight types of solution circles.
The general system of three equations may be solved by the method of resultants. When multiplied out, all three equations have x_{s}^{2} + y_{s}^{2} on the lefthand side, and r_{s}^{2} on the righthand side. Subtracting one equation from another eliminates these quadratic terms; the remaining linear terms may be rearranged to yield formulae for the coordinates x_{s} and y_{s}
where M, N, P and Q are known functions of the given circles and the choice of signs. Substitution of these formulae into one of the initial three equations gives a quadratic equation for r_{s}, which can be solved by the quadratic formula. Substitution of the numerical value of r_{s} into the linear formulae yields the corresponding values of x_{s} and y_{s}.
The signs s_{1}, s_{2} and s_{3} on the righthand sides of the equations may be chosen in eight possible ways, and each choice of signs gives up to two solutions, since the equation for r_{s} is quadratic. This might suggest (incorrectly) that there are up to sixteen solutions of Apollonius' problem. However, due to a symmetry of the equations, if (r_{s}, x_{s}, y_{s}) is a solution, with signs s_{i}, then so is (−r_{s}, x_{s}, y_{s}), with opposite signs −s_{i}, which represents the same solution circle. Therefore, Apollonius' problem has at most eight independent solutions (Figure 2). One way to avoid this doublecounting is to consider only solution circles with nonnegative radius.
The two roots of any quadratic equation may be of three possible types: two different real numbers, two identical real numbers (i.e., a degenerate double root), or a pair of complex conjugate roots. The first case corresponds to the usual situation; each pair of roots corresponds to a pair of solutions that are related by circle inversion, as described below (Figure 6). In the second case, both roots are identical, corresponding to a solution circle that transforms into itself under inversion. In this case, one of the given circles is itself a solution to the Apollonius problem, and the number of distinct solutions is reduced by one. The third case of complex conjugate radii does not correspond to a geometrically possible solution for Apollonius' problem, since a solution circle cannot have an imaginary radius; therefore, the number of solutions is reduced by two. Apollonius' problem cannot have seven solutions, although it may have any other number of solutions from zero to eight.^{[12]}^{[34]}
The same algebraic equations can be derived in the context of Lie sphere geometry.^{[26]} That geometry represents circles, lines and points in a unified way, as a fivedimensional vector X = (v, c_{x}, c_{y}, w, sr), where c = (c_{x}, c_{y}) is the center of the circle, and r is its (nonnegative) radius. If r is not zero, the sign s may be positive or negative; for visualization, s represents the orientation of the circle, with counterclockwise circles having a positive s and clockwise circles having a negative s. The parameter w is zero for a straight line, and one otherwise.
In this fivedimensional world, there is a bilinear product similar to the dot product:
The Lie quadric is defined as those vectors whose product with themselves (their square norm) is zero, (XX) = 0. Let X_{1} and X_{2} be two vectors belonging to this quadric; the norm of their difference equals
The product distributes over addition and subtraction (more precisely, it is bilinear):
Since (X_{1}X_{1}) = (X_{2}X_{2}) = 0 (both belong to the Lie quadric) and since w_{1} = w_{2} = 1 for circles, the product of any two such vectors on the quadric equals
where the vertical bars sandwiching c_{1} − c_{2} represent the length of that difference vector, i.e., the Euclidean norm. This formula shows that if two quadric vectors X_{1} and X_{2} are orthogonal (perpendicular) to one another—that is, if (X_{1}X_{2}) = 0—then their corresponding circles are tangent. For if the two signs s_{1} and s_{2} are the same (i.e. the circles have the same "orientation"), the circles are internally tangent; the distance between their centers equals the difference in the radii
Conversely, if the two signs s_{1} and s_{2} are different (i.e. the circles have opposite "orientations"), the circles are externally tangent; the distance between their centers equals the sum of the radii
Therefore, Apollonius' problem can be restated in Lie geometry as a problem of finding perpendicular vectors on the Lie quadric; specifically, the goal is to identify solution vectors X_{sol} that belong to the Lie quadric and are also orthogonal (perpendicular) to the vectors X_{1}, X_{2} and X_{3} corresponding to the given circles.
The advantage of this restatement is that one can exploit theorems from linear algebra on the maximum number of linearly independent, simultaneously perpendicular vectors. This gives another way to calculate the maximum number of solutions and extend the theorem to higherdimensional spaces.^{[26]}^{[35]}
A natural setting for problem of Apollonius is inversive geometry.^{[4]}^{[12]} The basic strategy of inversive methods is to transform a given Apollonius problem into another Apollonius problem that is simpler to solve; the solutions to the original problem are found from the solutions of the transformed problem by undoing the transformation. Candidate transformations must change one Apollonius problem into another; therefore, they must transform the given points, circles and lines to other points, circles and lines, and no other shapes. Circle inversion has this property and allows the center and radius of the inversion circle to be chosen judiciously. Other candidates include the Euclidean plane isometries; however, they do not simplify the problem, since they merely shift, rotate, and mirror the original problem.
Inversion in a circle with center O and radius R consists of the following operation (Figure 5): every point P is mapped into a new point P' such that O, P, and P' are collinear, and the product of the distances of P and P' to the center O equal the radius R squared
Thus, if P lies outside the circle, then P' lies within, and vice versa. When P is the same as O, the inversion is said to send P to infinity. (In complex analysis, "infinity" is defined in terms of the Riemann sphere.) Inversion has the useful property that lines and circles are always transformed into lines and circles, and points are always transformed into points. Circles are generally transformed into other circles under inversion; however, if a circle passes through the center of the inversion circle, it is transformed into a straight line, and vice versa. Importantly, if a circle crosses the circle of inversion at right angles (intersects perpendicularly), it is left unchanged by the inversion; it is transformed into itself.
Circle inversions correspond to a subset of Möbius transformations on the Riemann sphere. The planar Apollonius problem can be transferred to the sphere by an inverse stereographic projection; hence, solutions of the planar Apollonius problem also pertain to its counterpart on the sphere. Other inversive solutions to the planar problem are possible besides the common ones described below.^{[36]}
Solutions to Apollonius's problem generally occur in pairs; for each solution circle, there is a conjugate solution circle (Figure 6).^{[1]} One solution circle excludes the given circles that are enclosed by its conjugate solution, and vice versa. For example, in Figure 6, one solution circle (pink, upper left) encloses two given circles (black), but excludes a third; conversely, its conjugate solution (also pink, lower right) encloses that third given circle, but excludes the other two. The two conjugate solution circles are related by inversion, by the following argument.
In general, any three distinct circles have a unique circle—the radical circle—that intersects all of them perpendicularly; the center of that circle is the radical center of the three circles.^{[4]} For illustration, the orange circle in Figure 6 crosses the black given circles at right angles. Inversion in the radical circle leaves the given circles unchanged, but transforms the two conjugate pink solution circles into one another. Under the same inversion, the corresponding points of tangency of the two solution circles are transformed into one another; for illustration, in Figure 6, the two blue points lying on each green line are transformed into one another. Hence, the lines connecting these conjugate tangent points are invariant under the inversion; therefore, they must pass through the center of inversion, which is the radical center (green lines intersecting at the orange dot in Figure 6).
If two of the three given circles do not intersect, a center of inversion can be chosen so that those two given circles become concentric.^{[2]}^{[12]} Under this inversion, the solution circles must fall within the annulus between the two concentric circles. Therefore, they belong to two oneparameter families. In the first family (Figure 7), the solutions do not enclose the inner concentric circle, but rather revolve like ball bearings in the annulus. In the second family (Figure 8), the solution circles enclose the inner concentric circle. There are generally four solutions for each family, yielding eight possible solutions, consistent with the algebraic solution.
When two of the given circles are concentric, Apollonius's problem can be solved easily using a method of Gauss.^{[28]} The radii of the three given circles are known, as is the distance d_{non} from the common concentric center to the nonconcentric circle (Figure 7). The solution circle can be determined from its radius r_{s}, the angle θ, and the distances d_{s} and d_{T} from its center to the common concentric center and the center of the nonconcentric circle, respectively. The radius and distance d_{s} are known (Figure 7), and the distance d_{T} = r_{s} ± r_{non}, depending on whether the solution circle is internally or externally tangent to the nonconcentric circle. Therefore, by the law of cosines,
Here, a new constant C has been defined for brevity, with the subscript indicating whether the solution is externally or internally tangent. A simple trigonometric rearrangement yields the four solutions
This formula represents four solutions, corresponding to the two choices of the sign of θ, and the two choices for C. The remaining four solutions can be obtained by the same method, using the substitutions for r_{s} and d_{s} indicated in Figure 8. Thus, all eight solutions of the general Apollonius problem can be found by this method.
Any initial two disjoint given circles can be rendered concentric as follows. The radical axis of the two given circles is constructed; choosing two arbitrary points P and Q on this radical axis, two circles can be constructed that are centered on P and Q and that intersect the two given circles orthogonally. These two constructed circles intersect each other in two points. Inversion in one such intersection point F renders the constructed circles into straight lines emanating from F and the two given circles into concentric circles, with the third given circle becoming another circle (in general). This follows because the system of circles is equivalent to a set of Apollonian circles, forming a bipolar coordinate system.
The usefulness of inversion can be increased significantly by resizing.^{[37]}^{[38]} As noted in Viète's reconstruction, the three given circles and the solution circle can be resized in tandem while preserving their tangencies. Thus, the initial Apollonius problem is transformed into another problem that may be easier to solve. For example, the four circles can be resized so that one given circle is shrunk to a point; alternatively, two given circles can often be resized so that they are tangent to one another. Thirdly, given circles that intersect can be resized so that they become nonintersecting, after which the method for inverting to an annulus can be applied. In all such cases, the solution of the original Apollonius problem is obtained from the solution of the transformed problem by undoing the resizing and inversion.
In the first approach, the given circles are shrunk or swelled (appropriately to their tangency) until one given circle is shrunk to a point P.^{[37]} In that case, Apollonius' problem degenerates to the CCP limiting case, which is the problem of finding a solution circle tangent to the two remaining given circles that passes through the point P. Inversion in a circle centered on P transforms the two given circles into new circles, and the solution circle into a line. Therefore, the transformed solution is a line that is tangent to the two transformed given circles. There are four such solution lines, which may be constructed from the external and internal homothetic centers of the two circles. Reinversion in P and undoing the resizing transforms such a solution line into the desired solution circle of the original Apollonius problem. All eight general solutions can be obtained by shrinking and swelling the circles according to the differing internal and external tangencies of each solution; however, different given circles may be shrunk to a point for different solutions.
In the second approach, the radii of the given circles are modified appropriately by an amount Δr so that two of them are tangential (touching).^{[38]} Their point of tangency is chosen as the center of inversion in a circle that intersects each of the two touching circles in two places. Upon inversion, the touching circles become two parallel lines: Their only point of intersection is sent to infinity under inversion, so they cannot meet. The same inversion transforms the third circle into another circle. The solution of the inverted problem must either be (1) a straight line parallel to the two given parallel lines and tangent to the transformed third given circle; or (2) a circle of constant radius that is tangent to the two given parallel lines and the transformed given circle. Reinversion and adjusting the radii of all circles by Δr produces a solution circle tangent to the original three circles.
Gergonne's approach is to consider the solution circles in pairs.^{[1]} Let a pair of solution circles be denoted as C_{A} and C_{B} (the pink circles in Figure 6), and let their tangent points with the three given circles be denoted as A_{1}, A_{2}, A_{3}, and B_{1}, B_{2}, B_{3}, respectively. Gergonne's solution aims to locate these six points, and thus solve for the two solution circles.
Gergonne's insight was that if a line L_{1} could be constructed such that A_{1} and B_{1} were guaranteed to fall on it, those two points could be identified as the intersection points of L_{1} with the given circle C_{1} (Figure 6). The remaining four tangent points would be located similarly, by finding lines L_{2} and L_{3} that contained A_{2} and B_{2}, and A_{3} and B_{3}, respectively. To construct a line such as L_{1}, two points must be identified that lie on it; but these points need not be the tangent points. Gergonne was able to identify two other points for each of the three lines. One of the two points has already been identified: the radical center G lies on all three lines (Figure 6).
To locate a second point on the lines L_{1}, L_{2} and L_{3}, Gergonne noted a reciprocal relationship between those lines and the radical axis R of the solution circles, C_{A} and C_{B}. To understand this reciprocal relationship, consider the two tangent lines to the circle C_{1} drawn at its tangent points A_{1} and B_{1} with the solution circles; the intersection of these tangent lines is the pole point of L_{1} in C_{1}. Since the distances from that pole point to the tangent points A_{1} and B_{1} are equal, this pole point must also lie on the radical axis R of the solution circles, by definition (Figure 9). The relationship between pole points and their polar lines is reciprocal; if the pole of L_{1} in C_{1} lies on R, the pole of R in C_{1} must conversely lie on L_{1}. Thus, if we can construct R, we can find its pole P_{1} in C_{1}, giving the needed second point on L_{1} (Figure 10).
Gergonne found the radical axis R of the unknown solution circles as follows. Any pair of circles has two centers of similarity; these two points are the two possible intersections of two tangent lines to the two circles. Therefore, the three given circles have six centers of similarity, two for each distinct pair of given circles. Remarkably, these six points lie on four lines, three points on each line; moreover, each line corresponds to the radical axis of a potential pair of solution circles. To show this, Gergonne considered lines through corresponding points of tangency on two of the given circles, e.g., the line defined by A_{1}/A_{2} and the line defined by B_{1}/B_{2}. Let X_{3} be a center of similitude for the two circles C_{1} and C_{2}; then, A_{1}/A_{2} and B_{1}/B_{2} are pairs of antihomologous points, and their lines intersect at X_{3}. It follows, therefore, that the products of distances are equal
which implies that X_{3} lies on the radical axis of the two solution circles. The same argument can be applied to the other pairs of circles, so that three centers of similitude for the given three circles must lie on the radical axes of pairs of solution circles.
In summary, the desired line L_{1} is defined by two points: the radical center G of the three given circles and the pole in C_{1} of one of the four lines connecting the homothetic centers. Finding the same pole in C_{2} and C_{3} gives L_{2} and L_{3}, respectively; thus, all six points can be located, from which one pair of solution circles can be found. Repeating this procedure for the remaining three homotheticcenter lines yields six more solutions, giving eight solutions in all. However, if a line L_{k} does not intersect its circle C_{k} for some k, there is no pair of solutions for that homotheticcenter line.
The techniques of modern algebraic geometry, and in particular intersection theory, can be used to solve Apollonius's problem. In this approach, the problem is reinterpreted as a statement about circles in the complex projective plane. Solutions involving complex numbers are allowed and degenerate situations are counted with multiplicity. When this is done, there are always eight solutions to the problem.^{[39]}
Every quadratic equation in X, Y, and Z determines a unique conic, its vanishing locus. Conversely, every conic in the complex projective plane has an equation, and that equation is unique up to an overall scaling factor (because rescaling an equation does not change its vanishing locus). Therefore, the set of all conics may be parametrized by fivedimensional projective space P^{5}, where the correspondence is
A circle in the complex projective plane is defined to be a conic that passes through the two points O_{+} = [1 : i : 0] and O_{−} = [1 : −i : 0], where i denotes a square root of −1. The points O_{+} and O_{−} are called the circular points. The projective variety of all circles is the subvariety of P^{5} consisting of those points which correspond to conics passing through the circular points. Substituting the circular points into the equation for a generic conic yields the two equations
Taking the sum and difference of these equations shows that it is equivalent to impose the conditions
Therefore, the variety of all circles is a threedimensional linear subspace of P^{5}. After rescaling and completing the square, these equations also demonstrate that every conic passing through the circular points has an equation of the form
which is the homogenization of the usual equation of a circle in the affine plane. Therefore, studying circles in the above sense is nearly equivalent to studying circles in the conventional sense. The only difference is that the above sense permits degenerate circles which are the union of two lines. The nondegenerate circles are called smooth circles, while the degenerate ones are called singular circles. There are two types of singular circles. One is the union of the line at infinity Z = 0 with another line in the projective plane (possibly the line at infinity again), and the other is union of two lines in the projective plane, one through each of the two circular points. These are the limits of smooth circles as the radius r tends to +∞ and 0, respectively. In the latter case, no point on either of the two lines has real coordinates except for the origin [0 : 0 : 1].
Let D be a fixed smooth circle. If C is any other circle, then, by the definition of a circle, C and D intersect at the circular points O_{+} and O_{−}. Because C and D are conics, Bézout's theorem implies C and D intersect in four points total, when those points are counted with the proper intersection multiplicity. That is, there are four points of intersection O_{+}, O_{−}, P, and Q, but some of these points might collide. Appolonius' problem is concerned with the situation where P = Q, meaning that the intersection multiplicity at that point is 2; if P is also equal to a circular point, this should be interpreted as the intersection multiplicity being 3.
Let Z_{D} be the variety of circles tangent to D. This variety is a quadric cone in the P^{3} of all circles. To see this, consider the incidence correspondence
For a curve that is the vanishing locus of a single equation f = 0, the condition that the curve meets D at r with multiplicity m means that the Taylor series expansion of f_{D} vanishes to order m at r; it is therefore m linear conditions on the coefficients of f. This shows that, for each r, the fiber of Φ over r is a P^{1} cut out by two linear equations in the space of circles. Consequently, Φ is irreducible of dimension 2. Since it is possible to exhibit a circle that is tangent to D at only a single point, a generic element of Z_{D} must be tangent at only a single point. Therefore, the projection Φ → P^{2} sending (r, C) to C is a birational morphism. It follows that the image of Φ, which is Z_{D}, is also irreducible and two dimensional.
To determine the shape of Z_{D}, fix two distinct circles C_{0} and C_{∞}, not necessarily tangent to D. These two circles determine a pencil, meaning a line L in the P^{3} of circles. If the equations of C_{0} and C_{∞} are f and g, respectively, then the points on L correspond to the circles whose equations are Sf + Tg, where [S : T] is a point of P^{1}. The points where L meets Z_{D} are precisely the circles in the pencil that are tangent to D.
There are two possibilities for the number of points of intersections. One is that either f or g, say f, is the equation for D. In this case, L is a line through D. If C_{∞} is tangent to D, then so is every circle in the pencil, and therefore L is contained in Z_{D}. The other possibility is that neither f nor g is the equation for D. In this case, the function (f / g)_{D} is a quotient of quadratics, neither of which vanishes identically. Therefore, it vanishes at two points and has poles at two points. These are the points in C_{0} ∩ D and C_{∞} ∩ D, respectively, counted with multiplicity and with the circular points deducted. The rational function determines a morphism D → P^{1} of degree two. The fiber over [S : T] ∈ P^{1} is the set of points P for which f(P)T = g(P)S. These are precisely the points at which the circle whose equation is Tf − Sg meets D. The branch points of this morphism are the circles tangent to D. By the Riemann–Hurwitz formula, there are precisely two branch points, and therefore L meets Z_{D} in two points. Together, these two possibilities for the intersection of L and Z_{D} demonstrate that Z_{D} is a quadric cone. All such cones in P^{3} are the same up to a change of coordinates, so this completely determines the shape of Z_{D}.
To conclude the argument, let D_{1}, D_{2}, and D_{3} be three circles. If the intersection Z_{D1} ∩ Z_{D2} ∩ Z_{D3} is finite, then it has degree 2^{3} = 8, and therefore there are eight solutions to the problem of Apollonius, counted with multiplicity. To prove that the intersection is generically finite, consider the incidence correspondence
There is a morphism which projects Ψ onto its final factor of P^{3}. The fiber over C is Z_{C}^{3}. This has dimension 6, so Ψ has dimension 9. Because (P^{3})^{3} also has dimension 9, the generic fiber of the projection from Ψ to the first three factors cannot have positive dimension. This proves that generically, there are eight solutions counted with multiplicity. Since it is possible to exhibit a configuration where the eight solutions are distinct, the generic configuration must have all eight solutions distinct.
In the generic problem with eight solution circles, The reciprocals of the radii of four of the solution circles sum to the same value as do the reciprocals of the radii of the other four solution circles ^{[40]}
Main article: Special cases of Apollonius' problem 
Apollonius problem is to construct one or more circles tangent to three given objects in a plane, which may be circles, points, or lines. This gives rise to ten types of Apollonius' problem, one corresponding to each combination of circles, lines and points, which may be labeled with three letters, either C, L, or P, to denote whether the given elements are a circle, line or point, respectively (Table 1).^{[32]} As an example, the type of Apollonius problem with a given circle, line, and point is denoted as CLP.
Some of these special cases are much easier to solve than the general case of three given circles. The two simplest cases are the problems of drawing a circle through three given points (PPP) or tangent to three lines (LLL), which were solved first by Euclid in his Elements. For example, the PPP problem can be solved as follows. The center of the solution circle is equally distant from all three points, and therefore must lie on the perpendicular bisector line of any two. Hence, the center is the point of intersection of any two perpendicular bisectors. Similarly, in the LLL case, the center must lie on a line bisecting the angle at the three intersection points between the three given lines; hence, the center lies at the intersection point of two such angle bisectors. Since there are two such bisectors at every intersection point of the three given lines, there are four solutions to the general LLL problem.
Points and lines may be viewed as special cases of circles; a point can be considered as a circle of infinitely small radius, and a line may be thought of an infinitely large circle whose center is also at infinity. From this perspective, the general Apollonius problem is that of constructing circles tangent to three given circles. The nine other cases involving points and lines may be viewed as limiting cases of the general problem.^{[32]}^{[12]} These limiting cases often have fewer solutions than the general problem; for example, the replacement of a given circle by a given point halves the number of solutions, since a point can be construed as an infinitesimal circle that is either internally or externally tangent.
Index  Code  Given Elements  Number of solutions (in general) 
Example (solution in pink; given objects in black) 

1  PPP  three points  1  
2  LPP  one line and two points  2  
3  LLP  two lines and a point  2  
4  CPP  one circle and two points  2  
5  LLL  three lines  4  
6  CLP  one circle, one line, and a point  4  
7  CCP  two circles and a point  4  
8  CLL  one circle and two lines  8  
9  CCL  two circles and a line  8  
10  CCC  three circles (the classic problem)  8 
The problem of counting the number of solutions to different types of Apollonius' problem belongs to the field of enumerative geometry.^{[12]}^{[41]} The general number of solutions for each of the ten types of Apollonius' problem is given in Table 1 above. However, special arrangements of the given elements may change the number of solutions. For illustration, Apollonius' problem has no solution if one circle separates the two (Figure 11); to touch both the solid given circles, the solution circle would have to cross the dashed given circle; but that it cannot do, if it is to touch the dashed circle tangentially. Conversely, if three given circles are all tangent at the same point, then any circle tangent at the same point is a solution; such Apollonius problems have an infinite number of solutions. If any of the given circles are identical, there is likewise an infinity of solutions. If only two given circles are identical, there are only two distinct given circles; the centers of the solution circles form a hyperbola, as used in one solution to Apollonius' problem.
An exhaustive enumeration of the number of solutions for all possible configurations of three given circles, points or lines was first undertaken by Muirhead in 1896,^{[42]} although earlier work had been done by Stoll^{[43]} and Study.^{[44]} However, Muirhead's work was incomplete; it was extended in 1974^{[45]} and a definitive enumeration, with 33 distinct cases, was published in 1983.^{[12]} Although solutions to Apollonius' problem generally occur in pairs related by inversion, an odd number of solutions is possible in some cases, e.g., the single solution for PPP, or when one or three of the given circles are themselves solutions. (An example of the latter is given in the section on Descartes' theorem.) However, there are no Apollonius problems with seven solutions.^{[34]}^{[43]} Alternative solutions based on the geometry of circles and spheres have been developed and used in higher dimensions.^{[26]}^{[35]}
If the three given circles are mutually tangent, Apollonius' problem has five solutions. Three solutions are the given circles themselves, since each is tangent to itself and to the other two given circles. The remaining two solutions (shown in red in Figure 12) correspond to the inscribed and circumscribed circles, and are called Soddy's circles.^{[46]} This special case of Apollonius' problem is also known as the four coins problem.^{[47]} The three given circles of this Apollonius problem form a Steiner chain tangent to the two Soddy's circles.
Either Soddy circle, when taken together with the three given circles, produces a set of four circles that are mutually tangent at six points. The radii of these four circles are related by an equation known as Descartes' theorem. In a 1643 letter to Princess Elizabeth of Bohemia,^{[48]} René Descartes showed that
where k_{s} = 1/r_{s} and r_{s} are the curvature and radius of the solution circle, respectively, and similarly for the curvatures k_{1}, k_{2} and k_{3} and radii r_{1}, r_{2} and r_{3} of the three given circles. For every set of four mutually tangent circles, there is a second set of four mutually tangent circles that are tangent at the same six points.^{[2]}^{[49]}
Descartes' theorem was rediscovered independently in 1826 by Jakob Steiner,^{[50]} in 1842 by Philip Beecroft,^{[2]}^{[49]} and again in 1936 by Frederick Soddy.^{[51]} Soddy published his findings in the scientific journal Nature as a poem, The Kiss Precise, of which the first two stanzas are reproduced below. The first stanza describes Soddy's circles, whereas the second stanza gives Descartes' theorem. In Soddy's poem, two circles are said to "kiss" if they are tangent, whereas the term "bend" refers to the curvature k of the circle.


Sundry extensions of Descartes' theorem have been derived by Daniel Pedoe.^{[52]}
Apollonius' problem can be extended to construct all the circles that intersect three given circles at a precise angle θ, or at three specified crossing angles θ_{1}, θ_{2} and θ_{3};^{[50]} the ordinary Apollonius' problem corresponds to a special case in which the crossing angle is zero for all three given circles. Another generalization is the dual of the first extension, namely, to construct circles with three specified tangential distances from the three given circles.^{[26]}
Apollonius' problem can be extended from the plane to the sphere and other quadratic surfaces. For the sphere, the problem is to construct all the circles (the boundaries of spherical caps) that are tangent to three given circles on the sphere.^{[24]}^{[53]}^{[54]} This spherical problem can be rendered into a corresponding planar problem using stereographic projection. Once the solutions to the planar problem have been constructed, the corresponding solutions to the spherical problem can be determined by inverting the stereographic projection. Even more generally, one can consider the problem of four tangent curves that result from the intersections of an arbitrary quadratic surface and four planes, a problem first considered by Charles Dupin.^{[9]}
By solving Apollonius' problem repeatedly to find the inscribed circle, the interstices between mutually tangential circles can be filled arbitrarily finely, forming an Apollonian gasket, also known as a Leibniz packing or an Apollonian packing.^{[55]} This gasket is a fractal, being selfsimilar and having a dimension d that is not known exactly but is roughly 1.3,^{[56]} which is higher than that of a regular (or rectifiable) curve (d = 1) but less than that of a plane (d = 2). The Apollonian gasket was first described by Gottfried Leibniz in the 17th century, and is a curved precursor of the 20thcentury Sierpiński triangle.^{[57]} The Apollonian gasket also has deep connections to other fields of mathematics; for example, it is the limit set of Kleinian groups.^{[58]}
The configuration of a circle tangent to four circles in the plane has special properties, which have been elucidated by Larmor (1891)^{[59]} and Lachlan (1893).^{[60]} Such a configuration is also the basis for Casey's theorem,^{[17]} itself a generalization of Ptolemy's theorem.^{[37]}
The extension of Apollonius' problem to three dimensions, namely, the problem of finding a fifth sphere that is tangent to four given spheres, can be solved by analogous methods.^{[9]} For example, the given and solution spheres can be resized so that one given sphere is shrunk to point while maintaining tangency.^{[38]} Inversion in this point reduces Apollonius' problem to finding a plane that is tangent to three given spheres. There are in general eight such planes, which become the solutions to the original problem by reversing the inversion and the resizing. This problem was first considered by Pierre de Fermat,^{[61]} and many alternative solution methods have been developed over the centuries.^{[62]}
Apollonius' problem can even be extended to d dimensions, to construct the hyperspheres tangent to a given set of d + 1 hyperspheres.^{[41]} Following the publication of Frederick Soddy's rederivation of the Descartes theorem in 1936, several people solved (independently) the mutually tangent case corresponding to Soddy's circles in d dimensions.^{[63]}
The principal application of Apollonius' problem, as formulated by Isaac Newton, is hyperbolic trilateration, which seeks to determine a position from the differences in distances to at least three points.^{[8]} For example, a ship may seek to determine its position from the differences in arrival times of signals from three synchronized transmitters. Solutions to Apollonius' problem were used in World War I to determine the location of an artillery piece from the time a gunshot was heard at three different positions,^{[9]} and hyperbolic trilateration is the principle used by the Decca Navigator System and LORAN.^{[7]} Similarly, the location of an aircraft may be determined from the difference in arrival times of its transponder signal at four receiving stations. This multilateration problem is equivalent to the threedimensional generalization of Apollonius' problem and applies to global navigation satellite systems (see GPS#Geometric interpretation).^{[31]} It is also used to determine the position of calling animals (such as birds and whales), although Apollonius' problem does not pertain if the speed of sound varies with direction (i.e., the transmission medium not isotropic).^{[64]}
Apollonius' problem has other applications. In Book 1, Proposition 21 in his Principia, Isaac Newton used his solution of Apollonius' problem to construct an orbit in celestial mechanics from the center of attraction and observations of tangent lines to the orbit corresponding to instantaneous velocity.^{[9]} The special case of the problem of Apollonius when all three circles are tangent is used in the Hardy–Littlewood circle method of analytic number theory to construct Hans Rademacher's contour for complex integration, given by the boundaries of an infinite set of Ford circles each of which touches several others.^{[65]} Finally, Apollonius' problem has been applied to some types of packing problems, which arise in disparate fields such as the errorcorrecting codes used on DVDs and the design of pharmaceuticals that bind in a particular enzyme of a pathogenic bacterium.^{[66]}