Skip to content
GATEiit

GATE CH · Engineering Mathematics

Principal Component Analysis (PCA)

Principal Component Analysis (PCA): mean-centering, sample covariance matrix eigendecomposition, orthogonal maximum-variance axes, explained variance ratio, and reconstruction error.

Before you start

Concept notes

1. Mean-Centering and the Sample Covariance Matrix

In chemical process monitoring (temperatures, pressures, compositions across d correlated sensors), Principal Component Analysis (PCA) finds a smaller set of uncorrelated linear combinations capturing most of the data variation.

  1. Mean-center the data matrix X∈Rn×d: Compute column means μ=1n∑i=1nxi and subtract from every row to form Xc=X−1μT.
  2. Sample covariance matrix S (using n−1 or n): S=1n−1XcTXc(or Σ=1nXcTXc) Notice S is d×d real, symmetric (ST=S), and positive semi-definite (vTSv≥0 for all v∈Rd). Because S is real symmetric, its eigenvalues are real non-negative (λ1≥λ2≥⋯≥λd≥0) and eigenvectors for distinct eigenvalues are mutually orthogonal.
x₁ − μ₁ x₂ − μ₂ PC1 (u₁, max λ₁) PC2 (u₂, λ₂ ⊥ u₁) PCA Core Guarantees 1. Σ uᵢ = λᵢ uᵢ (||uᵢ|| = 1) 2. Var(uᵢᵀ x) = λᵢ 3. uᵢ ⊥ uⱼ ⇒ Cov(zᵢ, zⱼ) = 0 4. Sum λᵢ = tr(Σ) = Total Var
PCA rotates centered correlated coordinates onto orthogonal eigenvectors u₁ and u₂ sorted by decreasing eigenvalue variance.

2. Maximum Variance Objective and Eigendecomposition

Projecting centered data onto any unit direction u (uTu=1) gives scalar scores zi=uTxc,i with variance uTSu. To maximize projected variance subject to unit norm, form the Lagrangian:

L(u,λ)=uTSu−λ(uTu−1)  ⟹  ∇uL=2Su−2λu=0  ⟹  Su=λu

Therefore:

  • The first principal component (PC1) is the unit eigenvector u1 corresponding to the largest eigenvalue λ1, with variance Var⁡(u1TXc)=u1T(λ1u1)=λ1.
  • PC2 (u2) maximizes variance orthogonal to u1, giving the eigenvector of the second largest eigenvalue λ2, and score covariance vanishes: Cov⁡(z1,z2)=u1TSu2=λ2(u1Tu2)=0.

3. Explained Variance Ratio, Dimensionality Reduction and Reconstruction Error

Because trace is orthogonally invariant, total variance across all d original variables equals the sum of all eigenvalues:

∑j=1dVar⁡(Xj)=tr⁡(S)=∑k=1dλk

Keeping the top k<d orthonormal eigenvectors Wk=[u1 ⋯ uk]∈Rd×k:

  • Explained variance fraction: ∑j=1kλj∑j=1dλj.
  • Low-dimensional encoding and reconstruction: Z=XcWk∈Rn×k and X^c=ZWkT.
  • Mean squared reconstruction error: Discarding the last d−k eigenvectors incurs exact squared reconstruction error equal to the sum of the discarded eigenvalues, ∑j=k+1dλj.

4. Correlation PCA (Feature Scaling) and SVD Equivalence

In chemical engineering datasets, mixing variables with vastly different scales (e.g., pressure in Pa ∼105 vs mole fraction ∼0.1) makes covariance-based PCA align PC1 almost exclusively with whichever sensor has the largest numerical unit variance.

  • Standardize first (Correlation PCA): Scale each variable to zero mean and unit variance, x~ij=xij−μjσj. Diagonalizing X~TX~/n equals eigendecomposing the correlation matrix R, making PCA invariant to measurement units.
  • SVD shortcut: Writing the thin SVD Xc=UΣsvVT, the columns of V are exact eigenvectors of S, the principal component scores are UΣsv, and λk=σk2/(n−1).

Formulas to remember

Sample covariance matrix
S=1n−1XcTXc,Xc=X−1μT
Principal component eigenvalue problem
Suk=λkuk,∥uk∥2=1
Projected score variance
Var⁡(ukTXc)=ukTSuk=λk
Uncorrelatedness of PCs
Cov⁡(zi,zj)=uiTSuj=0(i≠j)
Total variance identity
∑j=1dσj2=tr⁡(S)=∑k=1dλk
Explained variance ratio (top k)
EVRk=∑j=1kλj∑j=1dλj
SVD eigenvalue link
Xc=UΣsvVT  ⟹  λk=σk2n−1

Common mistakes

  • Skipping mean-centering (Xc=X−1μT): computing XTX directly pulls PC1 toward the data mean rather than maximum variance around the cloud center.
  • Running covariance PCA on raw variables with mixed physical units (like Kelvin vs mole fraction), letting unit scale dictate PC1.
  • Confusing PCA eigenvectors uk (weights/loadings) with principal component scores zi=ukTxc,i.
  • Assuming PCA makes features statistically independent: zero covariance (Cov⁡(z1,z2)=0) implies linear uncorrelatedness, not full independence for non-Gaussian data.
  • Forgetting that the sum of discarded eigenvalues equals the exact discarded variance (reconstruction loss).

Worked examples

Try each step yourself, then reveal the working.

Example 1: Finding PC1, PC2 and explained variance of a 2x2 covariance matrix

numerical

A centered process dataset has covariance matrix . Determine both principal component directions and the percentage of variance explained by PC1.

  1. Step 1: Find eigenvalues from characteristic equation

    Try it on paper first.

Example 2: Constructing unbiased sample covariance matrix from raw observations

numerical

Compute the unbiased sample covariance matrix S=1n−1XcTXc for the n=5 bivariate observations: (0,0), (0,2), (2,2), (4,2), (4,4).

  1. Step 1: Compute sample mean and center each observation

    Try it on paper first.

Example 3: 1D PCA projection and exact squared reconstruction error

numerical

For u1=15(2,1)T, project the centered point xc=(5,0)T onto PC1 to get its scalar score z1, reconstructed vector x^c, and squared reconstruction error ∥xc−x^c∥22.

  1. Step 1: Compute score z1 and rank-1 reconstruction

    Try it on paper first.

Example 4: Why unit scaling changes PCA directions on engineering process data

conceptual

A reactor dataset records Temperature (T∈[300,400] K) and Catalyst Concentration (c∈[0.01,0.05] mol/L). Should covariance PCA or correlation (standardized) PCA be used, and why?

  1. Step 1: Compare unscaled feature variances

    Try it on paper first.

Previous year questions

No official GATE CH question is tagged with this topic yet. The topic test below uses practice questions.

Topic test

8 questions: original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE CH syllabus; being checked by a reviewer. Updated 2026-12-01. Spotted a mistake? Use Report an issue on any question, or contact us.