Inversion in a circle
Drag any blue handle. The black circle, centre O and radius k, is the mirror. Every blue object is reflected in it: a point P goes to the point P′ on the ray OP with OP · OP′ = k². The orange shapes are the images, redrawn as you drag. Slide the line so it passes through O and watch its image straighten out; slide the circle until it passes through O and watch its image become a line; push anything inside the mirror and watch its image fly outside. Add more objects with the buttons, and try making a line touch a circle: the images touch too.
What's going on
Inversion in a circle of radius k centred at O sends each point P ≠ O to the point P′ on the ray from O through P with OP · OP′ = k². Points on the circle stay put, points inside go outside and points outside come inside, and O itself has nowhere to go (think of it as being sent to infinity). Doing it twice gets you back where you started, just like a reflection.
The surprise is what happens to shapes. A line through O maps to itself. A line not through O maps to a circle through O: if F is the foot of the perpendicular from O to the line, the image is the circle with diameter OF′. A circle through O maps to a line, and a circle not through O maps to another circle (though not centre to centre: the image of the centre is not the centre of the image). Lines are just circles that happen to pass through infinity, and inversion shuffles the whole family of "lines and circles" among itself.
Two things survive inversion exactly: angles between curves, and tangency, because tangency is an angle of zero. That is why it solves problems. A tangle of circles that all pass through O becomes a tangle of lines after inversion, where the problem is easy. The rays in the picture also show the one-dimensional formula at work: drag a point along a ray and its image moves the other way along the same ray, with the product of the two distances pinned to k².
Sheet: Inversion in a circle. Related demos: complex numbers (inversion is z ↦ k²/z̄) and transformations.