Linear discriminant analysis (LDA) is a supervised dimensionality reduction technique that aims to preserve class discriminatory information. LDA finds the optimal projection direction that maximizes separation between class means while minimizing variance within classes. For two-class LDA, the optimal direction is the solution to maximizing the ratio of between-class scatter to within-class scatter. This direction can be computed as the eigenvector corresponding to the largest eigenvalue of the matrix Sw^-1Sb, where Sw is the within-class scatter matrix and Sb is the between-class scatter matrix. Multiclass LDA generalizes this approach by maximizing the variance of the weighted class centroid means.