This article continues the presentation of a variety of applications around the theme of inversion: quandles, inversion of one circle into another and inverting a pair of circles into congruent or concentric circles.
Introduction
Recent decades have seen a rebirth of geometry as an important subject both in the curriculum and in mathematical and computational research. Dynamic geometry programs have met the demand for visual, specialized computational tools that help bridge the gap between purely visual and algebraic methods. This development has also extended the understanding of the theoretical and computational foundations of geometry, which in turn has stimulated the proliferation of several new branches of geometry, producing a more mature and modern discipline.
In this spirit, these articles [1, 2] have been written to be useful as additional material in a teaching environment on computational geometry, following the practice of the author in teaching the subject at the beginning university level. This third article includes a section on quandles (algebraic generalizations of inversion) that describes their properties and generates all finite quandles up to order five. Also, we include the construction of a circle inverting one circle into another, followed by a section on the construction of a circle inverting two circles, or a circle and a line, into a pair of concentric circles.
Let  mean the inverse of the object
 mean the inverse of the object  in the circle
 in the circle  with center
 with center  and radius
 and radius  , drawn as a red dashed circle.
, drawn as a red dashed circle.
We repeat the definitions of the functions  ,
,  ,
,  and
 and  from the previous article [2].
 from the previous article [2].
The function  computes the square of the Euclidean distance between two given points. (It is more convenient to use the following definition than the built-in Mathematica function
 computes the square of the Euclidean distance between two given points. (It is more convenient to use the following definition than the built-in Mathematica function  .)
.) 

The function  tests whether three given points are collinear. When exactly two of them are equal, it gives
 tests whether three given points are collinear. When exactly two of them are equal, it gives  , and when all three are equal, it gives
, and when all three are equal, it gives  , because there is no unique line through them.
, because there is no unique line through them.


The function  computes the unique circle passing through three given points; if they are collinear, then the function
 computes the unique circle passing through three given points; if they are collinear, then the function  is applied first.
 is applied first.
The function  computes the circle passing through the points
 computes the circle passing through the points  ,
,  and
 and  . If the points are collinear, it gives the line through them; if all three points are the same, it returns an error message, as there is no meaningful definition of inversion in a circle of zero radius.
. If the points are collinear, it gives the line through them; if all three points are the same, it returns an error message, as there is no meaningful definition of inversion in a circle of zero radius.



The function  computes the inverse of
 computes the inverse of  in a circle
 in a circle  or line
 or line  . The object
. The object  can be a point (including the special point
 can be a point (including the special point  that inverts to the center
 that inverts to the center  of
 of  ), a circle or a line (specified by two points).
), a circle or a line (specified by two points).










Quandles
The geometric definition of inversion of circles can be formalized algebraically and thus be generalized. Let  denote the result of inverting
 denote the result of inverting  in
 in  . Quandles arise mostly in knot theory and group theory and are characterized by the following axioms [3]:
. Quandles arise mostly in knot theory and group theory and are characterized by the following axioms [3]:
The first two axioms correspond to well-known properties of inversion.
The following figure illustrates the third axiom. Red arrows go from the center of the circle to be inverted to the center of its inversion.


A set equipped with a binary operation  whose elements satisfy these three axioms is called an involutory quandle, or quandle for short. The operation
 whose elements satisfy these three axioms is called an involutory quandle, or quandle for short. The operation  is neither commutative nor associative. Inversive geometry applied to generalized circles is an example of an infinite quandle. There are other sets that also verify the axioms; for example, if
 is neither commutative nor associative. Inversive geometry applied to generalized circles is an example of an infinite quandle. There are other sets that also verify the axioms; for example, if  , the operation
, the operation  is a quandle.
 is a quandle.


Finite quandles are somewhat curious; for instance, the following is the operation matrix corresponding to a six-element quandle (due to Takasaki).


This verifies that under any modulus, this structure generalizes to a quandle.


A matrix  corresponding to a finite quandle has different elements appearing in its main diagonal and also different elements in each of its columns (i.e. for all elements
 corresponding to a finite quandle has different elements appearing in its main diagonal and also different elements in each of its columns (i.e. for all elements  ,
,  , there exists a unique
, there exists a unique  such that
 such that  ). Also, for every triple
). Also, for every triple  of indices, we must have
 of indices, we must have 

