Question: why lda is better than pca?
Answer: Minimize the variation (which LDA calls scatter and is represented by s2), within each category. PCA performs better in case where number of samples per class is less. Whereas LDA works better with large dataset having multiple classes; class separability is an important factor while reducing dimensionality.