On the previous page we stated, without proof, the density distribution of \(SO(3)\) in Rodrigues space. Here we explain the underlying concept — the Jacobian — and derive that result. In brief, the Jacobian measures how much a coordinate transformation expands or contracts infinitesimal lengths, areas, or volumes: it is the multivariable generalisation of the single-variable derivative \(dx/dt\).

What is the Determinant?

Before discussing the Jacobian, let us review the meaning of the determinant (feel free to skip this if you are already comfortable with it). The determinant is a scalar quantity defined for square matrices. Consider the \(3\times3\) matrix
$$M=\begin{pmatrix}a_x&b_x&c_x\\a_y&b_y&c_y\\a_z&b_z&c_z\end{pmatrix}=\left(\mathbf{a}\mid\mathbf{b}\mid\mathbf{c}\right),$$
where \(\mathbf{a},\mathbf{b},\mathbf{c}\) are column vectors. Its determinant is
$$\det M=a_x(b_yc_z-c_yb_z)-b_x(a_yc_z-c_ya_z)+c_x(a_yb_z-b_ya_z)=\mathbf{a}\cdot(\mathbf{b}\times\mathbf{c})=\mathbf{b}\cdot(\mathbf{c}\times\mathbf{a})=\mathbf{c}\cdot(\mathbf{a}\times\mathbf{b}),$$
where \(\cdot\) is the dot product and \(\times\) is the cross product1.

For three vectors \(\mathbf{u},\mathbf{v},\mathbf{w}\) in three-dimensional space, the volume of the parallelepiped they span is \(V=\mathbf{u}\cdot(\mathbf{v}\times\mathbf{w})\)2. If these vectors are mapped to \(\mathbf{u}’,\mathbf{v}’,\mathbf{w}’\) by a linear transformation \(M\), the new volume satisfies3
$$V’=\mathbf{u}’\cdot(\mathbf{v}’\times\mathbf{w}’)=[\mathbf{u}\cdot(\mathbf{v}\times\mathbf{w})][\mathbf{a}\cdot(\mathbf{b}\times\mathbf{c})]=V\det M.$$

The determinant \(\det M\) is the ratio of volumes before and after the linear transformation \(M\). Replace “volume” with “length” (1D), “area” (2D), or “hypervolume” (\(\ge4\)D) for other dimensions.

The sign of \(\det M\) encodes orientation:

When orientation is irrelevant, use \(|\det M|\). Useful identities include:
$$\det(I)=1,\quad\det(AB)=\det(A)\det(B),\quad\det(A^{-1})=\{\det(A)\}^{-1},\quad\det(A^{\mathrm{T}})=\det(A).$$

Orthogonal Matrices

A related concept worth knowing alongside determinants is the orthogonal matrix. While \(|\det M|=1\) preserves volume, it does not guarantee that distances and angles are preserved. For example, \(M=\mathrm{diag}(2,\frac{1}{2},1)\) has \(\det M=1\) but does not preserve distances. The matrices that preserve both lengths and angles are the orthogonal matrices, defined4 by \(MM^{\mathrm{T}}=M^{\mathrm{T}}M=I\), which is equivalent to requiring \(\mathbf{a},\mathbf{b},\mathbf{c}\) to be mutually orthogonal unit vectors. Every orthogonal matrix satisfies \(\det M=\pm1\)5. Rotation matrices (\(\det=+1\)) preserve orientation; reflection, inversion, and rotoreflection operations (\(\det=-1\)) reverse it.

The Gram Matrix

The Gram matrix of an \(m\times n\) matrix \(M\) is defined as \(G=M^*M\), where \(M^*\) is the conjugate transpose6. \(G\) is Hermitian7. This construction converts any matrix into a square one, making it widely useful. For real matrices, \(M^*=M^{\mathrm{T}}\).