Is there an arrangement of generalized circles that forms a finite quandle under mutual inversion, that is, is closed by inversion? Any two orthogonal circles form a two-element quandle. Also, consider a set of  lines equally spaced, passing through the origin. This set is closed under reflection. Taking
 lines equally spaced, passing through the origin. This set is closed under reflection. Taking  and labeling the lines from
 and labeling the lines from  to
 to  gives the Takasaki matrix. A circle centered at the origin and
 gives the Takasaki matrix. A circle centered at the origin and  lines equally spaced produce a set closed under inversion; if we label the circle as
 lines equally spaced produce a set closed under inversion; if we label the circle as  , the matrix in this case has all elements in the last row equal to
, the matrix in this case has all elements in the last row equal to  . Let us now generate all finite quandles of size
. Let us now generate all finite quandles of size  .
.



Computing the number of finite quandles by this method is computationally expensive, as the variable  is of length
 is of length  . With
. With  , using the previous code, it took about an hour reporting 404 instances (time measured on a Mac Pro 3.1 GHz, 16 Gb).
, using the previous code, it took about an hour reporting 404 instances (time measured on a Mac Pro 3.1 GHz, 16 Gb).
The following is an example of a set of four circles closed under inversion (that is, any circle in the set inverted in any other circle results in a circle in the set), also called the inversive group of three points [3]. The function  computes a disk or a line
 computes a disk or a line  passing through point
 passing through point  such that points
 such that points  and
 and  form an inverse pair under inversion in
 form an inverse pair under inversion in  . In the following
. In the following  , you can drag a locator to modify one of the four circles; the others are computed accordingly.
, you can drag a locator to modify one of the four circles; the others are computed accordingly.
The function  slightly varies three points that are coincident or collinear.
 slightly varies three points that are coincident or collinear.




For more on quandles, see [4].
Inverting a Circle into Another
Throughout this section, let  and
 and  be circles with
 be circles with  , and let the inversion circle be
, and let the inversion circle be  , such that
, such that  . Call such an
. Call such an  the midcircle of
 the midcircle of  and
 and  . There are three cases, depending on the relative positions of
. There are three cases, depending on the relative positions of  and
 and  .
.


If  , a reflection takes
, a reflection takes  into
 into  , so assume
, so assume  from now on.
 from now on.
Case 1.  and
 and  Are External to Each Other
 Are External to Each Other
Theorem 1
 and
 and  not intersect and be external to each other; say
 not intersect and be external to each other; say  is to the left of
 is to the left of  and assume
 and assume  . Then
. Then  is at a distance
 is at a distance  from
 from  along the line
 along the line  , is to the right of
, is to the right of  , and
, and  .
. is orthogonal to every circle
 is orthogonal to every circle  tangent to both
 tangent to both  and
 and  , and
, and  is orthogonal to every circle
 is orthogonal to every circle  orthogonal to
 orthogonal to  and
 and  .
.Assume without loss of generality that  and
 and  . Draw two parallel radii from
. Draw two parallel radii from  and
 and  defining variable points
 defining variable points  and
 and  . Extend the lines
. Extend the lines  and
 and  to intersect at point
 to intersect at point  . From similar triangles,
. From similar triangles,  , and we easily conclude that
, and we easily conclude that  .
. 
Extend the lines  and
 and  to intersect at the point
 to intersect at the point  . Construct the circle
. Construct the circle  , which is tangent to
, which is tangent to  and
 and  .
.
The first part of the following output checks that the circle  inverts
 inverts  into
 into  , with
, with  .
.
The second part checks that  , so that
, so that  and
 and  invert to each other in
 invert to each other in  .
.
The circle  separates
 separates  and
 and  , while
, while  connects them, so
 connects them, so  intersects
 intersects  in two points
 in two points  and
 and  , each of which is fixed under inversion in
, each of which is fixed under inversion in  . Since
. Since  ,
,  and
 and  on
 on  invert into
 invert into  ,
,  and
 and  , also on
, also on  ,
,  inverts to itself (though not pointwise), and
 inverts to itself (though not pointwise), and  and
 and  are orthogonal.
 are orthogonal.
Let  be orthogonal to
 be orthogonal to  and
 and  , so that both
, so that both  and
 and  are invariant under inversion in
 are invariant under inversion in  . If
. If  inverts into
 inverts into  in
 in  , then
, then  and
 and  invert into each other in
 invert into each other in  , so
, so  , and
, and  and
 and  are orthogonal.
 are orthogonal.


This notation is followed in the next  . (A circle
. (A circle  orthogonal to
 orthogonal to  and
 and  is not drawn.)
 is not drawn.)


