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).
- The -sphere is a circle, the circumference of a disk (-ball) in the two-dimensional plane.
- The -sphere, often simply called a sphere, is the boundary of a -ball in three-dimensional space.
- The 3-sphere is the boundary of a -ball in four-dimensional space.
- The -sphere is the boundary of an -ball.
Given a Cartesian coordinate system, the unit -sphere of radius can be defined as:
Considered intrinsically, when , the -sphere is a Riemannian manifold of positive constant curvature, and is orientable. The geodesics of the -sphere are called great circles.
The stereographic projection maps the -sphere onto -space with a single adjoined point at infinity; under the metric thereby defined, is a model for the -sphere.
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.
Description
For any natural number , an -sphere of radius is defined as the set of points in -dimensional Euclidean space that are at distance from some fixed point , where may be any positive real number and where may be any point in -dimensional space. In particular:
- a 0-sphere is a pair of points , and is the boundary of a line segment (-ball).
- a 1-sphere is a circle of radius centered at , and is the boundary of a disk (-ball).
- a 2-sphere is an ordinary -dimensional sphere in -dimensional Euclidean space, and is the boundary of an ordinary ball (-ball).
- a 3-sphere is a -dimensional sphere in -dimensional Euclidean space.
Cartesian coordinates
The set of points in -space, , that define an -sphere, , is represented by the equation:
where is a center point, and is the radius.
The above -sphere exists in -dimensional Euclidean space and is an example of an -manifold. The volume form of an -sphere of radius is given by
where is the Hodge star operator; see Flanders (1989, §6.1) for a discussion and proof of this formula in the case . As a result,
n-ball
The space enclosed by an -sphere is called an -ball. An -ball is closed if it includes the -sphere, and it is open if it does not include the -sphere.
Specifically:
- A -ball, a line segment, is the interior of a 0-sphere.
- A -ball, a disk, is the interior of a circle (-sphere).
- A -ball, an ordinary ball, is the interior of a sphere (-sphere).
- A -ball is the interior of a 3-sphere, etc.
Topological description
Topologically, an -sphere can be constructed as a one-point compactification of -dimensional Euclidean space. Briefly, the -sphere can be described as , which is -dimensional Euclidean space plus a single point representing infinity in all directions. In particular, if a single point is removed from an -sphere, it becomes homeomorphic to . This forms the basis for stereographic projection.
Volume and area
Let be the surface area of the unit -sphere of radius embedded in -dimensional Euclidean space, and let be the volume of its interior, the unit -ball. The surface area of an arbitrary -sphere is proportional to the st power of the radius, and the volume of an arbitrary -ball is proportional to the th power of the radius.
The -ball is sometimes defined as a single point. The -dimensional Hausdorff measure is the number of points in a set. So
A unit -ball is a line segment whose points have a single coordinate in the interval of length , and the -sphere consists of its two end-points, with coordinate .
A unit -sphere is the unit circle in the Euclidean plane, and its interior is the unit disk (-ball).
The interior of a 2-sphere in three-dimensional space is the unit -ball.
In general, and are given in closed form by the expressions
where is the gamma function.
As tends to infinity, the volume of the unit -ball (ratio between the volume of an -ball of radius and an -cube of side length ) tends to zero.
Recurrences
The surface area, or properly the -dimensional volume, of the -sphere at the boundary of the -ball of radius is related to the volume of the ball by the differential equation
Equivalently, representing the unit -ball as a union of concentric -sphere shells,
We can also represent the unit -sphere as a union of products of a circle (-sphere) with an -sphere. Then . Since , the equation
holds for all . Along with the base cases , from above, these recurrences can be used to compute the surface area of any sphere or volume of any ball.
Spherical coordinates
We may define a coordinate system in an -dimensional Euclidean space which is analogous to the spherical coordinate system defined for -dimensional Euclidean space, in which the coordinates consist of a radial coordinate , and angular coordinates , where the angles range over radians (or degrees) and ranges over radians (or degrees). If are the Cartesian coordinates, then we may compute from with:
Except in the special cases described below, the inverse transformation is unique:
where atan2 is the two-argument arctangent function.
There are some special cases where the inverse transform is not unique; for any will be ambiguous whenever all of are zero; in this case may be chosen to be zero. (For example, for the -sphere, when the polar angle is or then the point is one of the poles, zenith or nadir, and the choice of azimuthal angle is arbitrary.)
Spherical volume and area elements
To express the volume element of -dimensional Euclidean space in terms of spherical coordinates, let and for concision, then observe that the Jacobian matrix of the transformation is:
The determinant of this matrix can be calculated by induction. When , a straightforward computation shows that the determinant is . For larger , observe that can be constructed from as follows. Except in column , rows and of are the same as row of , but multiplied by an extra factor of in row and an extra factor of in row . In column , rows and of are the same as column of row of , but multiplied by extra factors of in row and in row , respectively. The determinant of can be calculated by Laplace expansion in the final column. By the recursive description of , the submatrix formed by deleting the entry at and its row and column almost equals , except that its last row is multiplied by . Similarly, the submatrix formed by deleting the entry at and its row and column almost equals , except that its last row is multiplied by . Therefore the determinant of is
Induction then gives a closed-form expression for the volume element in spherical coordinates
The formula for the volume of the -ball can be derived from this by integration.
Similarly the surface area element of the -sphere of radius , which generalizes the area element of the -sphere, is given by
The natural choice of an orthogonal basis over the angular coordinates is a product of ultraspherical polynomials,
for , and the for the angle in concordance with the spherical harmonics.
Polyspherical coordinates
The standard spherical coordinate system arises from writing as the product . These two factors may be related using polar coordinates. For each point of , the standard Cartesian coordinates
can be transformed into a mixed polar–Cartesian coordinate system:
This says that points in may be expressed by taking the ray starting at the origin and passing through , rotating it towards by , and traveling a distance along the ray. Repeating this decomposition eventually leads to the standard spherical coordinate system.
Polyspherical coordinate systems arise from a generalization of this construction. The space is split as the product of two Euclidean spaces of smaller dimension, but neither space is required to be a line. Specifically, suppose that and are positive integers such that . Then . Using this decomposition, a point may be written as
This can be transformed into a mixed polar–Cartesian coordinate system by writing:
Here and are the unit vectors associated to and . This expresses in terms of , , , and an angle . It can be shown that the domain of is if , if exactly one of and is , and if neither nor are . The inverse transformation is
These splittings may be repeated as long as one of the factors involved has dimension two or greater. A polyspherical coordinate system is the result of repeating these splittings until there are no Cartesian coordinates left. Splittings after the first do not require a radial coordinate because the domains of and are spheres, so the coordinates of a polyspherical coordinate system are a non-negative radius and angles. The possible polyspherical coordinate systems correspond to binary trees with leaves. Each non-leaf node in the tree corresponds to a splitting and determines an angular coordinate. For instance, the root of the tree represents , and its immediate children represent the first splitting into and . Leaf nodes correspond to Cartesian coordinates for . The formulas for converting from polyspherical coordinates to Cartesian coordinates may be determined by finding the paths from the root to the leaf nodes. These formulas are products with one factor for each branch taken by the path. For a node whose corresponding angular coordinate is , taking the left branch introduces a factor of and taking the right branch introduces a factor of . The inverse transformation, from polyspherical coordinates to Cartesian coordinates, is determined by grouping nodes. Every pair of nodes having a common parent can be converted from a mixed polar–Cartesian coordinate system to a Cartesian coordinate system using the above formulas for a splitting.
Polyspherical coordinates also have an interpretation in terms of the special orthogonal group. A splitting determines a subgroup
This is the subgroup that leaves each of the two factors fixed. Choosing a set of coset representatives for the quotient is the same as choosing representative angles for this step of the polyspherical coordinate decomposition.
In polyspherical coordinates, the volume measure on and the area measure on are products. There is one factor for each angle, and the volume measure on also has a factor for the radial coordinate. The area measure has the form:
where the factors are determined by the tree. Similarly, the volume measure is
Suppose we have a node of the tree that corresponds to the decomposition and that has angular coordinate . The corresponding factor depends on the values of and . When the area measure is normalized so that the area of the sphere is , these factors are as follows. If , then
If and , and if denotes the beta function, then
If and , then
Finally, if both and are greater than one, then
Stereographic projection
Just as a two-dimensional sphere embedded in three dimensions can be mapped onto a two-dimensional plane by a stereographic projection, an -sphere can be mapped onto an -dimensional hyperplane by the -dimensional version of the stereographic projection. For example, the point on a two-dimensional sphere of radius maps to the point on the -plane. In other words,
Likewise, the stereographic projection of an -sphere of radius will map to the -dimensional hyperplane perpendicular to the -axis as
Probability distributions
Uniformly at random on the (n − 1)-sphere
To generate uniformly distributed random points on the unit -sphere (that is, the surface of the unit -ball), Marsaglia (1972) gives the following algorithm.
Generate an -dimensional vector of normal deviates (it suffices to use , although in fact the choice of the variance is arbitrary), . Now calculate the "radius" of this point:
The vector is uniformly distributed over the surface of the unit -ball.
An alternative given by Marsaglia is to uniformly randomly select a point in the unit n-cube by sampling each independently from the uniform distribution over , computing as above, and rejecting the point and resampling if (i.e., if the point is not in the -ball), and when a point in the ball is obtained scaling it up to the spherical surface by the factor ; then again is uniformly distributed over the surface of the unit -ball. This method becomes very inefficient for higher dimensions, as a vanishingly small fraction of the unit cube is contained in the sphere. In ten dimensions, less than 2% of the cube is filled by the sphere, so that typically more than 50 attempts will be needed. In seventy dimensions, less than of the cube is filled, meaning typically a trillion quadrillion trials will be needed, far more than a computer could ever carry out.
Uniformly at random within the n-ball
With a point selected uniformly at random from the surface of the unit -sphere (e.g., by using Marsaglia's algorithm), one needs only a radius to obtain a point uniformly at random from within the unit -ball. If is a number generated uniformly at random from the interval and is a point selected uniformly at random from the unit -sphere, then is uniformly distributed within the unit -ball.
Alternatively, points may be sampled uniformly from within the unit -ball by a reduction from the unit -sphere. In particular, if is a point selected uniformly from the unit -sphere, then is uniformly distributed within the unit -ball (i.e., by simply discarding two coordinates).
If is sufficiently large, most of the volume of the -ball will be contained in the region very close to its surface, so a point selected from that volume will also probably be close to the surface. This is one of the phenomena leading to the so-called curse of dimensionality that arises in some numerical and other applications.
Distribution of the first coordinate
Let be the square of the first coordinate of a point sampled uniformly at random from the -sphere, then its probability density function, for , is
Let
In mathematics an n sphere or hypersphere is an n displaystyle n dimensional generalization of the 1 displaystyle 1 dimensional circle and 2 displaystyle 2 dimensional sphere to any non negative integer n displaystyle n 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 n displaystyle n sphere is the setting for n displaystyle n dimensional spherical geometry 2 sphere wireframe as an orthogonal projectionJust as a stereographic projection can project a sphere s surface to a plane it can also project a 3 sphere into 3 space This image shows three coordinate directions projected to 3 space parallels red meridians blue and hypermeridians green Due to the conformal property of the stereographic projection the curves intersect each other orthogonally in the yellow points as in 4D All of the curves are circles the curves that intersect 0 0 0 1 have an infinite radius straight line Considered extrinsically as a hypersurface embedded in n 1 displaystyle n 1 dimensional Euclidean space an n displaystyle n 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 n 1 displaystyle n 1 dimensional ball In particular The 0 displaystyle 0 sphere is the pair of points at the ends of a line segment 1 displaystyle 1 ball The 1 displaystyle 1 sphere is a circle the circumference of a disk 2 displaystyle 2 ball in the two dimensional plane The 2 displaystyle 2 sphere often simply called a sphere is the boundary of a 3 displaystyle 3 ball in three dimensional space The 3 sphere is the boundary of a 4 displaystyle 4 ball in four dimensional space The n 1 displaystyle n 1 sphere is the boundary of an n displaystyle n ball Given a Cartesian coordinate system the unit n displaystyle n sphere of radius 1 displaystyle 1 can be defined as Sn x Rn 1 x 1 displaystyle S n left x in mathbb R n 1 left x right 1 right Considered intrinsically when n 1 displaystyle n geq 1 the n displaystyle n sphere is a Riemannian manifold of positive constant curvature and is orientable The geodesics of the n displaystyle n sphere are called great circles The stereographic projection maps the n displaystyle n sphere onto n displaystyle n space with a single adjoined point at infinity under the metric thereby defined Rn displaystyle mathbb R n cup infty is a model for the n displaystyle n sphere In the more general setting of topology any topological space that is homeomorphic to the unit n displaystyle n sphere is called an n displaystyle n sphere Under inverse stereographic projection the n displaystyle n sphere is the one point compactification of n displaystyle n space The n displaystyle n spheres admit several other topological descriptions for example they can be constructed by gluing two n displaystyle n dimensional spaces together by identifying the boundary of an n displaystyle n cube with a point or inductively by forming the suspension of an n 1 displaystyle n 1 sphere When n 2 displaystyle n geq 2 it is simply connected the 1 displaystyle 1 sphere circle is not simply connected the 0 displaystyle 0 sphere is not even connected consisting of two discrete points DescriptionFor any natural number n displaystyle n an n displaystyle n sphere of radius r displaystyle r is defined as the set of points in n 1 displaystyle n 1 dimensional Euclidean space that are at distance r displaystyle r from some fixed point c displaystyle mathbf c where r displaystyle r may be any positive real number and where c displaystyle mathbf c may be any point in n 1 displaystyle n 1 dimensional space In particular a 0 sphere is a pair of points c r c r displaystyle c r c r and is the boundary of a line segment 1 displaystyle 1 ball a 1 sphere is a circle of radius r displaystyle r centered at c displaystyle mathbf c and is the boundary of a disk 2 displaystyle 2 ball a 2 sphere is an ordinary 2 displaystyle 2 dimensional sphere in 3 displaystyle 3 dimensional Euclidean space and is the boundary of an ordinary ball 3 displaystyle 3 ball a 3 sphere is a 3 displaystyle 3 dimensional sphere in 4 displaystyle 4 dimensional Euclidean space Cartesian coordinates The set of points in n 1 displaystyle n 1 space x1 x2 xn 1 displaystyle x 1 x 2 ldots x n 1 that define an n displaystyle n sphere Sn r displaystyle S n r is represented by the equation r2 i 1n 1 xi ci 2 displaystyle r 2 sum i 1 n 1 x i c i 2 where c c1 c2 cn 1 displaystyle mathbf c c 1 c 2 ldots c n 1 is a center point and r displaystyle r is the radius The above n displaystyle n sphere exists in n 1 displaystyle n 1 dimensional Euclidean space and is an example of an n displaystyle n manifold The volume form w displaystyle omega of an n displaystyle n sphere of radius r displaystyle r is given by w 1r j 1n 1 1 j 1xjdx1 dxj 1 dxj 1 dxn 1 dr displaystyle omega frac 1 r sum j 1 n 1 1 j 1 x j dx 1 wedge cdots wedge dx j 1 wedge dx j 1 wedge cdots wedge dx n 1 star dr where displaystyle star is the Hodge star operator see Flanders 1989 6 1 for a discussion and proof of this formula in the case r 1 displaystyle r 1 As a result dr w dx1 dxn 1 displaystyle dr wedge omega dx 1 wedge cdots wedge dx n 1 n ball The space enclosed by an n displaystyle n sphere is called an n 1 displaystyle n 1 ball An n 1 displaystyle n 1 ball is closed if it includes the n displaystyle n sphere and it is open if it does not include the n displaystyle n sphere Specifically A 1 displaystyle 1 ball a line segment is the interior of a 0 sphere A 2 displaystyle 2 ball a disk is the interior of a circle 1 displaystyle 1 sphere A 3 displaystyle 3 ball an ordinary ball is the interior of a sphere 2 displaystyle 2 sphere A 4 displaystyle 4 ball is the interior of a 3 sphere etc Topological description Topologically an n displaystyle n sphere can be constructed as a one point compactification of n displaystyle n dimensional Euclidean space Briefly the n displaystyle n sphere can be described as Sn Rn displaystyle S n mathbb R n cup infty which is n displaystyle n dimensional Euclidean space plus a single point representing infinity in all directions In particular if a single point is removed from an n displaystyle n sphere it becomes homeomorphic to Rn displaystyle mathbb R n This forms the basis for stereographic projection Volume and areaLet Sn 1 displaystyle S n 1 be the surface area of the unit n 1 displaystyle n 1 sphere of radius 1 displaystyle 1 embedded in n displaystyle n dimensional Euclidean space and let Vn displaystyle V n be the volume of its interior the unit n displaystyle n ball The surface area of an arbitrary n 1 displaystyle n 1 sphere is proportional to the n 1 displaystyle n 1 st power of the radius and the volume of an arbitrary n displaystyle n ball is proportional to the n displaystyle n th power of the radius Graphs of volumes Vn displaystyle V n and surface areas Sn 1 displaystyle S n 1 of n balls of radius 1 The 0 displaystyle 0 ball is sometimes defined as a single point The 0 displaystyle 0 dimensional Hausdorff measure is the number of points in a set So V0 1 displaystyle V 0 1 A unit 1 displaystyle 1 ball is a line segment whose points have a single coordinate in the interval 1 1 displaystyle 1 1 of length 2 displaystyle 2 and the 0 displaystyle 0 sphere consists of its two end points with coordinate 1 1 displaystyle 1 1 S0 2 V1 2 displaystyle S 0 2 quad V 1 2 A unit 1 displaystyle 1 sphere is the unit circle in the Euclidean plane and its interior is the unit disk 2 displaystyle 2 ball S1 2p V2 p displaystyle S 1 2 pi quad V 2 pi The interior of a 2 sphere in three dimensional space is the unit 3 displaystyle 3 ball S2 4p V3 43p displaystyle S 2 4 pi quad V 3 tfrac 4 3 pi In general Sn 1 displaystyle S n 1 and Vn displaystyle V n are given in closed form by the expressions Sn 1 2pn 2G n2 Vn pn 2G n2 1 displaystyle S n 1 frac 2 pi n 2 Gamma bigl frac n 2 bigr quad V n frac pi n 2 Gamma bigl frac n 2 1 bigr where G displaystyle Gamma is the gamma function As n displaystyle n tends to infinity the volume of the unit n displaystyle n ball ratio between the volume of an n displaystyle n ball of radius 1 displaystyle 1 and an n displaystyle n cube of side length 1 displaystyle 1 tends to zero Recurrences The surface area or properly the n displaystyle n dimensional volume of the n displaystyle n sphere at the boundary of the n 1 displaystyle n 1 ball of radius R displaystyle R is related to the volume of the ball by the differential equation SnRn dVn 1Rn 1dR n 1 Vn 1Rn displaystyle S n R n frac dV n 1 R n 1 dR n 1 V n 1 R n Equivalently representing the unit n displaystyle n ball as a union of concentric n 1 displaystyle n 1 sphere shells Vn 1 01Snrndr 1n 1Sn displaystyle V n 1 int 0 1 S n r n dr frac 1 n 1 S n We can also represent the unit n 2 displaystyle n 2 sphere as a union of products of a circle 1 displaystyle 1 sphere with an n displaystyle n sphere Then Sn 2 2pVn 1 displaystyle S n 2 2 pi V n 1 Since S1 2pV0 displaystyle S 1 2 pi V 0 the equation Sn 1 2pVn displaystyle S n 1 2 pi V n holds for all n displaystyle n Along with the base cases S0 2 displaystyle S 0 2 V1 2 displaystyle V 1 2 from above these recurrences can be used to compute the surface area of any sphere or volume of any ball Spherical coordinatesWe may define a coordinate system in an n displaystyle n dimensional Euclidean space which is analogous to the spherical coordinate system defined for 3 displaystyle 3 dimensional Euclidean space in which the coordinates consist of a radial coordinate r displaystyle r and n 1 displaystyle n 1 angular coordinates f1 f2 fn 1 displaystyle varphi 1 varphi 2 ldots varphi n 1 where the angles f1 f2 fn 2 displaystyle varphi 1 varphi 2 ldots varphi n 2 range over 0 p displaystyle 0 pi radians or 0 180 displaystyle 0 180 degrees and fn 1 displaystyle varphi n 1 ranges over 0 2p displaystyle 0 2 pi radians or 0 360 displaystyle 0 360 degrees If xi displaystyle x i are the Cartesian coordinates then we may compute x1 xn displaystyle x 1 ldots x n from r f1 fn 1 displaystyle r varphi 1 ldots varphi n 1 with x1 rcos f1 x2 rsin f1 cos f2 x3 rsin f1 sin f2 cos f3 xn 1 rsin f1 sin fn 2 cos fn 1 xn rsin f1 sin fn 2 sin fn 1 displaystyle begin aligned x 1 amp r cos varphi 1 5mu x 2 amp r sin varphi 1 cos varphi 2 5mu x 3 amp r sin varphi 1 sin varphi 2 cos varphi 3 amp qquad vdots x n 1 amp r sin varphi 1 cdots sin varphi n 2 cos varphi n 1 5mu x n amp r sin varphi 1 cdots sin varphi n 2 sin varphi n 1 end aligned Except in the special cases described below the inverse transformation is unique r xn2 xn 12 x22 x12 f1 atan2 xn2 xn 12 x22 x1 f2 atan2 xn2 xn 12 x32 x2 fn 2 atan2 xn2 xn 12 xn 2 fn 1 atan2 xn xn 1 displaystyle begin aligned r amp textstyle sqrt x n 2 x n 1 2 cdots x 2 2 x 1 2 5mu varphi 1 amp operatorname atan2 left textstyle sqrt x n 2 x n 1 2 cdots x 2 2 x 1 right 5mu varphi 2 amp operatorname atan2 left textstyle sqrt x n 2 x n 1 2 cdots x 3 2 x 2 right amp qquad vdots varphi n 2 amp operatorname atan2 left textstyle sqrt x n 2 x n 1 2 x n 2 right 5mu varphi n 1 amp operatorname atan2 left x n x n 1 right end aligned where atan2 is the two argument arctangent function There are some special cases where the inverse transform is not unique fk displaystyle varphi k for any k displaystyle k will be ambiguous whenever all of xk xk 1 xn displaystyle x k x k 1 ldots x n are zero in this case fk displaystyle varphi k may be chosen to be zero For example for the 2 displaystyle 2 sphere when the polar angle is 0 displaystyle 0 or p displaystyle pi then the point is one of the poles zenith or nadir and the choice of azimuthal angle is arbitrary Spherical volume and area elements To express the volume element of n displaystyle n dimensional Euclidean space in terms of spherical coordinates let sk sin fk displaystyle s k sin varphi k and ck cos fk displaystyle c k cos varphi k for concision then observe that the Jacobian matrix of the transformation is Jn c1 rs100 0s1c2rc1c2 rs1s20 0 0s1 sn 2cn 1 rs1 sn 2sn 1s1 sn 2sn 1rc1 sn 1 rs1 sn 2cn 1 displaystyle J n begin pmatrix c 1 amp rs 1 amp 0 amp 0 amp cdots amp 0 s 1 c 2 amp rc 1 c 2 amp rs 1 s 2 amp 0 amp cdots amp 0 vdots amp vdots amp vdots amp amp ddots amp vdots amp amp amp amp amp 0 s 1 cdots s n 2 c n 1 amp cdots amp cdots amp amp amp rs 1 cdots s n 2 s n 1 s 1 cdots s n 2 s n 1 amp rc 1 cdots s n 1 amp cdots amp amp amp phantom rs 1 cdots s n 2 c n 1 end pmatrix The determinant of this matrix can be calculated by induction When n 2 displaystyle n 2 a straightforward computation shows that the determinant is r displaystyle r For larger n displaystyle n observe that Jn displaystyle J n can be constructed from Jn 1 displaystyle J n 1 as follows Except in column n displaystyle n rows n 1 displaystyle n 1 and n displaystyle n of Jn displaystyle J n are the same as row n 1 displaystyle n 1 of Jn 1 displaystyle J n 1 but multiplied by an extra factor of cos fn 1 displaystyle cos varphi n 1 in row n 1 displaystyle n 1 and an extra factor of sin fn 1 displaystyle sin varphi n 1 in row n displaystyle n In column n displaystyle n rows n 1 displaystyle n 1 and n displaystyle n of Jn displaystyle J n are the same as column n 1 displaystyle n 1 of row n 1 displaystyle n 1 of Jn 1 displaystyle J n 1 but multiplied by extra factors of sin fn 1 displaystyle sin varphi n 1 in row n 1 displaystyle n 1 and cos fn 1 displaystyle cos varphi n 1 in row n displaystyle n respectively The determinant of Jn displaystyle J n can be calculated by Laplace expansion in the final column By the recursive description of Jn displaystyle J n the submatrix formed by deleting the entry at n 1 n displaystyle n 1 n and its row and column almost equals Jn 1 displaystyle J n 1 except that its last row is multiplied by sin fn 1 displaystyle sin varphi n 1 Similarly the submatrix formed by deleting the entry at n n displaystyle n n and its row and column almost equals Jn 1 displaystyle J n 1 except that its last row is multiplied by cos fn 1 displaystyle cos varphi n 1 Therefore the determinant of Jn displaystyle J n is Jn 1 n 1 n rs1 sn 2sn 1 sn 1 Jn 1 1 n n rs1 sn 2cn 1 cn 1 Jn 1 rs1 sn 2 Jn 1 sn 12 cn 12 rs1 sn 2 Jn 1 displaystyle begin aligned J n amp 1 n 1 n rs 1 dotsm s n 2 s n 1 s n 1 J n 1 amp qquad 1 n n rs 1 dotsm s n 2 c n 1 c n 1 J n 1 amp rs 1 dotsm s n 2 J n 1 s n 1 2 c n 1 2 amp rs 1 dotsm s n 2 J n 1 end aligned Induction then gives a closed form expression for the volume element in spherical coordinates dnV det xi r fj drdf1df2 dfn 1 rn 1sinn 2 f1 sinn 3 f2 sin fn 2 drdf1df2 dfn 1 displaystyle begin aligned d n V amp left det frac partial x i partial left r varphi j right right dr d varphi 1 d varphi 2 cdots d varphi n 1 amp r n 1 sin n 2 varphi 1 sin n 3 varphi 2 cdots sin varphi n 2 dr d varphi 1 d varphi 2 cdots d varphi n 1 end aligned The formula for the volume of the n displaystyle n ball can be derived from this by integration Similarly the surface area element of the n 1 displaystyle n 1 sphere of radius r displaystyle r which generalizes the area element of the 2 displaystyle 2 sphere is given by dSn 1V Rn 1sinn 2 f1 sinn 3 f2 sin fn 2 df1df2 dfn 1 displaystyle d S n 1 V R n 1 sin n 2 varphi 1 sin n 3 varphi 2 cdots sin varphi n 2 d varphi 1 d varphi 2 cdots d varphi n 1 The natural choice of an orthogonal basis over the angular coordinates is a product of ultraspherical polynomials 0psinn j 1 fj Cs n j 12 cos fj Cs n j 12 cos fj dfj 23 n jpG s n j 1 s 2s n j 1 G2 n j 12 ds s displaystyle begin aligned amp quad int 0 pi sin n j 1 left varphi j right C s left frac n j 1 2 right cos left varphi j right C s left frac n j 1 2 right cos left varphi j right d varphi j 6pt amp frac 2 3 n j pi Gamma s n j 1 s 2s n j 1 Gamma 2 left frac n j 1 2 right delta s s end aligned for j 1 2 n 2 displaystyle j 1 2 ldots n 2 and the eisfj displaystyle e is varphi j for the angle j n 1 displaystyle j n 1 in concordance with the spherical harmonics Polyspherical coordinates The standard spherical coordinate system arises from writing Rn displaystyle mathbb R n as the product R Rn 1 displaystyle mathbb R times mathbb R n 1 These two factors may be related using polar coordinates For each point x displaystyle mathbf x of Rn displaystyle mathbb R n the standard Cartesian coordinates x x1 xn y1 z1 zn 1 y1 z displaystyle mathbf x x 1 dots x n y 1 z 1 dots z n 1 y 1 mathbf z can be transformed into a mixed polar Cartesian coordinate system x rsin 8 rcos 8 z displaystyle mathbf x r sin theta r cos theta hat mathbf z This says that points in Rn displaystyle mathbb R n may be expressed by taking the ray starting at the origin and passing through z z z Sn 2 displaystyle hat mathbf z mathbf z lVert mathbf z rVert in S n 2 rotating it towards 1 0 0 displaystyle 1 0 dots 0 by 8 arcsin y1 r displaystyle theta arcsin y 1 r and traveling a distance r x displaystyle r lVert mathbf x rVert along the ray Repeating this decomposition eventually leads to the standard spherical coordinate system Polyspherical coordinate systems arise from a generalization of this construction The space Rn displaystyle mathbb R n is split as the product of two Euclidean spaces of smaller dimension but neither space is required to be a line Specifically suppose that p displaystyle p and q displaystyle q are positive integers such that n p q displaystyle n p q Then Rn Rp Rq displaystyle mathbb R n mathbb R p times mathbb R q Using this decomposition a point x Rn displaystyle x in mathbb R n may be written as x x1 xn y1 yp z1 zq y z displaystyle mathbf x x 1 dots x n y 1 dots y p z 1 dots z q mathbf y mathbf z This can be transformed into a mixed polar Cartesian coordinate system by writing x rsin 8 y rcos 8 z displaystyle mathbf x r sin theta hat mathbf y r cos theta hat mathbf z Here y displaystyle hat mathbf y and z displaystyle hat mathbf z are the unit vectors associated to y displaystyle mathbf y and z displaystyle mathbf z This expresses x displaystyle mathbf x in terms of y Sp 1 displaystyle hat mathbf y in S p 1 z Sq 1 displaystyle hat mathbf z in S q 1 r 0 displaystyle r geq 0 and an angle 8 displaystyle theta It can be shown that the domain of 8 displaystyle theta is 0 2p displaystyle 0 2 pi if p q 1 displaystyle p q 1 0 p displaystyle 0 pi if exactly one of p displaystyle p and q displaystyle q is 1 displaystyle 1 and 0 p 2 displaystyle 0 pi 2 if neither p displaystyle p nor q displaystyle q are 1 displaystyle 1 The inverse transformation is r x 8 arcsin y x arccos z x arctan y z displaystyle begin aligned r amp lVert mathbf x rVert theta amp arcsin frac lVert mathbf y rVert lVert mathbf x rVert arccos frac lVert mathbf z rVert lVert mathbf x rVert arctan frac lVert mathbf y rVert lVert mathbf z rVert end aligned These splittings may be repeated as long as one of the factors involved has dimension two or greater A polyspherical coordinate system is the result of repeating these splittings until there are no Cartesian coordinates left Splittings after the first do not require a radial coordinate because the domains of y displaystyle hat mathbf y and z displaystyle hat mathbf z are spheres so the coordinates of a polyspherical coordinate system are a non negative radius and n 1 displaystyle n 1 angles The possible polyspherical coordinate systems correspond to binary trees with n displaystyle n leaves Each non leaf node in the tree corresponds to a splitting and determines an angular coordinate For instance the root of the tree represents Rn displaystyle mathbb R n and its immediate children represent the first splitting into Rp displaystyle mathbb R p and Rq displaystyle mathbb R q Leaf nodes correspond to Cartesian coordinates for Sn 1 displaystyle S n 1 The formulas for converting from polyspherical coordinates to Cartesian coordinates may be determined by finding the paths from the root to the leaf nodes These formulas are products with one factor for each branch taken by the path For a node whose corresponding angular coordinate is 8i displaystyle theta i taking the left branch introduces a factor of sin 8i displaystyle sin theta i and taking the right branch introduces a factor of cos 8i displaystyle cos theta i The inverse transformation from polyspherical coordinates to Cartesian coordinates is determined by grouping nodes Every pair of nodes having a common parent can be converted from a mixed polar Cartesian coordinate system to a Cartesian coordinate system using the above formulas for a splitting Polyspherical coordinates also have an interpretation in terms of the special orthogonal group A splitting Rn Rp Rq displaystyle mathbb R n mathbb R p times mathbb R q determines a subgroup SOp R SOq R SOn R displaystyle operatorname SO p mathbb R times operatorname SO q mathbb R subseteq operatorname SO n mathbb R This is the subgroup that leaves each of the two factors Sp 1 Sq 1 Sn 1 displaystyle S p 1 times S q 1 subseteq S n 1 fixed Choosing a set of coset representatives for the quotient is the same as choosing representative angles for this step of the polyspherical coordinate decomposition In polyspherical coordinates the volume measure on Rn displaystyle mathbb R n and the area measure on Sn 1 displaystyle S n 1 are products There is one factor for each angle and the volume measure on Rn displaystyle mathbb R n also has a factor for the radial coordinate The area measure has the form dAn 1 i 1n 1Fi 8i d8i displaystyle dA n 1 prod i 1 n 1 F i theta i d theta i where the factors Fi displaystyle F i are determined by the tree Similarly the volume measure is dVn rn 1dr i 1n 1Fi 8i d8i displaystyle dV n r n 1 dr prod i 1 n 1 F i theta i d theta i Suppose we have a node of the tree that corresponds to the decomposition Rn1 n2 Rn1 Rn2 displaystyle mathbb R n 1 n 2 mathbb R n 1 times mathbb R n 2 and that has angular coordinate 8 displaystyle theta The corresponding factor F displaystyle F depends on the values of n1 displaystyle n 1 and n2 displaystyle n 2 When the area measure is normalized so that the area of the sphere is 1 displaystyle 1 these factors are as follows If n1 n2 1 displaystyle n 1 n 2 1 then F 8 d82p displaystyle F theta frac d theta 2 pi If n1 gt 1 displaystyle n 1 gt 1 and n2 1 displaystyle n 2 1 and if B displaystyle mathrm B denotes the beta function then F 8 sinn1 1 8B n12 12 d8 displaystyle F theta frac sin n 1 1 theta mathrm B frac n 1 2 frac 1 2 d theta If n1 1 displaystyle n 1 1 and n2 gt 1 displaystyle n 2 gt 1 then F 8 cosn2 1 8B 12 n22 d8 displaystyle F theta frac cos n 2 1 theta mathrm B frac 1 2 frac n 2 2 d theta Finally if both n1 displaystyle n 1 and n2 displaystyle n 2 are greater than one then F 8 sinn1 1 8 cosn2 1 8 12B n12 n22 d8 displaystyle F theta frac sin n 1 1 theta cos n 2 1 theta frac 1 2 mathrm B frac n 1 2 frac n 2 2 d theta Stereographic projectionJust as a two dimensional sphere embedded in three dimensions can be mapped onto a two dimensional plane by a stereographic projection an n displaystyle n sphere can be mapped onto an n displaystyle n dimensional hyperplane by the n displaystyle n dimensional version of the stereographic projection For example the point x y z displaystyle x y z on a two dimensional sphere of radius 1 displaystyle 1 maps to the point x1 z y1 z displaystyle bigl tfrac x 1 z tfrac y 1 z bigr on the xy displaystyle xy plane In other words x y z x1 z y1 z displaystyle x y z mapsto left frac x 1 z frac y 1 z right Likewise the stereographic projection of an n displaystyle n sphere Sn displaystyle S n of radius 1 displaystyle 1 will map to the n 1 displaystyle n 1 dimensional hyperplane Rn 1 displaystyle mathbb R n 1 perpendicular to the xn displaystyle x n axis as x1 x2 xn x11 xn x21 xn xn 11 xn displaystyle x 1 x 2 ldots x n mapsto left frac x 1 1 x n frac x 2 1 x n ldots frac x n 1 1 x n right Probability distributionsUniformly at random on the n 1 sphere A set of points drawn from a uniform distribution on the surface of a unit 2 sphere generated using Marsaglia s algorithm To generate uniformly distributed random points on the unit n 1 displaystyle n 1 sphere that is the surface of the unit n displaystyle n ball Marsaglia 1972 gives the following algorithm Generate an n displaystyle n dimensional vector of normal deviates it suffices to use N 0 1 displaystyle N 0 1 although in fact the choice of the variance is arbitrary x x1 x2 xn displaystyle mathbf x x 1 x 2 ldots x n Now calculate the radius of this point r x12 x22 xn2 displaystyle r sqrt x 1 2 x 2 2 cdots x n 2 The vector 1rx displaystyle tfrac 1 r mathbf x is uniformly distributed over the surface of the unit n displaystyle n ball An alternative given by Marsaglia is to uniformly randomly select a point x x1 x2 xn displaystyle mathbf x x 1 x 2 ldots x n in the unit n cube by sampling each xi displaystyle x i independently from the uniform distribution over 1 1 displaystyle 1 1 computing r displaystyle r as above and rejecting the point and resampling if r 1 displaystyle r geq 1 i e if the point is not in the n displaystyle n ball and when a point in the ball is obtained scaling it up to the spherical surface by the factor 1r displaystyle tfrac 1 r then again 1rx displaystyle tfrac 1 r mathbf x is uniformly distributed over the surface of the unit n displaystyle n ball This method becomes very inefficient for higher dimensions as a vanishingly small fraction of the unit cube is contained in the sphere In ten dimensions less than 2 of the cube is filled by the sphere so that typically more than 50 attempts will be needed In seventy dimensions less than 10 24 displaystyle 10 24 of the cube is filled meaning typically a trillion quadrillion trials will be needed far more than a computer could ever carry out Uniformly at random within the n ball With a point selected uniformly at random from the surface of the unit n 1 displaystyle n 1 sphere e g by using Marsaglia s algorithm one needs only a radius to obtain a point uniformly at random from within the unit n displaystyle n ball If u displaystyle u is a number generated uniformly at random from the interval 0 1 displaystyle 0 1 and x displaystyle mathbf x is a point selected uniformly at random from the unit n 1 displaystyle n 1 sphere then u1 nx displaystyle u 1 n mathbf x is uniformly distributed within the unit n displaystyle n ball Alternatively points may be sampled uniformly from within the unit n displaystyle n ball by a reduction from the unit n 1 displaystyle n 1 sphere In particular if x1 x2 xn 2 displaystyle x 1 x 2 ldots x n 2 is a point selected uniformly from the unit n 1 displaystyle n 1 sphere then x1 x2 xn displaystyle x 1 x 2 ldots x n is uniformly distributed within the unit n displaystyle n ball i e by simply discarding two coordinates If n displaystyle n is sufficiently large most of the volume of the n displaystyle n ball will be contained in the region very close to its surface so a point selected from that volume will also probably be close to the surface This is one of the phenomena leading to the so called curse of dimensionality that arises in some numerical and other applications Distribution of the first coordinate Let y x12 displaystyle y x 1 2 be the square of the first coordinate of a point sampled uniformly at random from the n 1 displaystyle n 1 sphere then its probability density function for y 0 1 displaystyle y in 0 1 is r y G n2 pG n 12 1 y n 3 2y 1 2 displaystyle rho y frac Gamma bigl frac n 2 bigr sqrt pi Gamma bigl frac n 1 2 bigr 1 y n 3 2 y 1 2 Let z y N displaystyle z y N