midPCA

What is the difference between PCA and LDA?

Updated May 17, 2026

Short answer

PCA is unsupervised; LDA is supervised and uses class labels.

Deep explanation

PCA maximizes variance without considering labels, while Linear Discriminant Analysis (LDA) maximizes class separability. LDA uses between-class and within-class scatter matrices, making it better for classification tasks.

Real-world example

Face recognition using labeled images.

Common mistakes

  • Using PCA when classification boundary optimization is needed.

Follow-up questions

  • Which is better for classification?
  • Can PCA help LDA?

More PCA interview questions

View all →