Why Matrix Inversion Changes the Density
In multivariate sampling theory, a Wishart matrix often represents accumulated scatter or information. Its inverse appears when a covariance-like quantity is inverted, so its distribution matters in its own right. The transformation is not obtained by merely replacing a matrix with its inverse in the Wishart formula: the density must also account for how inversion changes volume in the space of symmetric matrices.
We use the Wishart scale convention \(W\sim W_p(\nu,\Psi)\), where \(\Psi\) is a positive-definite scale matrix and \(\nu\) is the degrees-of-freedom parameter. The central Wishart density, with respect to Lebesgue measure on the distinct entries of a symmetric matrix, is the starting point. The key calculation is the Jacobian of the map \(W\mapsto W^{-1}\).
The scale convention is important: if \(W\sim W_p(\nu,\Psi)\), then \(W^{-1}\sim IW_p(\nu,\Psi)\). In the exponential term, \(\Psi^{-1}\) multiplies \(X^{-1}\); it is not \(\Psi\). Also, \(\nu>p-1\) is the condition for the standard Wishart density on the full positive-definite cone. In the Gaussian-sample construction, the degrees of freedom are often an integer and the sample scatter has full rank when \(\nu\ge p\).
The Jacobian of Matrix Inversion
A symmetric \(p\times p\) matrix has \(p(p+1)/2\) distinct coordinates: its diagonal entries and its entries above the diagonal. Densities on symmetric matrices are understood relative to Lebesgue measure in those coordinates. The following result gives the volume change needed for inversion.
To prove this, first consider the linear map on symmetric matrices \(H\mapsto AHA^\mathsf{T}\), for nonsingular \(A\). Its absolute determinant is \(|A|^{p+1}\). Indeed, write a singular value decomposition \(A=UDV^\mathsf{T}\), where \(U,V\) are orthogonal and \(D=\operatorname{diag}(d_1,\ldots,d_p)\) with \(d_i>0\). The orthogonal congruence maps \(H\mapsto UHU^\mathsf{T}\) and \(H\mapsto VHV^\mathsf{T}\) preserve volume on the space of symmetric matrices, so it is enough to calculate for \(D\).
For diagonal \(D\), the coordinate \(h_{ii}\) is multiplied by \(d_i^2\), while each off-diagonal coordinate \(h_{ij}\), \(i<j\), is multiplied by \(d_i d_j\). Thus the absolute determinant is $$ \left(\prod_{i=1}^p d_i^2\right) \left(\prod_{i<j}d_i d_j\right) =\prod_{i=1}^p d_i^{p+1} =|A|^{p+1}. $$ For inversion, differentiating \(X X^{-1}=I\) in a symmetric direction \(H\) gives $$ D(X\mapsto X^{-1})[H]=-X^{-1}HX^{-1}. $$ This is the negative of a congruence map with \(A=X^{-1}\). Multiplication by \(-1\) has absolute determinant one on the symmetric-matrix space. The congruence result therefore gives the absolute Jacobian \(|X^{-1}|^{p+1}=|X|^{-(p+1)}\). \(\square\)
Deriving the Inverse-Wishart Density
For \(\nu>p-1\) and \(\Psi\succ0\), the central Wishart density is $$ f_W(W)= \frac{|W|^{(\nu-p-1)/2}} {2^{\nu p/2}|\Psi|^{\nu/2}\Gamma_p(\nu/2)} \exp\!\left[-\frac12\operatorname{tr}(\Psi^{-1}W)\right], \qquad W\succ0. $$ Set \(X=W^{-1}\), equivalently \(W=X^{-1}\). Inversion is a one-to-one differentiable map from the positive-definite cone onto itself, and its absolute Jacobian is \(|X|^{-(p+1)}\). The change-of-variables formula gives $$ \begin{aligned} f_X(X) &=f_W(X^{-1})|X|^{-(p+1)}\\ &=\frac{|X^{-1}|^{(\nu-p-1)/2}} {2^{\nu p/2}|\Psi|^{\nu/2}\Gamma_p(\nu/2)} \exp\!\left[-\frac12\operatorname{tr}(\Psi^{-1}X^{-1})\right] |X|^{-(p+1)}\\ &=\frac{|\Psi|^{-\nu/2}} {2^{\nu p/2}\Gamma_p(\nu/2)} |X|^{-(\nu+p+1)/2} \exp\!\left[-\frac12\operatorname{tr}(\Psi^{-1}X^{-1})\right], \qquad X\succ0. \end{aligned} $$ This is the inverse-Wishart density in the scale convention used here. The determinant exponent follows because \(|X^{-1}|=|X|^{-1}\), so the two powers of \(|X|\) combine as $$ -\frac{\nu-p-1}{2}-(p+1)=-\frac{\nu+p+1}{2}. $$ The scale determinant remains \(|\Psi|^{-\nu/2}\): inversion changes the variable-dependent factor and contributes its Jacobian, but it does not change the Wishart normalizing factor involving \(\Psi\). Since the transformation is bijective and the Wishart density integrates to one, the resulting inverse-Wishart density also integrates to one.
Worked Densities
Worked Example: The Scalar Case
Let \(p=1\), \(\nu=6\), and \(\Psi=3\). In one dimension the positive-definite cone is simply \(x>0\), \(\Gamma_1(3)=\Gamma(3)=2\), and the density formula reduces to $$ f_X(x)= \frac{3^{-3}}{2^3\Gamma(3)} x^{-(6+1+1)/2} \exp\!\left(-\frac{1}{6x}\right), \qquad x>0. $$
The normalizing coefficient is \(3^{-3}/(8\cdot2)=(1/27)/16=1/432\), and the determinant power becomes \(x^{-4}\). Therefore $$ f_X(x)=\frac{1}{432}x^{-4}\exp\!\left(-\frac{1}{6x}\right),\qquad x>0. $$ Equivalently, a scalar Wishart variable \(W\) with these parameters has a gamma density, and \(X=1/W\) has the inverse-gamma form displayed above. The Jacobian of \(w=1/x\) is \(x^{-2}\), consistent with the general matrix Jacobian \(|X|^{-(p+1)}=x^{-2}\) when \(p=1\).
Worked Example: Evaluating a Two-Dimensional Density
Take \(p=2\), \(\nu=4\), \(\Psi=\operatorname{diag}(2,1)\), and evaluate the density at \(X=\operatorname{diag}(1,2)\). The degrees-of-freedom condition holds because \(4>2-1\). The determinants are \(|\Psi|=2\) and \(|X|=2\), while $$ \Psi^{-1}=\operatorname{diag}(1/2,1),\qquad X^{-1}=\operatorname{diag}(1,1/2), \qquad \operatorname{tr}(\Psi^{-1}X^{-1})=1. $$
The multivariate gamma term is $$ \Gamma_2(2)=\pi^{1/2}\Gamma(2)\Gamma(3/2) =\sqrt{\pi}\cdot1\cdot\frac{\sqrt{\pi}}{2} =\frac{\pi}{2}. $$ The normalizing denominator is $$ 2^{\nu p/2}|\Psi|^{\nu/2}\Gamma_2(\nu/2) =2^4\cdot2^2\cdot\frac{\pi}{2} =32\pi. $$ The determinant factor is \(2^{-(4+2+1)/2}=2^{-7/2}\), and the exponential factor is \(e^{-1/2}\). Hence $$ f_X(X)=\frac{1}{32\pi}\,2^{-7/2}e^{-1/2} =\frac{e^{-1/2}}{256\sqrt{2}\,\pi}. $$
Worked Example: Inverting Gaussian Sample Scatter
Let \(Z\) be a \(3\times2\) matrix whose three rows are independent \(N_2(0,I_2)\) vectors, and set \(S=Z^\mathsf{T}Z\). By the Gaussian construction of the Wishart distribution, \(S\sim W_2(3,I_2)\). Since the three Gaussian observations span \(\mathbb R^2\) with probability one, \(S\succ0\) with probability one. Thus \(X=S^{-1}\) has distribution \(IW_2(3,I_2)\).
Here \(\nu=3>1\), \(|I_2|=1\), and $$ \Gamma_2(3/2) =\sqrt{\pi}\,\Gamma(3/2)\Gamma(1) =\frac{\pi}{2}. $$ Consequently, for any \(X\succ0\), $$ f_X(X)=\frac{1}{2^3(\pi/2)} |X|^{-(3+2+1)/2} \exp\!\left[-\frac12\operatorname{tr}(X^{-1})\right] =\frac{1}{4\pi}|X|^{-3} \exp\!\left[-\frac12\operatorname{tr}(X^{-1})\right]. $$ At \(X=I_2\), the determinant is one and \(\operatorname{tr}(X^{-1})=2\). The density value is therefore \(f_X(I_2)=e^{-1}/(4\pi)\). This is a density with respect to the three distinct symmetric-matrix coordinates, not a probability assigned to the single matrix \(I_2\).
Support, Parameterization, and a Common Pitfall
The inverse-Wishart support is the open cone \(X\succ0\), just as the Wishart support is \(W\succ0\). Inversion preserves positive definiteness: if \(X\succ0\), then \(X^{-1}\succ0\); conversely, the inverse of a positive-definite matrix is positive definite. The degrees-of-freedom condition in the density is \(\nu>p-1\), inherited from the Wishart density being transformed. This condition should not be confused with the stronger integer rank condition that arises in one particular construction from a finite Gaussian sample.
A frequent error is to invert the argument of the density but leave out the Jacobian. That would give a determinant power \(-(\nu-p-1)/2\), rather than the correct \(-(\nu+p+1)/2\). The missing factor is precisely \(|X|^{-(p+1)}\). Another common error is to change the sign of the scale determinant exponent while transforming. The Wishart density contains \(|\Psi|^{-\nu/2}\); because the Jacobian depends on \(X\), not \(\Psi\), this factor remains unchanged.
Check Your Understanding
Use the definitions and derivation above to answer the following.
- For which values of \(\nu\) does the standard full-rank inverse-Wishart density exist in dimension \(p\)?
- What is the absolute Jacobian of \(X\mapsto X^{-1}\) when \(p=3\)?
- If \(W\sim W_p(\nu,\Psi)\), which matrix appears in the inverse-Wishart exponential trace: \(\Psi X^{-1}\) or \(\Psi^{-1}X^{-1}\)?
- Explain why the determinant exponent in the inverse-Wishart density contains the additional \(p+1\).
- For \(p=1\), verify that the matrix-inversion Jacobian agrees with the derivative of \(x\mapsto1/x\).