2.1 Total Data Energy as an Invariant Sum of Squared Norms

Before we can understand how Principal Component Analysis redistributes variance across principal axes, we must establish a bedrock invariant: the total scatter (or total energy) of a centered dataset is a geometric constant. Whether you measure your data along the original coordinate axes or rotate your coordinate frame to any new orthonormal basis, the sum of the feature variances never changes.

In this Article

1. Defining Total Data Scatter via Squared Euclidean Norms

For a centered dataset x1,…,xn∈Rd\mathbf{x}_1, \dots, \mathbf{x}_n \in \mathbb{R}^d (where 1n∑i=1nxi=0\frac{1}{n}\sum_{i=1}^n \mathbf{x}_i = \mathbf{0}), the squared Euclidean distance of observation ii from the origin is:

∥xi∥2=xiTxi=∑j=1dxij2\|\mathbf{x}_i\|^2 = \mathbf{x}_i^T \mathbf{x}_i = \sum_{j=1}^d x_{ij}^2

Averaging this squared distance across all nn observations defines the Total Data Scatter (often called total variance or total signal energy):

Etotal=1n∑i=1n∥xi∥2=1n∥X∥F2E_{\text{total}} = \frac{1}{n}\sum_{i=1}^n \|\mathbf{x}_i\|^2 = \frac{1}{n}\|X\|_F^2

where ∥X∥F=∑i=1n∑j=1dxij2\|X\|_F = \sqrt{\sum_{i=1}^n \sum_{j=1}^d x_{ij}^2} is the Frobenius norm of the centered data matrix XX.

2. Why Average Squared Distance Equals the Sum of Feature Variances

Notice what happens when we swap the order of summation between observations ii and features jj:

Etotal=1n∑i=1n(∑j=1dxij2)=∑j=1d(1n∑i=1nxij2)⏟Var(xj)=∑j=1dVar(xj)E_{\text{total}} = \frac{1}{n}\sum_{i=1}^n \left(\sum_{j=1}^d x_{ij}^2\right) = \sum_{j=1}^d \underbrace{\left(\frac{1}{n}\sum_{i=1}^n x_{ij}^2\right)}_{\text{Var}(x_j)} = \sum_{j=1}^d \text{Var}(x_j)

Row-Wise vs. Column-Wise View of Total Scatter:

  • Row-Wise (Geometric View): Sum xij2x_{ij}^2 across each row first to get the squared hypotenuse length ∥xi∥2\|\mathbf{x}_i\|^2 of each point, then average over all nn points.
  • Column-Wise (Statistical View): Average xij2x_{ij}^2 down each column first to get the variance Var(xj)\text{Var}(x_j) of each feature, then add the dd feature variances together.

Because both operations sum the exact same n×dn \times d grid of squared numbers xij2x_{ij}^2, they always produce the exact same total!

3. Proof of Rotational Invariance Under Orthogonal Matrices

Suppose we rotate our coordinate axes using any d×dd \times d orthogonal matrix QQ (whose columns are mutually perpendicular unit vectors, so QTQ=IdQ^T Q = I_d). In the rotated coordinate system, observation xi\mathbf{x}_i has new coordinates zi=QTxi\mathbf{z}_i = Q^T \mathbf{x}_i. What is its new squared distance from the origin?

∥zi∥2=ziTzi=(QTxi)T(QTxi)=xiT(QQT)xi=xiTIdxi=∥xi∥2\|\mathbf{z}_i\|^2 = \mathbf{z}_i^T \mathbf{z}_i = (Q^T \mathbf{x}_i)^T (Q^T \mathbf{x}_i) = \mathbf{x}_i^T (Q Q^T) \mathbf{x}_i = \mathbf{x}_i^T I_d \mathbf{x}_i = \|\mathbf{x}_i\|^2

