In mathematics, an n-sphere or hypersphere is an -dimensional generalization of the -dimensional circle and -dimensional sphere to any non-negative integer. The circle is considered 1-dimensional, and the sphere 2-dimensional, because the surfaces themselves are 1- and 2-dimensional respectively, not because they exist as shapes in 1- and 2-dimensional space. As such, the -sphere is the setting for -dimensional spherical geometry.
Considered extrinsically, as a hypersurface embedded in -dimensional Euclidean space, an -sphere is the locus of points at equal distance (the radius) from a given center point. Its interior, consisting of all points closer to the center than the radius, is an -dimensional ball. In particular:
The -sphere is the pair of points at the ends of a line segment (-ball).
In the more general setting of topology, any topological space that is homeomorphic to the unit -sphere is called an -sphere. Under inverse stereographic projection, the -sphere is the one-point compactification of -space. The -spheres admit several other topological descriptions: for example, they can be constructed by gluing two -dimensional spaces together, by identifying the boundary of an -cube with a point, or (inductively) by forming the suspension of an -sphere. When it is simply connected; the -sphere (circle) is not simply connected; the -sphere is not even connected, consisting of two discrete points.