# Why is the Mean of the 1st Principal Components 0?

I am reading a text on principal components which has the following excerpt:

Since $$\frac1n \cdot \sum_{i=1}^n x_{ij} =0$$, the sample mean of the first principal component scores, $$\bar{z}_1$$, equals $$0$$.

The book also mentions:

$$Z_1 =\phi_{11}X_1+\phi_{21}X_2+\ldots+\phi_{p1}X_p$$

I don't understand how the standardization of the predictor variables mandates that the mean of the first principal component scores also be 0. What am I missing? I think part of the challenge is that they didn't provide the exact mathematical formulation of $$\bar{z}_1$$. What exactly is $$\bar{z}_1$$?

• Suppose every data (row) vector $x$ satisfies a set of linear equations $xA=0$ for a fixed matrix $A.$ Since PCs are linear combinations $\omega x$ (for various $\omega,$ one per PC), notice that $(\omega x)A = \omega (xA)=\omega(0)=0,$ too. In other words: the set of solutions of a set of linear equations is a vector subspace.
– whuber
Commented Dec 28, 2021 at 14:20

PCA creates new variables $$Z$$ based on linear combinations of the old variables $$X$$. It is assumed that $$X_1, \cdots, X_p$$ have been centered (and scaled). In other words, for $$j=1,\cdots,p$$, $$\sum_{i=1}^n x_{ij} = 0$$. Let the first principal component equal $$\begin{eqnarray*} z_{1i} = \sum_{j=1}^p \phi_{j1} x_{ij} \end{eqnarray*}$$ The textbook means that $$\bar{z}_1$$ equals $$\begin{eqnarray*} \bar{z}_1 &=& \frac{1}{n}\sum_{i=1}^n z_{1i} \\ &=& \frac{1}{n}\sum_{i=1}^n \sum_{j=1}^p \phi_{j1} x_{ij} \\ &=& \frac{1}{n} \sum_{j=1}^p \phi_{j1} \sum_{i=1}^n x_{ij} \\ &=& 0. \end{eqnarray*}$$
If the $$X_i$$'s are zero mean a linear combination of them will also have zero mean. Am I missunderstanging your question?