What is the difference between linear subspace and affine subspace in PCA?

Updated May 16, 2026

Short answer

Linear subspaces pass through origin; affine subspaces are shifted versions of linear subspaces.

Deep explanation

PCA effectively finds a linear subspace after centering the data. If data is not centered, PCA implicitly captures an affine subspace, which includes a translation component. This distinction is important because variance decomposition assumes origin-centered geometry; otherwise, the mean shift contaminates principal directions.

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 Dimensionality Reduction interview questions

View all →