This article explores the basic properties of inversive geometry from a computational point of view as a starting point toward the development of non-Euclidean applications to a variety of selected themes. Topics included in this part are involutions, generalized circles, and the inversion of segments, arcs, triangles, and quadrilaterals. The application themes are to Nicomachus’s theorem, the inversion of tilings made by regular polygons, and an inversive spirograph.
Euclid’s Elements marked a revolutionary achievement in the development of mathematics and is by far the most famous and most often printed mathematical work of all time, making its author the most celebrated mathematician ever. Bertrand Russell said about this work, “I had not imagined that there was anything so delicious in the world.” The thirteen books of the Elements deal with a systematic gathering and orderly presentation of the mathematical thought up to when it was written, around 300 BC. Euclid’s merit consists in offering a wealth of original and fundamental ideas from a few axioms, using a methodology involving definitions, lemmas, theorems, corollaries, and postulates. He introduced a style of proof for mathematics. The Elements contains “the oldest nontrivial algorithm that has survived to the present day” , namely Euclid’s algorithm to compute the GCD of two natural numbers. Euclidean geometry is based on the tradition of the Elements. Non-Euclidean geometry arose from trying to prove the fifth (or the parallel) postulate, which states that through a given point there can pass only one line parallel to another given line. After centuries of unsuccessful attempts at deriving this postulate from the others, its independence was eventually demonstrated by Beltrami in 1868. In non-Euclidean geometry, this postulate is negated (either by allowing none or a multiplicity of parallels), following the ideas of Bolyai, Lobachevsky, Gauss (who coined the term non-Euclidean geometry), Riemann, Klein, and Hilbert, among others.
The approach to computational non-Euclidean geometry in this series of articles is toward the design of algorithms arising from problems set in the context of non-Euclidean geometry. The emphasis is placed on verification and algorithmic implementation, visualization, and testing. In the opinion of the author, inversive geometry is the natural starting point to introduce non-Euclidean ideas. The author of  describes the technique of inversion as a “dark art.” A suitable interpretation of this description is offered by  as “an advanced technique, which can offer considerable advantage in solving certain problems.” This article examines the basic properties of inversive geometry, starting from the introduction of involutions and the family of generalized circles, the inversion of segments, arcs, triangles, and quadrilaterals with applications to Nicomachus’s theorem, the inversion of tilings made by regular polygons, and an inversive spirograph. This work extends and complements the material in [4, 5, 6].
A transformation that is not the identity with the property that is called an involution or an involutory transformation, self-inverse, or of period two. Familiar examples of involutions are multiplication by and the taking of reciprocals in arithmetic, taking complements in set theory, conjugation of complex numbers (i.e., , if and are real), geometrical reflection in a line, the matrix transpose and inverse, and the mapping of a number into , with an arbitrary number.
An important example of an involution involves permutations. A permutation under the operation of group composition is an involution if it is of order 2; that is, if it can be written as a product of disjoint transpositions (cycles of length 2). For example, the 7-permutation maps , , , , , , ; it factors into cycles as or, leaving out the fixed points 2, 3, 4, as .
The number of involutory -permutations grows quickly with .
These numbers can also be readily obtained by solving a recurrence equation .
Consider the involution reversion, , which maps a nonzero complex number to its reciprocal. Let be the unit circle given by the equation or , with . It is easy to see that maps the interior of to its exterior and vice versa; that is, iff . Moreover, iff . Reversion maps the number into the number , where is the conjugate of . Considering a complex number as a point in the complex plane, if a point is close to the origin, its reversion is far away, and vice versa.
The involution inversion, , is similar to reversion. For inversion, and are collinear for nonzero . The point inverts to the point .
The following Manipulate compares reversion, inversion, and some similar transformations. Drag the point ; the arrow starts at and ends at for the chosen transformation ; the interior of is colored blue. The transformations can be expanded into the form , with and real.
Generalized Circles and Ellipses
A linear transformation maps the family of lines to itself. The following theorem suggests a family that may be preserved by inversion.
Applying the transformation corresponding to inversion of Cartesian points verifies this.
Let be the set of points that satisfy the first equation in theorem 1. This four-parameter family includes points (for instance, when and ), lines (when ), circles (when ), the whole plane (when ), and the empty set (when ).
Define a generalized circle to be a line or circle. (The function genCircle defined below constructs the graphics objects to draw the line or circle.) Under inversion, the generalized circle transforms into the generalized circle . If , (and , are not simultaneously 0), then is a line. If , the equation corresponds to a circle of center and radius , provided that . If , passes through the origin. For any nonzero , is the same as . Other families of polynomials in two variables that include generalized circles do not transform their members into members of the same family; that is, they are not closed under inversion. For instance, the six-parameter family of equations includes conic sections, but some invert into quartics.
The parameters needed for the description of such a line are obtained by solving the following equation.
This result is readily obtained by simply expanding the Cartesian equation of such a circle.
From a structural point of view, if a generalized circle is mapped into itself, it is said to be preserved by inversion. (Warning: that is not the same as saying that a point on a generalized circle is mapped to itself; for instance, a rotation about the center of a circle preserves the circle but moves each point of the circle.) In that case, . If , the line passes through the origin and each point is inverted into its negative. If , and , the circle is preserved. Assume its center is at a point of the form . Then, in particular, the point is inverted into the point .
Hence ; that is, the origin, center, and either of the two intersection points of the circle and the unit circle form a right triangle; hence the circle is orthogonal to . This condition turns out to be necessary and sufficient for a generalized circle to be preserved. Theorem 1 implies the following results, which also apply conversely.
- Any circle not passing through the origin inverts into a circle not passing through the origin (in fact passing through its intersection points with the unit circle , if any).
- Any circle passing through the origin inverts into a line not passing through the origin (in fact passing through its intersection points with , if any; in general, this line is parallel to the tangent of the circle at the origin).
- Any line passing through the origin is preserved by inversion (any point is mapped into its negative).
- Any line not passing through the origin inverts into a circle passing through the origin (and its intersection points with , if any).
To make inversion continuous, define the inversion of the origin to be a legal point, the “point at infinite,” , making the phrase “nonzero” unnecessary when talking about inversion. Inversion is thus a one-to-one map of the extended plane.
Conversions of generalized circles to and from graphics primitives are handled by the following functions.
For example, the following Manipulate shows how a line and a circle behave under inversion. To vary their positions, drag the two small disks. For a line, the disks are points on the line; for a circle, one disk is the center and the other is on the circumference. You can also choose a family of parallel lines or a family of concentric circles. The arrows show the action of the inversion on the two control points.
Concentric circles do not invert into concentric circles, and the center of a circle does not invert into the center of its inversion (although the two centers are collinear with the origin). The center of the inverted circle can even be outside the original circle! (This particularly applies to ; its interior gets mapped into its exterior and its center gets mapped to .) The next section shows how to locate the center of the inversion of a given circle.
As a circle is an ellipse, it is interesting to see the inversion of a general ellipse. The following Manipulate shows such an inversion; you can drag the center of the ellipse with a locator and vary the lengths of its axes with a pair of sliders. Contour lines showing concentric ellipses are optional; increase the zoom slider if the display is all one color.
Inversion in an Arbitrary Circle
Up to now, inversion has been in the unit circle; it can be generalized to use any circle . Temporarily using complex numbers to represent points in the plane, assume has center and radius . The generalization takes three steps: first transform into by translating to the origin and scaling by . Second, invert in . Third, scale back by and translate back by . As these operations are rigid motions, all the properties of inversion apply to the generalized inversion. Generalized inversion is implemented by the function invZ.
The explicit Cartesian coordinates for inverting points come from expanding the following expression.
Then, operating with Cartesian coordinates, the function inver inverts a given point in .
For example, the functions give matching results when applied to corresponding representations of the same point in the plane. The latter form is more convenient here.
An interesting property of inversion is adopted by many authors as an alternative way of defining inversion. Let be the inversion of the point in the circle . It is easy to verify that the product of the distance of to and the distance of to is a constant equal to .
Therefore, define the point as the inverse of if is that unique point such that its distance to times the distance of to is .
Before obtaining the Cartesian coordinates corresponding to inverting circles and lines, first consider the following problem. What is the center of the circle through three different noncollinear points , , ?
The function disSq computes the square of the distance between two given points , and is used by the function cir3 that computes the required center.
For example, here is an explicit formula for the center of such a circle through , , and .
This is its radius.
The denominators of the expressions for the center and radius contain a factor that is zero only when , , and are collinear.
Now consider an arbitrary circle that does not pass through the center of . Invert in to and then invert in to . Then the inversion of in is a circle with center . The equality of the following two results verifies this property.
The vertical bars in the last expression have two different meanings: the modulus of a vector and the absolute value of a number. Theorem 4 arises from using the property mentioned in the previous paragraph. First we obtain the square of the radius of .
Match the center of with to get the following.
So a circle is inverted into a concentric circle if is outside the circle of inversion and . This implies that and are orthogonal. Therefore, a circle inverts into a concentric circle (and necessarily of the same radius, i.e. itself) iff it is orthogonal to . To visualize these ideas, consider the following Manipulate that inverts a pattern of tangent circles.
Inverting Segments and Arcs
The inversion of a polygon is a closed sequence of arcs of circles that go through the center of inversion. Consider the problem of finding an arc through three noncollinear points , , and . As stated, this problem has many solutions; by assuming one of the points is not an endpoint of the arc, there is a unique answer. The function seg3 constructs such an arc and includes an argument to control whether the arc passes through the point .
The following Manipulate applies the function seg3 to any three noncollinear points, optionally passing through one of them.
Let the inversion of the point be and the point be . There are four cases for the inversion of the finite line segment in the circle .
- If , the segment is a point and inverts into the point .
- If and , the segment inverts into a ray starting at , going away from .
- If , , and are collinear, there are two subcases:
- If and are not collinear with , consider the circle passing through , , and . The inversion of is the arc joining and that does not pass through .
Similar results apply to the inversion of an arc. The following Manipulate shows all these cases as they apply to line segments and arcs. The initial segments or arcs are shown in red and their inversions in blue. Control locators are drawn in red. When a segment/arc is such that its corresponding line/circle passes through , say that it does so directly if is part of the segment/arc and indirectly otherwise.
Inverting a Triangle and a Quadrilateral
The function invSeg encapsulates the four cases appearing in the inversion of a segment mentioned in the previous section.
The function invSeg is used to invert a general triangle and a general quadrilateral. As mentioned before, the inversion of a polygon is a figure made by adjoining arcs of circles that pass through . (The geometry of coincident arcs is the same as the geometry of polygons. Just invert them!) However, the interior of a polygon does not invert to the interior of its inverse. The function fill fills this interior for aesthetics.
The following Manipulate shows a triangle or quadrilateral and the corresponding filled inversion. You can zoom by changing the radius of the circle of inversion . For what positions of do the sides of a given triangle invert into three congruent circles? Hint: it has something to do with its incircle. What about a quadrilateral?
Inverting the Visual Proof of Nicomachus’s Theorem
To justify the identity, consider the pattern made by half-squares and squares of increasing integer side lengths. The area of the big square is the square of the sum of the side lengths on the base . On the other hand, this area is the sum of the individual areas of the interior squares, taking into account that two half-squares make a whole square: . Logically these quantities are the same; hence Nicomachus’s theorem.
In order to get a symmetrical version, promote the half-squares into squares.
Add replicas around the lower-left vertex of the unit square made by rotating this pattern 90, 180, and 270 degrees to obtain a symmetrical pattern. Then eliminate repeated squares; moreover, eliminate repeated segments from adjacent squares using filter.
The function nichoSegs computes the segments needed to form the next pattern shown, which gives a visual proof of Nicomachus’s theorem .
The function nichoSegs computes the minimum number of segments necessary to produce the pattern. This is the number of segments up to .
The pattern has segments and squares. Not removing unnecessary segments would give segments, so for large , removing unnecessary segments is more than four times better. The following Manipulate shows Nicomachus’s pattern in gray along with its inversion in red. You can change and thus by dragging the locator, and you can vary with the slider.
Inversive Tiling with Equilateral Triangles, Squares, and Hexagons
There are only three ways to tile the plane with a regular polygon: using an equilateral triangle, a square, or a regular hexagon. The goal of this section is to show the patterns arising from inverting these tilings. To that end, the functions ring3, ring4, and ring6 generate the corresponding set of pieces in a ring surrounding the circle of inversion (in red).
Here is the triangular case for the first level of complexity .
The corresponding functions inv3, inv4, and inv6 invert each of the segments forming the tiling. For instance, here is the pattern for the triangular case.
Although the interiors of triangles are not preserved by inversion, they are filled to show the interference patterns they produce. The idea is shown in the next figure; to avoid clutter, only the first four members of are drawn. Lines join the vertices of the triangles to their inversions.
Although the triangles do not overlap, the interiors of their inverses do. In fact, the inversion of the central triangle contains the interiors of all the rest. The next level of complexity renders the following pattern.
Finally, a detail showing the sixth level.
Similarly, in the case of tiling with squares, here are the corresponding functions.
Here is a detail corresponding to the first four squares of the arrangement .
And here is a detail of the sixth level. (The color assignment has to be made explicit and does not rely only on overlapping as it did before.)
The tiling using regular hexagons cannot be colored with two colors, and there are too many segments to place the center of . So here is a line pattern.
The second level of complexity corresponding to the above pattern is the following.
This detail shows the sixth level of complexity, made with shapes formed with six arcs, all passing indirectly through .
An Inversive Spirograph
Finally, the following Manipulate shows an animated circle (orange) rotating inside a circle (pale brown) and the patterns generated by a point at the end of a line at a variable distance from the center of the circle. By varying the center and radius of the inversive circle, you can zoom in; the rotating radial line inverts into an arc orthogonal to the inversive path. You can enlarge the inversion by dragging the center of the inversive circle (light blue).
|||D. Knuth, The Art of Computer Programming, Volume 1: Fundamental Algorithms, 3rd ed., Reading, MA: Addison-Wesley Professional, 1997.|
|||G. Smith, A Mathematical Olympiad Primer, London: United Kingdom Mathematics Trust, 2008.|
|||A. Goucher. “Complex Projective 4-Space.” (Jun 24, 2013). cp4space.wordpress.com/2012/11/04/final-chapter-of-moda.|
|||J. Rangel-Mondragon, “Inversive Patterns, Part I: Complex Inversion,” Mathematica in Education and Research, 12(2), 2007 pp. 162-183.|
|||J. Rangel-Mondragon, “Inversive Patterns, Part II: Fundamental Properties of Inversion,” Mathematica in Education and Research, 12(4), 2007 pp. 330-354.|
|||J. Rangel-Mondragon, “Inversive Patterns, Part III: Common Tangents, Mandalas and Gothic Windows,” Mathematica in Education and Research, 12(4), 2007 pp. 355-376.|
|||N. J. A. Sloane. seq. A001189 in The On-Line Encyclopedia of Integer Sequences. oeis.org.|
|||H. S. M. Coxeter and S. L. Greitzer, Geometry Revisited, New York: Random House, 1967.|
|||E. W. Weisstein. “Nicomachus’s Theorem” from Wolfram MathWorld—A Wolfram Web Resource. mathworld.wolfram.com/NicomachussTheorem.html.|
|||M Schreiber. “A Visual Proof of Nicomachus’s Theorem” from the Wolfram Demonstrations Project—A Wolfram Web Resource. demonstrations.wolfram.com/AVisualProofOfNicomachussTheorem.|
|J. Rangel-Mondragon, “Selected Themes in Computational Non-Euclidean Geometry: Part 1,” The Mathematica Journal, 2013. dx.doi.org/doi:10.3888/tmj.15-7.|
About the Author
Jaime Rangel-Mondragon received M.Sc. and Ph.D. degrees in applied mathematics and computation from the University College of North Wales in Bangor, UK. He has been a visiting scholar at Wolfram Research, Inc. and held positions in the Faculty of Informatics at UCNW, the College of Mexico, the Center of Research and Advanced Studies, the Monterrey Institute of Technology, the Queretaro Institute of Technology and the University of Queretaro in Mexico, where he is presently a member of the Faculty of Informatics. His current research includes combinatorics, the theory of computing, computational geometry, urban traffic, and recreational mathematics.
UAQ, Facultad de Informatica
Queretaro, Qro. Mexico