Scores as Coordinates in a Principal Subspace
A principal component score is a coordinate, not a vector in the original variable space. For a centered observation, the retained scores tell us how far the observation extends along the retained principal directions. Multiplying those coordinates by the directions puts a vector back in the original variable space: its orthogonal projection onto the subspace spanned by those directions. Keeping these two roles distinct makes the geometry of principal component analysis (PCA) easier to read.
Let \(X\) be a \(p\)-dimensional random vector with finite second moments and mean \(\mu=E[X]\). Write \(Z=X-\mu\), and let \(\Sigma=\operatorname{Cov}(X)\). Since \(\Sigma\) is symmetric and positive semidefinite, choose orthonormal eigenvectors \(q_1,\ldots,q_p\), ordered with their eigenvalues from largest to smallest. For a retained dimension \(K\), where \(1\leq K\leq p\), place the first \(K\) directions in the \(p\times K\) matrix \(U_K=[q_1\ \cdots\ q_K]\). Then \(U_K^\mathsf{T}U_K=I_K\).
The score \(t_K\) records coordinates in the retained directions; \(\hat z_K\) is a \(p\)-dimensional vector. If \(z\) is an uncentered observation \(x\), apply these definitions to \(z=x-\mu\). The corresponding fitted observation on the original scale is \(\mu+\hat z_K\). Thus the projection is performed on the centered vector, with the mean added back only when expressing the fitted observation in the original coordinates.
Why This Is an Orthogonal Projection
An orthogonal projection of \(z\) onto a subspace \(\mathcal S\) is a vector in \(\mathcal S\) whose difference from \(z\) is orthogonal to every vector in \(\mathcal S\). For the retained principal subspace, the columns of \(U_K\) form an orthonormal basis. The score calculation takes inner products with those basis directions, and the fitted-vector calculation combines the basis directions using those scores.
Proof. Symmetry follows from
Using \(U_K^\mathsf{T}U_K=I_K\), idempotence follows:
The fitted vector \(P_Kz=U_Kt_K\) lies in \(\mathcal S_K\), since it is a linear combination of the columns of \(U_K\). Its residual satisfies
Every vector in \(\mathcal S_K\) has the form \(U_Ka\) for some \(a\in\mathbb{R}^K\). Its inner product with the residual is \((U_Ka)^\mathsf{T}r_K=a^\mathsf{T}U_K^\mathsf{T}r_K=0\). Hence the residual is orthogonal to the whole subspace, which verifies the defining property of the projection. This property also ensures uniqueness: if two vectors in \(\mathcal S_K\) both had residuals orthogonal to \(\mathcal S_K\), their difference would lie in \(\mathcal S_K\) and be orthogonal to itself, so its squared norm would be zero and the two vectors would be equal.
For the score and fitted-vector lengths, use orthonormality again:
Finally, \(z=\hat z_K+r_K\), and the two terms are orthogonal because \(\hat z_K\in\mathcal S_K\) and \(r_K\) is orthogonal to \(\mathcal S_K\). Expanding the squared norm gives
This proves all the stated identities. \(\square\)
Worked Projection Calculations
Worked Example: One Retained Direction in Two Dimensions
Let \(q_1=(3/5,4/5)^\mathsf{T}\) be the retained unit principal direction, and let \(z=(5,0)^\mathsf{T}\). With \(K=1\), the score is the inner product with \(q_1\):
The fitted vector and residual are therefore
Their inner product is \((9/5)(16/5)+(12/5)(-12/5)=144/25-144/25=0\), so the residual is perpendicular to the retained direction. The score and fitted-vector squared lengths agree:
The Pythagorean identity checks as well: \(\|z\|^2=25\), while \(\|\hat z_1\|^2+\|r_1\|^2=9+(256+144)/25=9+16=25\).
Worked Example: Two Retained Directions in Three Dimensions
Take the orthonormal directions \(q_1=(1,1,0)^\mathsf{T}/\sqrt{2}\), \(q_2=(1,-1,0)^\mathsf{T}/\sqrt{2}\), and \(q_3=(0,0,1)^\mathsf{T}\). Retain the first two and take \(z=(2,0,3)^\mathsf{T}\). The scores are
Combining those scores with their directions gives
The projection matrix is \(P_2=q_1q_1^\mathsf{T}+q_2q_2^\mathsf{T}=\operatorname{diag}(1,1,0)\), so \(P_2z=(2,0,0)^\mathsf{T}\), as obtained from the scores. Also, \(U_2^\mathsf{T}r_2=(0,0)^\mathsf{T}\): the residual has no component in either retained direction. Finally, \(\|t_2\|^2=2+2=4=\|\hat z_2\|^2\), and \(\|z\|^2=13=4+9=\|\hat z_2\|^2+\|r_2\|^2\).
Worked Example: A Projection With Nonzero Residual Components
In \(\mathbb{R}^3\), consider the orthonormal directions \(q_1=(1,1,1)^\mathsf{T}/\sqrt{3}\), \(q_2=(1,-1,0)^\mathsf{T}/\sqrt{2}\), and \(q_3=(1,1,-2)^\mathsf{T}/\sqrt{6}\). Retain \(q_1,q_2\), and use \(z=(1,2,0)^\mathsf{T}\). The scores are
Thus the fitted vector and residual are
The residual is not zero, but it is perpendicular to each retained direction: \(q_1^\mathsf{T}r_2=(1/2+1/2-1)/\sqrt{3}=0\) and \(q_2^\mathsf{T}r_2=(1/2-1/2)/\sqrt{2}=0\). The score squared length is \(3+1/2=7/2\); the fitted-vector squared length is \(1/4+9/4+1=7/2\). The original squared length is \(1+4=5\), and the residual squared length is \(1/4+1/4+1=3/2\), giving \(5=7/2+3/2\).
Reading the Identities Correctly
These calculations show what the score-to-vector conversion does: it maps the \(K\) retained coordinates back to the original \(p\)-dimensional space. The retained scores and the fitted vector have the same squared length because the columns of \(U_K\) are orthonormal. The residual describes the part of the centered observation perpendicular to every retained direction. These are geometric statements about the chosen subspace and the observation; they do not depend on the numerical values of the covariance eigenvalues.
When \(K=p\), the retained directions span all of \(\mathbb{R}^p\), so \(P_K=I_p\), the fitted vector equals \(z\), and the residual is zero. When \(K<p\), the residual may be nonzero, even though it has zero inner product with every retained direction. For an uncentered observation, the same statements apply after subtracting \(\mu\); adding \(\mu\) back shifts the fitted vector but does not change the centered projection calculations.
A practical verification can be made in three steps: calculate the scores, map them back with \(U_K\), and check orthogonality using \(U_K^\mathsf{T}r_K\). Comparing the score and fitted-vector lengths, and then checking the Pythagorean identity, provides independent arithmetic checks. The projection matrix \(P_K\) offers another route to the same fitted vector, since \(P_Kz=U_KU_K^\mathsf{T}z\).
Check Your Understanding
Use the definitions and identities above to answer the following questions.
- For \(U_K^\mathsf{T}U_K=I_K\), explain why \(U_KU_K^\mathsf{T}\) is idempotent.
- Why can the score vector and fitted vector have different dimensions but the same squared length?
- What equation verifies that a residual is orthogonal to the retained principal subspace?
- If \(K=p\) and the principal directions form an orthonormal basis of \(\mathbb{R}^p\), what are the fitted vector and residual?
- For an uncentered observation \(x\), which vector should be projected, and how is the fitted observation on the original scale expressed?