Principal component analysis (PCA) is a technique used to reduce the dimensionality of multivariate data while retaining as much information as possible. It works by finding the orthogonal directions (principal components) along which the data varies the most. The first principal component accounts for as much of the variability in the data as possible, and each succeeding component accounts for as much of the remaining variability as possible. PCA involves computing the eigenvalues and eigenvectors of the covariance matrix to identify the principal components. The number of components retained is usually determined by looking for an "elbow" in the scree plot of eigenvalues or by retaining enough components to explain a high percentage (e.g. 95%) of the total variability in the data.