Because every single point preserves its Euclidean norm (∥zi∥2=∥xi∥2\|\mathbf{z}_i\|^2 = \|\mathbf{x}_i\|^2), the sum of variances across all dd rotated axes equals the sum of variances across the original axes: ∑j=1dVar(zj)=∑j=1dVar(xj)=Etotal\sum_{j=1}^d \text{Var}(z_j) = \sum_{j=1}^d \text{Var}(x_j) = E_{\text{total}}. Rotation never creates or destroys variance—it only redistributes variance among the axes!

4. Worked Numerical Verification

Consider two centered points x1=[31]\mathbf{x}_1 = \begin{bmatrix} 3 \\ 1 \end{bmatrix} and x2=[−3−1]\mathbf{x}_2 = \begin{bmatrix} -3 \\ -1 \end{bmatrix}.

  • Original Variances: Var(x1)=32+(−3)22=9\text{Var}(x_1) = \frac{3^2 + (-3)^2}{2} = 9, and Var(x2)=12+(−1)22=1\text{Var}(x_2) = \frac{1^2 + (-1)^2}{2} = 1. Total scatter: Etotal=9+1=10E_{\text{total}} = 9 + 1 = 10.
  • Rotate by 45∘45^\circ: Using Q=12[1−111]Q = \frac{1}{\sqrt{2}}\begin{bmatrix} 1 & -1 \\ 1 & 1 \end{bmatrix}, the new coordinates are z1=12[3+1−3+1]=[22−2]\mathbf{z}_1 = \frac{1}{\sqrt{2}}\begin{bmatrix} 3+1 \\ -3+1 \end{bmatrix} = \begin{bmatrix} 2\sqrt{2} \\ -\sqrt{2} \end{bmatrix} and z2=[−222]\mathbf{z}_2 = \begin{bmatrix} -2\sqrt{2} \\ \sqrt{2} \end{bmatrix}.
  • Rotated Variances: Var(z1)=(22)2=8\text{Var}(z_1) = (2\sqrt{2})^2 = 8, and Var(z2)=(−2)2=2\text{Var}(z_2) = (-\sqrt{2})^2 = 2. Their sum is 8+2=10=Etotal8 + 2 = 10 = E_{\text{total}}!

5. Active Recall Check and Key Takeaways

Quick Check: Test Your Understanding

Question: A centered 2D dataset has Var(x1)=14\text{Var}(x_1) = 14 and Var(x2)=6\text{Var}(x_2) = 6. After rotating the coordinate system to the principal component axes (u1,u2)(\mathbf{u}_1, \mathbf{u}_2), you find that the variance along PC1 is 1818. What must be the variance along the perpendicular axis PC2?

Answer: Because orthogonal rotation preserves total scatter, Var(z1)+Var(z2)=Var(x1)+Var(x2)=14+6=20\text{Var}(z_1) + \text{Var}(z_2) = \text{Var}(x_1) + \text{Var}(x_2) = 14 + 6 = 20. Therefore, Var(z2)=20−18=2\text{Var}(z_2) = 20 - 18 = 2.

  • Total Scatter Conservation: Etotal=1n∑i=1n∥xi∥2=∑j=1dVar(xj)E_{\text{total}} = \frac{1}{n}\sum_{i=1}^n \|\mathbf{x}_i\|^2 = \sum_{j=1}^d \text{Var}(x_j) is invariant under any orthogonal rotation of the axes.
  • PCA as Variance Concentration: Since total variance is fixed, PCA simply rotates the axes to pack as much of that fixed budget as possible into the first few coordinates.
  • Canonical References: See Wikipedia Reference on Orthogonal Transformations and Frobenius Norm Invariance.

Take a Quiz Based on This Article

Test your understanding with AI-generated questions tailored to this content

Adaptive Learning with SynLearn

Explore this article through guided practice that adapts to your answers

✓Step-by-step concepts & lessons
✓Active recall & adaptive feedback
✓Personalized spaced repetition
euclidean-norm
total-variance
trace
rotational-invariance
pca
linear-algebra