Case 2.  Is inside
 Is inside 
Theorem 2
 and
 and  do not intersect, and let
 do not intersect, and let  be inside
 be inside  . Then
. Then  is at a distance
 is at a distance  from
 from  along the line joining the centers, and
 along the line joining the centers, and  .
.To verify  inverts the circle
 inverts the circle  into the circle
 into the circle  , proceed as in the previous section.
, proceed as in the previous section.


The next  follows the previous construction of the midcircle of
 follows the previous construction of the midcircle of  and
 and  .
.


Case 3.  and
 and  Intersect
 Intersect
Theorem 3
 and
 and  intersect. Then there are two midcircles taking
 intersect. Then there are two midcircles taking  to
 to  , corresponding to the midcircles in theorems 1 and 2.
, corresponding to the midcircles in theorems 1 and 2.To verify this,  is inverted in the two circles from theorems 1 and 2.
 is inverted in the two circles from theorems 1 and 2.




The following  shows the construction of both midcircles following the previous notation.
 shows the construction of both midcircles following the previous notation.


Inverting Two Circles into Congruent Circles
Theorem 4
Proof
Let  be a circle centered on the midcircle
 be a circle centered on the midcircle  . Inverting
. Inverting  in
 in  , we obtain a line
, we obtain a line  (drawn in black in the following
 (drawn in black in the following  ). As
). As  separates
 separates  and
 and  ,
,  must separate
 must separate  and
 and  ; in fact,
; in fact,  must invert
 must invert  into
 into  . As
. As  is a line, inversion in
 is a line, inversion in  is reflection, hence
 is reflection, hence  and
 and  are congruent. □
 are congruent. □
The following  shows additionally that the brown line joining the centers of
 shows additionally that the brown line joining the centers of  and
 and  inverts into a brown circle orthogonal to the blue line and to the congruent circles
 inverts into a brown circle orthogonal to the blue line and to the congruent circles  and
 and  , as was expected.
, as was expected.


For more on the geometry of circles and inversion, see [5, 6, 7].
Inverting Two Circles into Concentric Circles
The radical axis of two circles is the locus of a point from which tangents to the two circles have the same length. It is always a straight line perpendicular to the line joining the centers of the two circles. If the circles intersect, the radical axis is the line through the points of intersection. If the circles are tangent, it is their common tangent. We will need the following property of the radical axis of two circles [8, 9, 10].
Theorem 5
 and
 and  , let the point
, let the point  , where
, where  . Construct the line
. Construct the line  at
 at  perpendicular to the line AB. Then
 perpendicular to the line AB. Then  is the radical axis of
 is the radical axis of  and
 and  .
.This checks that any point on  has tangents to
 has tangents to  and
 and  of equal length.
 of equal length.


Theorem 6
A few words on the assumptions in the following Simplify to verify theorem 6. The first three,  ,
,  ,
,  , hold in general. The fourth,
, hold in general. The fourth,  , is for the Solve that computes
, is for the Solve that computes  to find a solution. The next two,
 to find a solution. The next two,  and
 and  , are for the inversion of
, are for the inversion of  to be feasible, and the last two are for the inversion of
 to be feasible, and the last two are for the inversion of  to be feasible.
 to be feasible.



Theorem 7
Proof
Let  and
 and  be the given circles. Choose a circle centered at a point
 be the given circles. Choose a circle centered at a point  on the radical axis with radius equal to the length of the tangent from
 on the radical axis with radius equal to the length of the tangent from  to
 to  . This circle intersects the line
. This circle intersects the line  in two points
 in two points  ,
,  . Any circle with
. Any circle with  or
 or  as center inverts
 as center inverts  and
 and  into concentric circles. □
 into concentric circles. □
The next  shows the circles
 shows the circles  in blue and
 in blue and  in yellow, their radical axis, a point
 in yellow, their radical axis, a point  on the radical axis, the circle
 on the radical axis, the circle  now moving freely on the radical axis, the circle of inversion
 now moving freely on the radical axis, the circle of inversion  centered at one of the intersections of
 centered at one of the intersections of  and
 and  , and two concentric circles obtained by inverting
, and two concentric circles obtained by inverting  and
 and  in
 in  . Only one of the inversive circles
. Only one of the inversive circles  is shown; the other is a mirror image in the radical axis.
 is shown; the other is a mirror image in the radical axis.


The center  of the inversive circle
 of the inversive circle  does not depend on the position of
 does not depend on the position of  . This checks the inverses of the circles
