Why should you usually standardise features before running principal component analysis (PCA)?

Unsupervised learning, Dimensionality reduction
Level L1 Beginner. Length One-liner. Nature Th Theoretical.

What's being asked

Whether you know that PCA looks for maximum variance, so it depends on the units of each feature.

Key idea

PCA finds the directions along which the data varies most. A feature measured in large units, such as salary in rupees, has a huge variance and takes over the first component. So standardise each feature (equivalently, run PCA on the correlation matrix) unless all features share the same units.

Steps

  1. Say that the first principal component is the unit vector u that maximises u⊤Cu, where C is the covariance matrix. So it follows whichever feature has the largest variance.
  2. Give an example: height in centimetres and weight in grams. Changing grams to kilograms divides that variance by 106 and changes which component comes first, though the data has not changed.
  3. Give the fix: z-score each feature. Skip it when the features already share a scale, such as pixel intensities.

Common mistakes

How long your answer should be

One sentence.

Last checked on 4 December 2026.

Read this

Previous in Unsupervised learning: What does principal component analysis (PCA) do to a dataset, what are principal components geometrically, and why do we often keep only the first few?
Next in Unsupervised learning: How do you choose the number of clusters k for k-means, and why can't you just pick the k that minimises the k-means objective?