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
- Say that the first principal component is the unit vector that maximises , where is the covariance matrix. So it follows whichever feature has the largest variance.
- Give an example: height in centimetres and weight in grams. Changing grams to kilograms divides that variance by and changes which component comes first, though the data has not changed.
- Give the fix: z-score each feature. Skip it when the features already share a scale, such as pixel intensities.
Common mistakes
- Forgetting to centre the data. PCA needs zero-mean features even when no scaling is done.
- Standardising when the raw variances are meaningful, such as pixels. This blows up noisy, low-variance features.
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 for k-means, and why can't you just pick the that minimises the k-means objective?