Why the Eigenvalues Decide the Distribution
A quadratic form in a Gaussian vector can look like a sum of squares without actually having a chi-square distribution. The key distinction is whether the directions being squared are weighted equally. For a standard normal vector, the eigenvalues of the matrix give exactly those weights. This tutorial establishes the precise criterion for an unscaled chi-square law, then separates it from the more general case of a scaled chi-square law.
Let \(Z\) be a \(p\)-dimensional vector whose entries are independent \(N(0,1)\) random variables, and let \(A\) be a real symmetric \(p\times p\) matrix. We study \(Q=Z^\mathsf{T}AZ\). If a quadratic form is initially written with a nonsymmetric matrix, replacing it by its symmetric part \((A+A^\mathsf{T})/2\) leaves the quadratic form unchanged.
By the spectral theorem, there is an orthogonal matrix \(U\) such that \(A=U\Lambda U^\mathsf{T}\), where \(\Lambda\) is diagonal with eigenvalues \(\lambda_1,\ldots,\lambda_p\). The standard normal density is unchanged by orthogonal transformations, so \(Y=U^\mathsf{T}Z\) again has independent \(N(0,1)\) entries. Consequently,
This weighted-sum representation is the starting point. A chi-square law has unit weights on the included squared normals and zero weights on the rest. The main issue is proving that no different set of eigenvalues can produce the same law.
The Exact Criterion
We prove both directions. The forward direction uses the moment-generating function (MGF), including when some eigenvalues might be negative; thus nonnegativity of the quadratic form is not assumed in advance.
For \(Q=\sum_i\lambda_iY_i^2\), independence and the one-dimensional normal integral give, for \(t\) in an open interval about zero where each \(1-2t\lambda_i>0\),
The interval exists because there are finitely many finite eigenvalues. The same formula for a chi-square variable is \(M_{\chi^2_k}(t)=(1-2t)^{-k/2}\), for \(t<1/2\).
Conversely, suppose \(Q\sim\chi^2_k\). Their MGFs agree on an open interval about zero. Taking logarithms and differentiating there gives
Both sides are rational functions of \(t\). Because they agree on an interval, multiplying by their denominators gives a polynomial that vanishes at infinitely many points; that polynomial is identically zero. The rational functions therefore agree wherever both are defined. Each nonzero eigenvalue \(\lambda_i\) contributes a pole at \(t=1/(2\lambda_i)\) on the left, with residue \(-1/2\). Eigenvalues that are equal contribute the same pole, so their residues add; distinct eigenvalues have distinct poles and cannot cancel one another. The right side has a pole only at \(t=1/2\), with residue \(-k/2\). Thus every nonzero eigenvalue must be \(1\). If there are \(r\) such eigenvalues, the residue at \(1/2\) on the left is \(-r/2\); equality gives \(r=k\). All other eigenvalues are zero. The spectral theorem now gives \(A^2=A\), and its rank is the number of its nonzero eigenvalues, namely \(k\). \(\square\)
The criterion is stronger than checking that \(Q\) is nonnegative or that its mean matches a proposed chi-square mean. It requires the entire spectrum to consist only of zeros and ones.
Worked Example: A Noncoordinate Projection Gives an Unscaled Chi-Square
Take
where \(Z_1,Z_2\) are independent \(N(0,1)\) variables. The vector \((1,1)^\mathsf{T}\) is an eigenvector with eigenvalue \(1\), and \((1,-1)^\mathsf{T}\) is an eigenvector with eigenvalue \(0\). There is exactly one unit eigenvalue and one zero eigenvalue, so the theorem gives \(Q\sim\chi^2_1\). Directly,
The variable \((Z_1+Z_2)/\sqrt{2}\) is \(N(0,1)\), confirming the result. The example also shows that the matrix need not be diagonal in the original coordinates.
Scaled Chi-Square Laws Are Different
Equal positive eigenvalues produce a scaled chi-square law, not necessarily an unscaled one. The distinction can be characterized just as sharply.
To see the necessity, the MGF of \(c\chi^2_k\) is \((1-2ct)^{-k/2}\). Equating it to the MGF of \(Q\), taking logarithms, and differentiating gives
The rational-function argument used in the preceding proof applies again. The right side has its only pole at \(1/(2c)\); each nonzero eigenvalue on the left contributes a pole at \(1/(2\lambda_i)\), with residue \(-1/2\). Equality forces every nonzero eigenvalue to be \(c\), and matching residues forces exactly \(k\) such eigenvalues. Conversely, those eigenvalues give \(Q=c\sum_{i=1}^{k}Y_i^2\), which has the stated law.
Worked Example: Equal Weights Give a Scaled Chi-Square
Let \(A=\operatorname{diag}(3,3,0)\), where \(\operatorname{diag}\) denotes a diagonal matrix with the listed entries. Then
This is not an unscaled chi-square law: the two nonzero eigenvalues are \(3\), not \(1\). As a check, \(E[Q]=3+3=6\) and \(\operatorname{Var}(Q)=2(3^2+3^2)=36\). A chi-square law with mean \(6\) would have \(6\) degrees of freedom and variance \(12\), not \(36\).
Worked Example: Unequal Positive Weights Do Not Give a Scaled Chi-Square
Let \(A=\operatorname{diag}(1,1/4,0)\). Then \(Q=Y_1^2+\frac14Y_2^2\), a positively weighted sum of independent squared standard normals. Its nonzero eigenvalues are unequal, so the scaled-law criterion rules out both an unscaled and any scaled chi-square distribution.
The first two moments provide a useful numerical check. Since \(E[Y_i^2]=1\) and \(\operatorname{Var}(Y_i^2)=2\),
If \(Q\) had law \(c\chi^2_k\), its mean and variance would be \(ck\) and \(2c^2k\). Matching these two moments would require \(c=\operatorname{Var}(Q)/(2E[Q])=17/20\) and \(k=E[Q]/c=25/17\). These moment matches do not establish a scaled chi-square law; the unequal eigenvalues show that no such law is possible.
What the Criterion Rules Out
A negative eigenvalue is an immediate warning sign: along its eigendirection, the weighted sum contains a negative multiple of a squared normal. The exact theorem already rules out a chi-square law, whose values are nonnegative, because the required spectrum contains only zeros and ones. But even positive eigenvalues do not suffice. They must also all equal \(1\) for an unscaled chi-square, or all equal the same \(c>0\) for a scaled chi-square.
A common mistake is to see a sum of squared normal coordinates and conclude that it is chi-square. For example, \(3Y_1^2+3Y_2^2\) is indeed a constant times a sum of two squared standard normals, but its law is \(3\chi^2_2\), not \(\chi^2_2\). Another tempting shortcut is to match means: many different eigenvalue lists can have the same sum and hence the same mean. Matching a mean, or even a few moments, is not a substitute for the eigenvalue criterion.
Check Your Understanding
Use the eigenvalue criteria to answer these questions.
- A symmetric matrix has eigenvalues \(1,1,0,0\). What is the distribution of its quadratic form in a standard normal vector, and what is its rank?
- A matrix has eigenvalues \(2,2,0\). Is the resulting quadratic form unscaled chi-square, scaled chi-square, or neither? State its law.
- Why does a rational-function identity in the proof rule out a negative eigenvalue when the target is chi-square?
- A quadratic form has nonzero eigenvalues \(1\) and \(1/2\). Can it have a scaled chi-square law? Explain using the criterion.
- Why does matching the mean of a quadratic form to the mean of a chi-square variable fail to establish equality in distribution?