Densities in tangent charts
A retraction's chart at a point carries the manifold's reference measure to a density on the tangent space, the chart's volume; with it, a random tangent vector pushed through the chart has a density on the manifold, given here for the charts of the rotations, the poses and the sphere.
A random point of a curved manifold is most easily made from a random tangent vector: draw in and move a point by it, . A density of is not, as it stands, a density of the point. The chart at stretches some regions and compresses others, and the density of the point carries the factor by which it does, the chart’s volume. This note defines that factor, says what it does to a density pushed through a chart and to a point of a quotient, and works it out for the charts that the rotations, the rigid motions and the sphere are usually given.
The volume of a chart#
Let be a manifold of dimension with a retraction , and a reference measure : a measure on with a smooth positive density in every chart, against which densities on are taken, as the densities of a model built forward are taken against the reference measure of each of its spaces. On it is Lebesgue measure; on a Lie group, Haar measure; on a sphere, surface measure.
Let be a manifold of dimension with a retraction and a reference measure , let , and let be an open set containing on which is a diffeomorphism onto an open set of . The volume of the chart at is the function such that
for every Borel set , and its log-volume is . The chart is global if , and full if .
On , the point is , the inverse of the chart on its whole image, which may be larger than the neighbourhood in which the retraction note first defines it. In words, the image under the chart of the measure on is restricted to , and so, for every nonnegative measurable on ,
which follows from the definition for indicator functions, and for the rest by linearity and monotone limits.
Two examples. On with Lebesgue measure, is a translation, so , and the chart is global and full. On the positive reals with Lebesgue measure, has derivative , so , the point itself: the chart is again global and full, but its volume is not at . A chart’s volume depends on the reference measure as much as on the retraction, and on the positive reals with the measure the same chart would have volume . On the positive orthant , with acting coordinate by coordinate, the log-volume is : read at the coordinate of a point, it is , whatever is.
Two consequences of (2) are used again and again. With it says that , so the volume of a full chart integrates to the total mass , the same at every and finite when is compact. And for a full chart it turns an integral over the manifold into one over the tangent space: with ,
An integral approximated in a chart is thus an integral of the integrand times the chart’s volume, and an expansion of its logarithm about a point expands , not alone.
A density pushed through a chart#
With the chart of Definition 1, let be a random vector of with density , and almost surely. Then has, with respect to , the density
for , and elsewhere.
So the log-density of the point is the log-density of its tangent coordinate, less the chart’s log-volume there. Where the chart compresses, , and the point’s density is larger than its coordinate’s, because the same probability sits on less of .
The condition is where the curvature of a space shows. A global chart meets it for every . A chart that is not global, such as the exponential chart of the rotations below, is a diffeomorphism only on a ball, while a normal has mass outside any ball. The retraction is still defined there, but it wraps: a vector outside reaches a point that a vector inside reaches too, and the law of has a density that sums over every vector reaching the point, an infinite sum on the rotations. The single term of Proposition 4 is then the density of part of that law, and the part it misses is no larger than the mass puts outside .
With the chart of Definition 1, let be defined on all of , let have density on , and let . Let be the law of , and the law with density with respect to , as in Proposition 4. Then integrates to , is the law of given , and
the supremum taken over the measurable sets of .
By Proposition 4, applied to the sub-probability density , for every measurable , so integrates to and is the conditional law. If , let be the law of given ; then , so , whose absolute value is at most . If , .
∎The measure a retraction normalizes#
A density is only meaningful against a measure that is fixed, and the measure a manifold carries most obviously is not always the right one. A manifold stored as a submanifold has a measure at hand, the surface measure that induces, and its charts’ volumes follow from the Jacobian of the retraction in storage. That measure depends on the storage, though, and not only on the manifold: the rotations stored as matrices and stored as unit quaternions have surface measures that differ by a constant factor, and for a type whose basis is not orthonormal, by a factor that varies from point to point. The measure is better fixed by the retraction itself, as the one whose charts all have volume at their centre, and such a measure exists on every manifold with a retraction.
Let be a manifold of dimension with a retraction smooth on an open . There is exactly one measure on with a continuous positive density in every chart such that every chart centred in has volume at its centre: the Riemannian volume measure of the metric
in which the tangent coordinates are orthonormal. It depends on the tangent coordinates alone: two retractions whose curves have the same velocities at normalize the same measure, whatever their behaviour beyond first order and however the manifold is stored.
The metric is smooth because is (Proposition 7), and positive definite. In the chart at , its volume measure has the density with respect to Lebesgue measure, where is the metric read in the chart, with the derivative of the chart into the tangent coordinates at . At , , so and . Any other measure with a continuous positive density in every chart has one with respect to too, with continuous, and its chart volumes are , so . They are all if and only if . The metric is defined by the tangent coordinates alone, and so is its volume measure.
∎On it is Lebesgue measure. On the positive reals, whose tangent coordinate measures relative change, a coordinate at is the velocity of the line, so the metric is on velocities and the measure is , which is why the chart of the example above, with Lebesgue measure, does not have volume at its centre. For an embedded manifold, the measure is computed from the storage.
Let be a submanifold of dimension with a retraction smooth on an open , its tangent coordinates read in storage, and the -dimensional surface measure induced by . The volume of the chart at with respect to is
with the Jacobian of in storage. There is exactly one measure on with a continuous density with respect to such that at every , namely
and its chart volumes, where , are
which is when is the same at every point.
The chart restricted to is a smooth embedding of an open set of into , with image in , and the surface measure of the image of a set under it is , the classical formula for the area of a parametrized surface. That is . A measure with continuous then has chart volumes , so at if and only if , and gives . This fixes at every point, and substituting it gives the chart volumes .
∎The measure of Proposition 7 is that of Proposition 6, read in storage. When is the same at every point, as it is for an orthonormal basis or a basis translated by a group, it is a constant multiple of . For the rotations stored as matrices with the left-translated basis , where is the skew matrix of the th unit vector, each column has Frobenius norm , so ; stored as unit quaternions, with the chart below, each column has norm , so . The normalized measure is the same in both, as Proposition 6 says it must be: the Haar measure that agrees with Lebesgue measure in the tangent coordinates at the identity. For a sphere with an orthonormal basis of each tangent plane, it is surface measure itself. Such a basis is smooth only off a point, as the first note allows, so the statements give a measure on the sphere without that point. Giving the point measure zero extends it to the sphere, here as surface measure. In general the metric of Proposition 6 need not extend across the points where is not smooth, and the measure is then defined only where it is.
Charts of Lie groups#
On a Lie group whose retraction translates a fixed chart of the identity, every chart is a translate of that one, and so is its volume.
Let be a Lie group of dimension with a Haar measure , invariant under left and right translations, and let be smooth, with , a diffeomorphism of an open onto an open subset of . For the retraction , and equally for , the chart at every has the domain and the volume , which does not depend on . If and is normalized so that , then
the product taken over the eigenvalues of , with multiplicity, and each factor read as where .
For a measurable , by the invariance of under left translation, and by its invariance under right translation, so both charts have the volume of the chart at . For the exponential, the derivative of at along is , where maps to the Lie algebra in the basis of the tangent coordinates. The normalized Haar measure is that of the left-invariant volume form taking the value on that basis at , and its pull-back by is therefore , positive on because is a diffeomorphism there. Since with , its eigenvalues are , and its determinant their product.
∎Compact groups and the semidirect products of the rotations with a vector space are unimodular: their left Haar measure is invariant under right translation too. The groups below are both, so a retraction that perturbs a point on the right, in its own frame, and one that perturbs it on the left, in a fixed frame of the world, have the same chart volume.
Products of charts#
A product of manifolds, with the product of their reference measures and the product retraction, has at every point the product of the factors’ charts.
For let be a manifold of dimension with a retraction and a reference measure , and let the chart at have domain , image and volume . Give the product measure and the product retraction. The chart at has domain , image and, at the stacked tangent ,
It is global if and only if every factor’s chart is, and full if and only if every factor’s chart is. If every is the measure ’s retraction normalizes, is the measure the product retraction normalizes.
The product retraction is , a diffeomorphism of onto because each factor is one of onto . For a rectangle of Borel sets , , by Tonelli’s theorem. Both and are measures on the Borel sets of , finite on the rectangles whose closures are compact in , of which countably many cover ; they agree on the rectangles, which are closed under intersection and generate the Borel sets, so they agree everywhere. The domain is all of if and only if every is all of . The complement of is the union of the sets in which the th coordinate lies outside , each of measure , so the chart is full if every factor’s is; and if a factor’s is not, the complement contains , of positive measure since each open has. Finally, the bases of the product retraction are block diagonal in the factors’ bases, so the metric of Proposition 6 is the product of the factors’ metrics, whose volume measure is the product of theirs.
∎A Euclidean factor with Lebesgue measure adds nothing to the log-volume. A pose stored as a rotation and a position in a fixed frame of the world, , with the rotation retracted by any of the charts below and the position by addition, has the rotation’s log-volume alone, which is what distinguishes it from , whose exponential couples the two.
Quotients#
A manifold divided by a finite group takes its measure, its densities and its charts’ volumes from the manifold above it.
Let a finite group of elements act freely on by diffeomorphisms that preserve the reference measure , with quotient and quotient map , and give the measure .
- If a random point of has the density with respect to , then has, with respect to , the density .
- Let the retraction of descend to , and let its chart at be a diffeomorphism of onto a set on which is injective. Then the chart of at has, on and with respect to , the volume of the chart of , the same at every representative. If is the measure the retraction of normalizes, is the measure the retraction of normalizes.
Let be a measurable set that meets every orbit exactly once; one is made by covering with countably many open sets over each of which has a local inverse, and taking the image of one local inverse over each, less the orbits already taken. For a measurable , write . Then is the disjoint union of the sets , so and : the quotient map carries on to . And
since each preserves , which is the first claim. For the second, the sets are disjoint: if with both in , then , so and is the identity, the action being free. So for a Borel set ,
and gives the same at every representative. If is normalized, at every , so every chart of has volume at its centre, and is the one measure with that property (Proposition 6).
∎The measure a retraction normalizes is preserved by the group whenever the retraction commutes with it, since the action then has at every point, and so preserves the metric of Proposition 6. So the hypotheses hold of the rotations as the quotient of the unit quaternions by the sign, with .
The two claims are the two ways of putting a law on the rotations. A law on the unit quaternions with the density is, as a law on the rotations, the law with the density : for a point drawn as in the stereographic chart, which is a chart of , the second term is the density at the quaternion on the far side of , reached exactly when (Proposition 14). It is negligible when is concentrated and is not when is broad. A point drawn as in the Cayley chart, which descends to the rotations, has a density on the rotations with one term, Proposition 4 with the Cayley chart’s volume, at whichever quaternions the point and are given by.
The usual charts#
The charts of the rotations and of the rigid motions are those of their notes, and this section gives their volumes.
Write for the angle of a rotation’s tangent coordinate in the exponential chart, , and for the skew matrix of . Each row is with respect to the normalized measure of Proposition 7: Haar measure on the groups, and surface measure on the sphere with an orthonormal basis of .
| space | chart | global | full | ||
|---|---|---|---|---|---|
| , exponential | no, | yes | |||
| , exponential | no, | yes | |||
| , exponential | no, | yes | |||
| , Cayley | (12) | yes | yes | ||
| , polar | , | (13) | yes | no, angles | |
| , stereographic | , | , | yes | yes | |
| , translated | , | the rotation chart’s | as the rotation chart | as the rotation chart | |
| , stereographic | , | yes | yes | ||
| , normalization | yes | no, a hemisphere |
The exponential charts. On , has the eigenvalues and , so by Proposition 8
is a diffeomorphism of the open ball onto the rotations by an angle less than , whose complement, the half-turns, has measure zero. On , with coordinates of rotation and translation, is block triangular with twice on its diagonal, and on , with a velocity besides, three times, so their volumes are the square and the cube of (11). Their exponentials, and with invertible for , are diffeomorphisms of onto the motions whose rotation is by less than . In every one of them the chart wraps beyond , and the volume depends on the rotation alone.
The Cayley chart. The rotation is by the angle about , and as a unit quaternion it is : the chart is the familiar first-order quaternion update , normalized. Its inverse needs no trigonometry,
for a quaternion or a matrix, where and are the vector and scalar parts and inverts ; the first is the same for and . The chart is a diffeomorphism of all of onto the rotations by less than . In the exponential chart, in polar coordinates with a unit axis, the normalized Haar measure is . With along the same axis, and , so the measure is , and Lebesgue measure in is : .
The polar chart. The polar factor of , the rotation nearest it, which an SVD also gives, is the rotation by about . The same substitution as for the Cayley chart, with , gives
The chart is global but reaches only the rotations by less than : a point is never further than a quarter turn from , whatever is.
The quaternion stereographic chart. On the unit quaternions , which cover the rotations twice, with Haar measure normalized at the identity by the same derivative, the quaternion is the rotation by the angle about , so that : these are the modified Rodrigues parameters, scaled by . The chart is the inverse of the stereographic projection of from , at , and reaches every quaternion but , so every rotation, running over . In the exponential chart, which on is a diffeomorphism of the ball , the measure is as on the rotations; with , and , so the measure is . The normalized measure is times surface measure, since the chart’s derivative at , , scales lengths by .
The translated charts of the motions. A chart of the rotations gives one of , , which is the group product of with when the rotation’s chart is a left translation, and likewise on with a velocity besides. Haar measure on the motions is the product of the rotations’ with Lebesgue measure, and the chart’s derivative is block triangular with , of determinant , in its translation block, so its log-volume is the rotation chart’s, and it is global, or full, when the rotation’s chart is. It is not the group’s exponential, , though the two agree to first order.
The stereographic chart. The chart is the inverse of the stereographic projection from , with coordinates halved so that its derivative at is . The inverse stereographic projection is conformal, with scale factor and so area factor , and multiplies it by . The chart reaches every point but .
The normalization chart. The point of the tangent plane at lies at the distance from the centre, and the ray to it meets the plane’s normal at an angle with ; a small area of the plane is projected along the ray onto the sphere with the factor . The chart, the gnomonic projection, reaches the open hemisphere around alone.
Computing the log-volumes. The log-volume (11) has a removable singularity at , as itself does, and is computed there from its series in . The Cayley and stereographic log-volumes are , the quaternion stereographic , and the normalization chart’s is of the same kind, smooth everywhere as written.
Built on by
- Spaces and quantities Every value in a model lives in a space, which fixes how it is stored, how it moves, and the typed handle code holds it by.
- The normal distribution skoro's normal is the law of a point moved by normal noise through its space's chart, on every space whose chart is global, with an exact density and sampler, a scale in four forms, roles that estimators read, its tangent among them, and the Gaussian and improper Gaussian replacements of a retirement.
- Rotations and rigid motions The crate skoro-spatial declares the rotations, the rigid motions and the extended poses as embedded types stored as quaternions up to sign, with the Cayley chart, global on each group, and declared volumes, so that they carry the normal in whatever sign their quaternions are given, and writes their maps as composites whose derivatives are the core's.
- The normal distribution in a chart The normal on a manifold with a global chart is the law of a point moved from its mean by Gaussian noise through the chart; its density is the Gaussian's less the chart's log-volume, its sampler is exact, and its expected information has a closed form, exact on flat and positive spaces and in the scale's block on curved ones.
- The uniform distribution on a compact manifold A manifold whose reference measure is finite has a uniform distribution, with the constant density one over its mass; in a full chart its tangent coordinate has the chart's volume as its density, a Student t for the usual charts of the rotations and the spheres, so it is a mixture of normals over their scales; and no single normal approaches it, since a normal's mass leaves every compact part of a global chart as its scale grows.
- Maximum a posteriori estimation The estimate this part of the mathematics computes is the mode of the posterior, the point at which the negative log-density of the free quantities at the observations is least; it needs no normalizer, it depends on the reference measure the density is taken against, and its objective is a sum of terms that each read a few quantities.
- Linearization and the Gauss–Newton step Linearizing the residuals of a sum of squares and log-volumes at a point gives a quadratic model that agrees with the function in value and gradient and whose curvature is the Gauss–Newton matrix; its minimizer is the Gauss–Newton step, its minimizer in a trust region the damped step, its iteration converges where the gradient vanishes at a rate set by the curvature it omits, and it is exact when the model is linear-Gaussian.
- The Laplace approximation A Laplace approximation replaces a density near a point by a Gaussian in the chart there; taken in a chart it approximates the density times the chart's volume, its mean, marginals, draws and evidence are computations on the linearization's rows, and its covariance omits curvature of the order of the noise's variance on a curved space.
- The uniform distribution on compact types, and broad scales of a normal on a curved type: Mathematics The uniform distribution on a type of finite mass, curved or finite and discrete, its constant term and its sampler; and what a normal with a large scale is on a curved type, with the ways of refusing it, bounding its scale, replacing its law and documenting it weighed against each other.
- Observed quaternions of arbitrary sign on outside data: Mathematics A unit quaternion names a rotation twice, and the stereographic chart of the unit quaternions tells the two names apart, so that a measurement given with the wrong sign is misread; the rotations, the rigid motions and the extended poses become the groups themselves, stored as quaternions up to sign under the Cayley chart, which cannot tell the signs apart, and the core learns to declare a type stored up to a finite group.
- Linearization and elimination: Mathematics How a query of a model is linearized at a point into factors of whitened rows and linear terms over its free quantities' tangent coordinates, and how eliminating those factors gives the step of a Gauss–Newton or Levenberg–Marquardt method, a Laplace approximation's marginals, and a retirement's replacement, an improper Gaussian that is the update and prediction of a Kalman filter when it determines the blanket; and how the roots of the expected information give a second assembly, for Fisher scoring of free scales.
- Rotations and rigid motions: Mathematics The rotations as unit quaternions with the stereographic chart, global and full with a declared volume so that they carry the normal, the rigid motions SE(3) and SE₂(3) as their semidirect products with the left-translated chart, and the usual maps of all three, each a composite of the core's operations.
- Normal distributions: Mathematics skoro's one normal distribution, the law of a point moved by normal noise through its chart, defined on every space whose chart is global and whose volume is known, so that flat, positive and curved quantities alike, measurements among them, are drawn and scored exactly; with its scale, its sampler, its properties, its expected information, its roles, and its use as a likelihood factor.
- Normal distributions: Implementation A crate `skoro-normal` whose `Normal` scores a quantity of any space with a global chart, with its term built from composites of the core's operations, an exact sampler that runs the space's retraction on the host, the four forms of the scale, the roles with the information root, a likelihood factor over data, and the stacked tangent of a retirement's replacement.
- Reference measures and chart volumes of spaces: Mathematics Every continuous type of the core gets a reference measure and the log-volume of its retraction's chart, Lebesgue measure with log-volumes and on the core's own types, the measure the retraction normalizes on an embedded type that declares its chart's domain and log-volume, and sums over products; a type that declares none has no densities.
- Reference measures and chart volumes of spaces: Implementation Every continuous `Space` gets a log-volume composite and a chart domain, an embedded declaration takes its chart's volume with `with_volume`, the core refuses a density, a proposal or an integration over a type without one, and `testing::check_volume` holds a declaration to the area formula.