In geometry, inversion in a sphere is a transformation of Euclidean space that fixes the points of a sphere while sending the points inside of the sphere to the outside of the sphere, and vice versa. Intuitively, it "swaps the inside and outside" of the sphere while leaving the points on the sphere unchanged. Inversion is a conformal transformation, and is the basic operation of inversive geometry.
Inversion in a sphere is most easily described using polar coordinates. Choose a system of affine coordinates so that the centre of the sphere is at the origin and the radius of the sphere is 1. Then every point can be written in the form rv, where r is the distance from the point to the origin and v is a unit vector; moreover, for every point apart from the origin this representation is unique. Given such a representation of a point, its image under spherical inversion is defined to be the point r−1v. This defines a homeomorphism from to itself. As a map from Euclidean space to itself, the spherical inversion map is not defined at the origin, but we can extend it to , the one-point compactification of , by specifying that 0 should be sent to infinity and infinity should be sent to 0. Thus, spherical inversion can be thought of as a homeomorphism of .