seniorPCA

How does PCA behave when number of features is greater than number of samples?

Updated May 17, 2026

Short answer

PCA still works but maximum number of meaningful components is limited to number of samples minus one.

Deep explanation

When features (p) exceed samples (n), covariance matrix becomes rank-deficient. PCA leverages SVD, where only min(n-1, p) components carry non-zero variance. This makes dimensionality reduction especially useful in such cases.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More PCA interview questions

View all →