. This checks the inverses of the circles  and
 and  are concentric.
 are concentric.


Let  be the center of the other inversive circle.
 be the center of the other inversive circle.
Theorem 8


Line and Circle into Concentric Circles
A line and a circle that do not intersect or a pair of nonintersecting circles can be inverted into two concentric circles. The key is to obtain a common orthogonal circle and then choose the inversion center at its intersection with a particular line [11].
Theorem 9
 and the nonintersecting line
 and the nonintersecting line  be such that
 be such that  on
 on  is the nearest point to
 is the nearest point to  , making
, making  perpendicular to the line
 perpendicular to the line 
 . Then the circle
. Then the circle  , where
, where  , is orthogonal to both
, is orthogonal to both  and
 and  . Either of the two intersections of
. Either of the two intersections of  with the line
 with the line 
 can serve as the center of a circle of inversion inverting
 can serve as the center of a circle of inversion inverting  and
 and  into concentric circles.
 into concentric circles.

Acknowledgments
I am grateful to the Center of Investigation and Advanced Studies in Mexico City for the use of its extensive library and to Wolfram Research for providing an ideal environment to develop this series of articles.
References
| [1] | J. Rangel-Mondragon, “Inversive Geometry: Part 1,” The Mathematica Journal, 15, 2013. doi:10.3888/tmj.15–7. | 
| [2] | J. Rangel-Mondragon, “Inversive Geometry: Part 2,” The Mathematica Journal, 18, 2014. doi:10.3888/tmj.18-5. | 
| [3] | F. Morley and F. V. Morley, Inversive Geometry, New York: Ginn and Company, 1933. | 
| [4] | B. Ho and S. Nelson, “Matrices and Finite Quandles,” Homology, Homotopy and Applications, 7(1), 2005 pp. 197–208. doi:10.4310/HHA.2005.v7.n1.a11. | 
| [5] | H. S. M. Coxeter, “Inversive Geometry,” Educational Studies in Mathematics, 3(3), 1971 pp. 310–321. doi:10.1007/BF00302300. | 
| [6] | D. Pedoe, Geometry, A Comprehensive Course, New York: Dover Publications Inc., 1988. | 
| [7] | H. S. M. Coxeter and S. L. Geitzer, Geometry Revisited, New York: Random House, 1967. | 
| [8] | E. W. Weisstein. ”Radical Line” from MathWorld–A Wolfram Web Resource. mathworld.wolfram.com/RadicalLine.html. | 
| [9] | S. R. Murthy. “Radical Axis and Radical Center” from the Wolfram Demonstrations Project–A Wolfram Web Resource. demonstrations.wolfram.com/RadicalAxisAndRadicalCenter. | 
| [10] | J. Rangel-Mondragón, “The Arbelos,” The Mathematica Journal, 16, 2014. doi:10.3888/tmj.16-5. | 
| [11] | D. E. Blair, Inversion Theory and Conformal Mapping, Providence, RI: American Mathematical Society, 2000. | 
| J. Rangel-Mondragón, “Inversive Geometry: Part 3,” The Mathematica Journal, 2017. dx.doi.org/doi:10.3888/tmj.19-4. | |
About the Author
Jaime Rangel-Mondragón received M.Sc. and Ph.D. degrees in Applied Mathematics and Computation from the School of Mathematics and Computer Science at the University College of North Wales in Bangor, UK. He was a visiting scholar at Wolfram Research, Inc. and held positions in the Faculty of Informatics at UCNW, the Center of Literary and Linguistic Studies at the College of Mexico, the Department of Electrical Engineering at the Center of Research and Advanced Studies, the Center of Computational Engineering (of which he was director) at the Monterrey Institute of Technology, the Department of Mechatronics at the Queretaro Institute of Technology and the Autonomous University of Queretaro in Mexico, where he was a member of the Department of Informatics and in charge of the Academic Body of Algorithms, Computation and Networks. His research included combinatorics, the theory of computing, computational geometry and recreational mathematics. Jaime Rangel-Mondragón died in 2015.

 NB
NB 
   
   
   is orthogonal to every circle orthogonal to
 is orthogonal to every circle orthogonal to  and
 and  .
. of
 of  and
 and  inverts
 inverts  and
 and  into two congruent circles.
 into two congruent circles. as in theorem 5, the circle
 as in theorem 5, the circle  is orthogonal to
 is orthogonal to  and
 and  .
. in
 in  or
 or  is
 is  .
.