From Component Scores Back to Observations
Principal component analysis (PCA) transforms an observation from its original variable coordinates into scores along component directions. Those scores can also be used in reverse: combine each score with its component direction to recover the centered observation. This is useful when interpreting PCA results, checking calculations, or forming an approximation that uses only some of the components.
The reconstruction depends on keeping the coordinate system straight. PCA scores describe deviations from the variable means if PCA was performed on centered data. Therefore, a reconstruction from those scores is initially centered; the means must be added back to express it on the original scale. If PCA was performed on standardized data, the reconstructed standardized coordinates must first be rescaled and then shifted by the original means.
A direction \(v_j\) has one coordinate for each variable. Multiplying it by its score gives that component’s contribution to the reconstructed observation. Adding the contributions across components combines the information in the retained scores. When all \(p\) component directions form an orthonormal basis, using all \(p\) scores recovers the centered vector exactly, and adding \(\bar{x}\) recovers the original observation.
Why the Reconstruction Formula Works
Let \(V\) be the matrix whose columns are the \(p\) orthonormal component directions, so \(V^\mathsf{T}V=I\). The score vector is \(t_i=V^\mathsf{T}z_i\). Since \(V\) is a square orthogonal matrix, \(VV^\mathsf{T}=I\) as well. Multiplying the score vector by the direction matrix therefore gives
Written as a sum of component contributions, \(Vt_i=\sum_{j=1}^{p}t_{ij}v_j\). This establishes the full reconstruction formula. If only the first \(k\) scores are used, the same sum stops at \(k\), so the result contains only the part of the centered observation represented in those directions. The omitted component contributions are not included in that approximation.
This argument assumes that the directions are orthonormal and that the scores and directions use the same ordering and sign convention. In PCA based on a data matrix with fewer independent directions than variables, some directions may not be needed to span the observed centered data; the full-basis identity applies to the complete orthonormal coordinate system, while reconstruction using available component directions recovers the part represented in their span.
Worked Example: Reconstructing From All Scores
A hypothetical portfolio record has centered coordinates \(z_i=(3,4)^\mathsf{T}\). Its two component directions are \(v_1=(0.8,0.6)^\mathsf{T}\) and \(v_2=(-0.6,0.8)^\mathsf{T}\). The variable means are \(\bar{x}=(100,50)^\mathsf{T}\). Find both scores and reconstruct the observation on the original scale.
Method. Project the centered observation onto each direction using \(t_{ij}=v_j^\mathsf{T}z_i\), then sum the score-weighted directions and add the mean vector.
First score.
Second score.
Reconstruct the centered vector. The contribution from the first component is \(4.8(0.8,0.6)^\mathsf{T}=(3.84,2.88)^\mathsf{T}\). The contribution from the second is \(1.4(-0.6,0.8)^\mathsf{T}=(-0.84,1.12)^\mathsf{T}\). Their sum is
Restore the means.
Check. The centered reconstruction matches the given coordinates, and adding the means gives \((103,54)^\mathsf{T}\). The directions are orthogonal because \((0.8)(-0.6)+(0.6)(0.8)=0\), and each has unit length. The common mistake this method avoids is calculating the first score as \(7.2\): the dot product is \(3(0.8)+4(0.6)=4.8\), not \(7.2\).
Using Fewer Components
When only \(k\) components are retained, the reconstruction is an approximation:
The coordinate-wise difference between the original and reconstructed observation is \(z_i-\hat{z}_{i,k}\), equivalently \(x_i-\hat{x}_{i,k}\). These differences show how the approximation changes each variable for that particular observation. Because the omitted directions are orthogonal to the retained directions, the squared Euclidean length of this difference is the sum of the squares of the omitted scores, provided the component directions form an orthonormal basis:
To see why, expand the omitted part as \(\sum_{j=k+1}^{p}t_{ij}v_j\). Its squared length is the sum of all products \(t_{ij}t_{i\ell}v_j^\mathsf{T}v_\ell\). Orthonormality gives \(v_j^\mathsf{T}v_\ell=0\) for \(j\ne\ell\) and \(v_j^\mathsf{T}v_j=1\), leaving only \(\sum_{j=k+1}^{p}t_{ij}^2\). This is an observation-specific calculation; it does not by itself give a claim about average reconstruction error across a data set.
Worked Example: Approximating an Observation With One Component
A hypothetical centered risk profile is \(z_i=(2,-1)^\mathsf{T}\), with directions \(v_1=(0.6,0.8)^\mathsf{T}\) and \(v_2=(-0.8,0.6)^\mathsf{T}\). The original variable means are \((10,20)^\mathsf{T}\). Find the scores, the reconstruction using only the first component, and the difference from the original observation.
Method. Calculate both scores so the omitted contribution can be identified, but use only the first score to form the approximation.
Scores.
Retain the first component. Its contribution is
Adding the means gives the reconstructed original-scale values:
Calculate the difference. The original observation on its original scale is \((10,20)^\mathsf{T}+(2,-1)^\mathsf{T}=(12,19)^\mathsf{T}\). Thus the original-minus-reconstructed difference is \((12-10.24,19-20.32)^\mathsf{T}=(1.76,-1.32)^\mathsf{T}\). Its squared length is
Check. The only omitted score is \(-2.2\), whose square is \(4.84\), matching the squared length of the difference. The common mistake is to add the omitted direction’s contribution to the one-component reconstruction; doing so would use both components and recover the centered vector exactly, rather than approximate it with one component.
Reconstructing Standardized Data
For PCA based on standardized variables, the scores and directions reconstruct standardized coordinates, not the original measurements. Suppose variable \(r\) has original mean \(\bar{x}_r\) and standard deviation \(s_r>0\). The standardized coordinate for observation \(i\) is \(z_{ir}=(x_{ir}-\bar{x}_r)/s_r\). After reconstructing \(\hat{z}_{ir,k}\), return to the original scale with
The order matters: first reconstruct in the coordinate system used by PCA, then multiply by each variable’s standard deviation and add that variable’s mean. Adding the means directly to standardized coordinates, or multiplying all variables by a single standard deviation, does not reverse standardization correctly.
Worked Example: Returning a Standardized Reconstruction to Original Units
A hypothetical monitoring record has two measurements with means \((50,100)^\mathsf{T}\) and standard deviations \((10,20)^\mathsf{T}\). Its observed values are \((70,80)^\mathsf{T}\). PCA is performed on standardized variables with directions \(v_1=(0.6,0.8)^\mathsf{T}\) and \(v_2=(-0.8,0.6)^\mathsf{T}\). Reconstruct using only the first component and report the result in the original units.
Standardize the observation.
Calculate the scores.
Reconstruct using the first component only.
Return to original units. Rescale the first coordinate by 10 and add 50; rescale the second by 20 and add 100:
Check. Standardizing this reconstructed vector gives \(((52.4-50)/10,(106.4-100)/20)^\mathsf{T}=(0.24,0.32)^\mathsf{T}\), the retained-component reconstruction. The omitted standardized score is \(-2.2\), so the squared standardized-coordinate difference is \(4.84\). The common mistake is to report \((50.24,100.32)^\mathsf{T}\), which adds the means without first rescaling by the separate standard deviations.
Reading and Checking a Reconstruction
A reconstruction should always be labelled with both its coordinate system and the number of components used. A centered reconstruction is expressed as deviations from the means. A reconstruction on the original scale is expressed in the variables’ original units. For standardized PCA, these are different again: reconstructed standardized coordinates must be converted back variable by variable before they can be interpreted in original units.
Several checks help catch arithmetic and interpretation errors:
- Confirm that each score is a dot product of the centered (or standardized) observation with the stated direction.
- For a full reconstruction, verify that the sum of score-weighted directions returns the centered vector.
- For a truncated reconstruction, confirm that only retained score contributions were added.
- When returning to original units, add each variable’s own mean; for standardized PCA, also multiply by its own standard deviation.
- If checking a truncated reconstruction with the squared-length identity, use the omitted scores and an orthonormal set of directions.
A particularly common exam trap is to confuse scores with reconstructed coordinates. A score is one number for one component; it is not itself a value of an original variable. The original-variable contribution comes from multiplying that score by the corresponding direction vector. Another trap is restoring means too early: adding the means to the centered observation before calculating scores changes the projections and no longer follows the stated PCA setup.
Check Your Understanding
For each problem, keep track of whether the coordinates are centered, standardized, or on the original scale.
- A centered two-variable observation is \(z=(1,2)^\mathsf{T}\), and its directions are \(v_1=(0.6,0.8)^\mathsf{T}\) and \(v_2=(-0.8,0.6)^\mathsf{T}\). The means are \((5,10)^\mathsf{T}\). Find both scores and the full reconstruction on the original scale. (Answer: scores \(2.2\) and \(0.4\); reconstruction \((6,12)^\mathsf{T}\))
- A centered observation is \(z=(3,0)^\mathsf{T}\), with directions \(v_1=(0.8,0.6)^\mathsf{T}\) and \(v_2=(-0.6,0.8)^\mathsf{T}\). Retain only the first component. Find its score, centered reconstruction, and original-minus-reconstructed difference. (Answer: score \(2.4\); reconstruction \((1.92,1.44)^\mathsf{T}\); difference \((1.08,-1.44)^\mathsf{T}\))
- An observation has original values \((24,35)^\mathsf{T}\), means \((20,40)^\mathsf{T}\), and standard deviations \((2,5)^\mathsf{T}\). Standardized PCA uses \(v_1=(0.6,0.8)^\mathsf{T}\) and \(v_2=(-0.8,0.6)^\mathsf{T}\). Reconstruct using only the first component and convert back to original units. (Answer: standardized score \(0.4\); standardized reconstruction \((0.24,0.32)^\mathsf{T}\); original-scale reconstruction \((20.48,41.60)^\mathsf{T}\))
- For \(z=(4,1)^\mathsf{T}\), the directions are \(v_1=(0.8,0.6)^\mathsf{T}\) and \(v_2=(-0.6,0.8)^\mathsf{T}\). Calculate both scores and check the full centered reconstruction. (Answer: scores \(3.8\) and \(-1.6\); full reconstruction \((4,1)^\mathsf{T}\))
- A centered observation is \(z=(-1,2)^\mathsf{T}\), with orthonormal directions \(v_1=(0.6,0.8)^\mathsf{T}\) and \(v_2=(-0.8,0.6)^\mathsf{T}\). Retain only the first component. Find the reconstruction, the residual \(z-\hat z\), and its squared length. (Answer: reconstruction \((0.6,0.8)^\mathsf{T}\); residual \((-1.6,1.2)^\mathsf{T}\); squared length \(4\))