# Calculate variance explained by a feature

Principal component analysis (PCA) takes a high-dimensional dataset and seeks a projection into a low dimensional subspace which preserves most of the variation in the original data. After performing PCA, it is possible to calculate the percentage of total variance explained by each component. But it seems that this calculation relies on the fact that the components identified are guaranteed to be eigenvectors of the covariance matrix: the variance explained by a component is calculated in terms of the corresponding eigenvalue of the covariance matrix.

Is there a way to calculate the variance explained by a non-principal component, which is not an eigenvector of the covariance matrix? In particular, how would I calculate the variance explained by a particular feature?

• What do you mean by non-principal component? There must be a specific method to extract such components. So what is that? Commented Dec 4, 2022 at 11:21
• When the (square) matrix in PCA is $A$ and the (nonzero) component is $x,$ $x^\prime A x/|x|^2$ appears to answer your question.
– whuber
Commented Dec 4, 2022 at 15:56