As an example, take two vectors \(\mathbf{u}=(u_x,u_y,u_z)\) and \(\mathbf{v}=(v_x,v_y,v_z)\) and form the \(3\times2\) matrix \(M=(\mathbf{u}\mid\mathbf{v})\). Its Gram matrix is
$$G=M^{\mathrm{T}}M=\begin{pmatrix}\mathbf{u}^2&\mathbf{u}\cdot\mathbf{v}\\\mathbf{u}\cdot\mathbf{v}&\mathbf{v}^2\end{pmatrix},$$
and
$$\det G=\mathbf{u}^2\mathbf{v}^2-(\mathbf{u}\cdot\mathbf{v})^2=(\mathbf{u}\times\mathbf{v})^2.$$
This is the square of the area of the parallelogram spanned by \(\mathbf{u}\) and \(\mathbf{v}\). More generally: if \(M\) is an \(m\times n\) matrix whose columns are \(n\) vectors in \(m\)-dimensional space, then \(\det(M^*M)\) equals the square of the \(n\)-dimensional volume spanned by those vectors.

The Jacobian

For a general (not necessarily linear) coordinate transformation \((u,v,w)=f(x,y,z)\), the Jacobian matrix is
$$J=\frac{\partial(u,v,w)}{\partial(x,y,z)}=\begin{pmatrix}\frac{\partial u}{\partial x}&\frac{\partial u}{\partial y}&\frac{\partial u}{\partial z}\\\frac{\partial v}{\partial x}&\frac{\partial v}{\partial y}&\frac{\partial v}{\partial z}\\\frac{\partial w}{\partial x}&\frac{\partial w}{\partial y}&\frac{\partial w}{\partial z}\end{pmatrix},$$
and its determinant \(\det J\) is the Jacobian determinant (or simply the Jacobian). The Jacobian matrix is the local linear approximation of the transformation, so the infinitesimal volume element transforms as
$$du\,dv\,dw=\left|\det\frac{\partial(u,v,w)}{\partial(x,y,z)}\right|dx\,dy\,dz.$$
For probability densities: if \(p(x,y,z)\) and \(p'(u,v,w)\) are the densities in the two coordinate systems, then \(p\,dx\,dy\,dz=p’\,du\,dv\,dw\) gives
$$p(x,y,z)=p'(f(x,y,z))\left|\det\frac{\partial(u,v,w)}{\partial(x,y,z)}\right|.$$
The statement “\(SO(3)\) is uniform on \(S^3\) but not in Rodrigues space” is precisely a density-transformation problem of this type.

Jacobian of Spherical Polar Coordinates

In 3D spherical polar coordinates (colatitude \(\theta\), longitude \(\varphi\), radius \(r\), as in the Spherical Geometry page):
$$x=r\sin\theta\cos\varphi,\quad y=r\sin\theta\sin\varphi,\quad z=r\cos\theta.$$
The Jacobian matrix is
$$J=\frac{\partial(x,y,z)}{\partial(r,\theta,\varphi)}=\begin{pmatrix}\sin\theta\cos\varphi&r\cos\theta\cos\varphi&-r\sin\theta\sin\varphi\\\sin\theta\sin\varphi&r\cos\theta\sin\varphi&r\sin\theta\cos\varphi\\\cos\theta&-r\sin\theta&0\end{pmatrix},$$
with \(|\det J|=r^2\sin\theta\). Hence
$$dx\,dy\,dz=r^2\sin\theta\,dr\,d\theta\,d\varphi,$$
and on the unit sphere (\(r=1\)) the area element is \(dS=\sin\theta\,d\theta\,d\varphi\). The factor \(\sin\theta\) appearing in the cap and spherical triangle area integrals on the Spherical Geometry page arises precisely from this Jacobian.

Jacobian of the Unit Quaternion – Rodrigues Space Map

Now for the main calculation. Consider the map from Rodrigues coordinates \(\mathbf{r}=(x,y,z)\) to unit quaternion \(q=(s,v_x,v_y,v_z)\), with \(\rho=\|\mathbf{r}\|\):
$$s=\frac{1}{\sqrt{1+\rho^2}},\quad v_x=sx,\quad v_y=sy,\quad v_z=sz.$$
This is a map \(\mathbb{R}^3\to S^3\subset\mathbb{R}^4\), so a standard \(3\times3\) Jacobian cannot be used directly. Instead, we use the Gram matrix.

Define the \(4\times3\) Jacobian matrix \(J=\partial(s,v_x,v_y,v_z)/\partial(x,y,z)\). Computing the partial derivatives gives
$$J=s^3\begin{pmatrix}-x&-y&-z\\1+y^2+z^2&-xy&-zx\\-xy&1+z^2+x^2&-yz\\-zx&-yz&1+x^2+y^2\end{pmatrix}=s^3(\mathbf{q}_x\mid\mathbf{q}_y\mid\mathbf{q}_z).$$
The volume element in Rodrigues space maps to a volume element on \(S^3\) scaled by \(\sqrt{\det(J^*J)}\).

The Gram matrix is8
$$G=J^*J=s^4\begin{pmatrix}1+y^2+z^2&-xy&-zx\\-xy&1+z^2+x^2&-yz\\-zx&-yz&1+x^2+y^2\end{pmatrix}.$$
This can be written as9
$$G=s^2(I-s^2\mathbf{r}\,\mathbf{r}^*),$$
where \(I\) is the \(3\times3\) identity, \(\mathbf{r}\) is the column vector, and \(\mathbf{r}^*\) is the row vector. Applying the matrix determinant lemma10:
$$\det G=\det[s^2(I-s^2\mathbf{r}\,\mathbf{r}^*)]=(s^2)^3\det(I)(1-s^2\mathbf{r}^*I\,\mathbf{r})=s^8.$$
Remarkably, the result is simply \(s^8\). Therefore, the infinitesimal volume element \(d^3\mathbf{r}=dx\,dy\,dz\) in Rodrigues space maps to a volume element on \(S^3\) scaled by
$$\sqrt{\det G}=s^4=\frac{1}{(1+\rho^2)^2}.$$
The Haar measure (uniform volume element on \(S^3\)) expressed in Rodrigues coordinates is
$$d\mu\propto\frac{1}{(1+\rho^2)^2}\,d^3\mathbf{r},$$
so the density function is
$$P(\rho)\propto\frac{1}{(1+\rho^2)^2},$$
which, after normalisation, yields the formula stated on the Rodrigues Space page.


  1. For an \(n\times n\) matrix \(A\): \(\det A=\sum_{\sigma\in S_n}s(\sigma)\prod_{i=1}^{n}a_{i,\sigma(i)}\), where \(S_n\) is the set of all \(n!\) permutations of \(\{1,\ldots,n\}\) and \(s(\sigma)=\pm1\) for even/odd permutations. ↩︎
  2. \(\mathbf{v}\times\mathbf{w}\) has magnitude equal to the area of the parallelogram spanned by \(\mathbf{v}\) and \(\mathbf{w}\), and direction normal to it. The dot product with \(\mathbf{u}\) then gives the height, hence the volume. ↩︎
  3. Expand \(\mathbf{u}’=(u_x\mathbf{a}+u_y\mathbf{b}+u_z\mathbf{c})\) etc., compute the triple product using \(\mathbf{a}\times\mathbf{a}=0\) and \(\mathbf{a}\cdot(\mathbf{b}\times\mathbf{c})=\det M\). ↩︎
  4. For complex matrices, the generalisation of an orthogonal matrix is a unitary matrix: \(MM^*=M^*M=I\). ↩︎
  5. Since \(\det(R^{\mathrm{T}}R)=\{\det R\}^2=\det I=1\). ↩︎
  6. The conjugate transpose transposes and takes the complex conjugate of every entry. For real matrices it reduces to the ordinary transpose. ↩︎
  7. A matrix equal to its own conjugate transpose. For real matrices this means symmetric. ↩︎
  8. This is not a coincidence. Writing \(J’=J/s^3\) and noting \(G=J’^*J’=(1+\rho^2)A\) where \(A=(1+\rho^2)I-\mathbf{r}\mathbf{r}^*\), one finds \(G=s^4(1+\rho^2)A=s^2 A\). The Gram matrix has the same block form as the lower part of \(J\). ↩︎
  9. This is an instance of a rank-1 update: for a symmetric matrix \(A’=\sigma I+\mathbf{u}\mathbf{u}^*\), the form follows from \(A=(1+\rho^2)I-\mathbf{r}\mathbf{r}^*\). ↩︎
  10. Matrix determinant lemma: \(\det(A+\mathbf{u}\mathbf{v}^*)=(1+\mathbf{v}^*A^{-1}\mathbf{u})\det(A)\). ↩︎
contents