# For calculating the distance between different points, does it make sense to use all Principal Components?

I have a data frame with about 500 observations and 8 variables that I'd like to run through PCA in order to try and reduce the number of variables to only those with the most variance.

From here, I want to find the [Euclidean] distance between each observation.

Here's my question: should I use every Principal Component to calculate the distances? Or should I just use (by the general rule of thumb) the Principal Components that describe, in total, about 90% of the variance (here, the first 6)?

Here's the importance of components (from R) if you're curious:

Importance of components:
PC1    PC2    PC3    PC4    PC5     PC6     PC7     PC8
Standard deviation     1.4652 1.1997 1.0477 0.9630 0.9103 0.87524 0.75321 0.47645
Proportion of Variance 0.2683 0.1799 0.1372 0.1159 0.1036 0.09576 0.07092 0.02838
Cumulative Proportion  0.2683 0.4482 0.5855 0.7014 0.8050 0.90071 0.97162 1.00000


Any ideas? I'd appreciate any insight.

• I see you cumulative proportion sums to 1 for an over-determined system, does this mean that the values are referring to proportion of explained variance, rather than proportion of total variance? It seems unlikely that you'd strike it lucky and explained 100% of total variance with an over-determined system. Which R package are you using for PCA here? Mar 11 '19 at 8:59

Given a set of data $$(x_1, x_2, \ldots, x_n) \in \mathbb{R}^p$$, the principal component decomposition of rank $$q\leq p$$ is the projection of such points onto an affine hyperplane. The affine hyperplane is determined once one specifies an orthogonal basis $$\left\{v_q\right\}$$ with the property that $$v_1$$ contains the most variance, $$v_2$$ the second most and so forth. Such transformation is orthogonal if $$q=p$$; in such a case distances between points are preserved, by definition. If $$q it needs not be so, therefore by using only the first $$q$$ components one obtains the distances of the projections of the points onto the affine hyperplane, not the distances of the original points.