Principal Component Analysis (PCA): Spectral Eigenvalue Decomposition and Dimensionality Reduction

by Rao Statistics · Last updated on 2 Nov 2026 · 4.3 Principal Component Analysis

Orthogonal transformation, scree plot eigenvalues, variance retention, and component scoring in R and Python

Learning Objective

By the end of this lesson: Perform eigenvalue decomposition on a sample correlation matrix, compute proportion of explained variance, plot scree criteria, and project observations onto PC1 and PC2 axes.

Statistical Theory & Assumptions

Principal Component Analysis (PCA) identifies linear combinations Y=a⊤XY = a^\top X that maximize sample variance subject to unit-length constraints a⊤a=1.a^\top a = 1\text{.} The principal loading vectors correspond strictly to the eigenvectors of the covariance matrix Σ,\Sigma\text{,} while the eigenvalues λj\lambda_j quantify variance explained along each orthogonal axis.

Assumptions

  • Linear Relationships: Correlated features exhibit linear mutual associations.
  • Continuous Scale: Variables are measured on numeric scales suitable for variance computation.
  • Orthogonality: Successive components are mutually uncorrelated (Cov⁡(Yi,Yj)=0\text{(}\operatorname{Cov}(Y_i, Y_j) = 0 for i≠j).i \neq j\text{).}
Σvi=λivi,Var(Yi)=λi,Proportion Explained=λi∑j=1pλj\mathbf{\Sigma} \mathbf{v}_i = \lambda_i \mathbf{v}_i, \quad \text{Var}(Y_i) = \lambda_i, \quad \text{Proportion Explained} = \frac{\lambda_i}{\sum_{j=1}^p \lambda_j}

Because the total variance ∑jλj\sum_j \lambda_j is conserved, retaining the first kk components preserves max information with minimal dimensional complexity.

Worked Dataset & Variables

Morphometric Iris Multi-Feature Dataset: Four continuous biometric measurements across flower specimens illustrating two dominant variance axes. (sample size n = 6).

Data dictionary
VariableTypeDescription
sepal_lengthNumericLength in cm
sepal_widthNumericWidth in cm
petal_lengthNumericLength in cm
petal_widthNumericWidth in cm
Sample observations
sepal_lengthsepal_widthpetal_lengthpetal_width
5.13.51.40.2
4.931.40.2
73.24.71.4
6.43.24.51.5
6.33.362.5
5.82.75.11.9

Software Procedure (R, Python & Excel)

# Principal Component Analysis in R
data <- iris[, 1:4]
pca_res <- prcomp(data, center = TRUE, scale. = TRUE)
summary(pca_res)
biplot(pca_res)

Numerical Results

The first principal component (PC1) accounts for 72.96% of variance, and PC2 explains 22.85%, achieving cumulative 95.81% information preservation in only two dimensions.

Key results
StatisticValueNote
PC1 Eigenvalue (λ₁)2.91872.96% variance
PC2 Eigenvalue (λ₂)0.91422.85% variance
Cumulative Variance Retained95.81%Exceeds 80% threshold

Interpretation & Decision Rule

Formal conclusion: A 4-dimensional biological measurement space is condensed into a 2D orthogonal plane with less than 5% loss of descriptive information.

Decision rule: Retain all principal components with eigenvalues λj≥1.0\lambda_j \geq 1.0 (Kaiser criterion) or where the scree plot exhibits an inflection elbow.

Practical significance: PC1 acts as an overall size index dominated by petal length/width, cleanly separating distinct taxonomic clusters without supervision.

Practice Files

Download: multivariate_iris_pca.csv (CSV Dataset, 2.1 KB)

You might also like

← 4.3 Principal Component Analysis