Why Verify a Matrix Partition?
A sum-of-squares decomposition is more than an algebraic identity: under a Gaussian model, its matrix components can describe independent random quantities with known distributions. To use that conclusion, however, the matrices must have the right structure. This tutorial checks that structure in explicit examples: symmetry, idempotence, mutual orthogonality, and a sum equal to the identity.
The central objects are orthogonal projection matrices. A projection extracts the part of a vector lying in a specified subspace; orthogonal projections onto perpendicular subspaces produce components that do not overlap. Under a Gaussian distribution with spherical covariance, the corresponding projected components are independent.
If \(y\in\mathbb R^n\) and \(P_i\) is symmetric and idempotent, the projected sum of squares is \(y'P_i y\). The partition identity gives an exact decomposition:
Each term is nonnegative. In fact, \(y'P_i y=(P_i y)'(P_i y)=\lVert P_i y\rVert^2\), because \(P_i'P_i=P_i^2=P_i\). Thus the decomposition divides the squared length of \(y\) among perpendicular projected components.
A Gaussian Result for the Components
The matrix checks become especially useful when \(Y\) is Gaussian. The next result states precisely how the ranks and projected means determine the distributions.
To see why the theorem holds, choose an orthonormal basis for the range of each \(P_i\). The ranges are perpendicular: if \(x=P_i a\) and \(z=P_j b\), then \(x'z=a'P_iP_jb=0\). Their dimensions sum to \(n\), since the ranges are mutually perpendicular and their projections sum to \(I_n\). Joining the bases therefore gives an orthonormal basis of \(\mathbb R^n\).
In those coordinates, each \(P_i\) keeps the coordinates belonging to its range and sets the others to zero. The transformed Gaussian vector still has covariance \(\sigma^2 I_n\); its coordinates are independent normal random variables. Consequently, each quadratic form is the sum of squares of the coordinates in one block, and different blocks are independent.
For each projection, take an orthonormal basis of its range. Mutual orthogonality makes the ranges perpendicular.
The ranges together span \(\mathbb R^n\), so their bases form one orthonormal coordinate system.
In the new coordinates, each quadratic form is a block sum of squared independent normal coordinates; its block size is the rank, and its noncentrality is the squared projected mean divided by \(\sigma^2\).
The rank statement follows directly from these coordinates: the \(i\)th block contains \(r_i\) coordinates. The mean vector in that block is the coordinate representation of \(P_i\mu\), whose squared length is \(\mu'P_i\mu\). Dividing the coordinates by \(\sigma\) gives independent unit-variance normals, so the sum of their squared means is \(\mu'P_i\mu/\sigma^2\), as claimed.
This argument also proves a useful identity for the ranks. Since the ranges form an orthogonal decomposition of \(\mathbb R^n\), their dimensions satisfy \(\sum_i r_i=n\). Equivalently, in a basis adapted to the ranges, the projections are block diagonal with an identity block of size \(r_i\) for \(P_i\) and zeros elsewhere.
Worked Matrix Checks
Worked Example: Three One-Dimensional Projections in \(\mathbb R^3\)
Consider the orthonormal vectors \(u_1=(1,1,1)'/\sqrt{3}\), \(u_2=(1,-1,0)'/\sqrt{2}\), and \(u_3=(1,1,-2)'/\sqrt{6}\). Their inner products are \(u_1'u_2=0\), \(u_1'u_3=0\), and \(u_2'u_3=0\), and each has squared length 1. Set \(P_i=u_i u_i'\).
The matrices are
Each matrix is symmetric. Also \(P_i^2=u_i(u_i'u_i)u_i'=u_iu_i'=P_i\), so each is idempotent. For \(i\ne j\), \(P_iP_j=u_i(u_i'u_j)u_j'=0\). Finally, the columns \(u_1,u_2,u_3\) are an orthonormal basis, so their outer products sum to the identity: \(P_1+P_2+P_3=I_3\). Each range is one-dimensional, hence \(r_1=r_2=r_3=1\).
For a direct numerical check, let \(y=(2,1,0)'\). Its coordinates along the three basis vectors are \(u_1'y=\sqrt{3}\), \(u_2'y=1/\sqrt{2}\), and \(u_3'y=3/\sqrt{6}\). Therefore,
If \(Y\sim N((2,0,1)',I_3)\), its three projected mean coordinates are \(\sqrt{3}\), \(\sqrt{2}\), and \(0\). The theorem gives independent components \(Y'P_1Y\sim\chi^2_1(3)\), \(Y'P_2Y\sim\chi^2_1(2)\), and \(Y'P_3Y\sim\chi^2_1\). The last component is central because the mean has zero projection onto the \(u_3\) direction.
Worked Example: A Rank-Two Projection and a Rank-One Projection
Let \(v=(1,1,1)'/\sqrt{3}\), and take \(Q=vv'\) and \(P=I_3-Q\). Explicitly,
Because \(v'v=1\), \(Q'=Q\) and \(Q^2=Q\). Thus \(P'=P\), \(P^2=(I_3-Q)^2=I_3-2Q+Q^2=I_3-Q=P\), and \(PQ=QP=0\). The matrices sum to \(I_3\). The range of \(Q\) is the span of \(v\), so its rank is 1; the range of \(P\) is the two-dimensional subspace perpendicular to \(v\), so its rank is 2.
For \(y=(0,2,4)'\), the projection \(Qy\) is \((2,2,2)'\), while \(Py=(-2,0,2)'\). Hence \(y'Qy=12\) and \(y'Py=8\), which add to \(y'y=0^2+2^2+4^2=20\).
Now let \(Y\sim N((1,2,3)',2I_3)\). The projected mean is \(Q\mu=(2,2,2)'\), with squared length 12; \(P\mu=(-1,0,1)'\), with squared length 2. The scaled components are independent and satisfy
The divisors are the variance \(2\), and the noncentrality parameters are \(12/2=6\) and \(2/2=1\). In particular, the rank-two component has two degrees of freedom, not one.
Worked Example: An Orthogonal Partition Not Aligned With the Coordinate Axes
In \(\mathbb R^2\), set \(u=(3,4)'/5\) and \(v=(-4,3)'/5\). Both vectors have squared length 1 and \(u'v=(-12+12)/25=0\). Their projection matrices are
They are symmetric. The unit lengths give \(P^2=P\) and \(Q^2=Q\), while \(PQ=uu'vv'=u(u'v)v'=0\). Their sum is
Both ranks are 1. With \(y=(1,2)'\), the projection coordinates are \(u'y=11/5\) and \(v'y=2/5\). Thus \(y'Py=121/25\) and \(y'Qy=4/25\); their sum is \(125/25=5=y'y\).
For \(Y\sim N((1,0)',I_2)\), the projected mean coordinates are \(u'\mu=3/5\) and \(v'\mu=-4/5\). Consequently \(Y'PY\) and \(Y'QY\) are independent, with distributions \(\chi^2_1(9/25)\) and \(\chi^2_1(16/25)\), respectively. This example shows that the projection subspaces need not align with the original coordinate axes.
What the Checks Establish—and a Common Pitfall
For explicit matrices, checking the conditions in an organized order prevents algebraic identities from being mistaken for distributional conclusions. Symmetry and idempotence establish that each matrix is an orthogonal projection. The zero products establish that the projected subspaces are perpendicular. The identity sum establishes that no part of the vector is omitted. Only after these checks, together with the Gaussian spherical model, can the independent chi-square conclusion be applied.
A common mistake is to infer independence merely because two quadratic forms add to the total sum of squares. The equality \(Y'P_1Y+Y'P_2Y=Y'Y\) alone does not establish independence. The relevant conditions here are orthogonal projection matrices in a jointly Gaussian vector with covariance \(\sigma^2I_n\). The orthogonality gives disjoint coordinates in an orthonormal basis, and the spherical Gaussian covariance makes those coordinates independent. With a nonspherical covariance matrix, orthogonality in the ordinary Euclidean inner product does not by itself give this argument.
Another frequent error is to use the rank as the noncentrality parameter or to forget the variance scaling. The rank determines the degrees of freedom; the noncentrality is \(\mu'P_i\mu/\sigma^2\); and the chi-square statement applies to \(Y'P_iY/\sigma^2\), not to the unscaled sum of squares.
Check Your Understanding
Use the definitions and theorem to answer each question.
- What two matrix equalities define an orthogonal projection matrix?
- Why does \(P_iP_j=0\) imply that the ranges of \(P_i\) and \(P_j\) are perpendicular?
- If a projection in an orthogonal partition has rank 3, what is the degrees-of-freedom parameter for its scaled Gaussian sum of squares?
- For \(Y\sim N(\mu,\sigma^2I_n)\), what condition makes the component associated with \(P_i\) central rather than noncentral chi-square?
- Why does a sum-of-squares identity alone not justify claiming that its components are independent?