Tutorials › Multivariate Statistics (Graduate) › Sign Ambiguity and Interpretation of Components

Population and Sample PCA · Tutorial 498 of 975

Sign Ambiguity and Interpretation of Components

Learn how reversing a principal direction changes its scores and loadings while leaving its variance and fitted reconstruction unchanged.

Intermediate 12 min read

What You'll Learn

  • Explain why an eigenvector and its negative represent the same principal direction.
  • Derive how component scores change when a direction’s sign is reversed.
  • Show why eigenvalues, explained variance, and projection reconstructions are unchanged.
  • Track sign changes in covariance and correlation loadings.
  • Distinguish a sign-dependent interpretation from an invariant fitted result.

Why a Principal Component Has No Intrinsic Sign

A principal component is often described as a direction along which the data vary. But a direction does not have a preferred arrow: the line through \(v\) is the same line as the one through \(-v\). This creates a basic interpretive issue. A component score may be positive under one sign convention and negative under the other, even though the direction and the PCA fit have not changed.

This is not a defect in PCA or a numerical failure. It follows directly from the eigenvector equation: if \(v\) is an eigenvector, then \(-v\) is also an eigenvector for the same eigenvalue. Understanding which quantities reverse and which remain fixed is important when interpreting scores, comparing software output, or reporting loadings.

Definition: Let \(X\) be a random vector in \(\mathbb{R}^p\) with finite second moments, mean \(\mu=E[X]\), and covariance matrix \(\Sigma\). A unit vector \(v\) is a principal direction if it is a unit eigenvector of \(\Sigma\); its component score for an observation \(x\) is \(v^T(x-\mu)\). For sample PCA, the corresponding score is the projection of a centered data row onto a sample principal direction.

The covariance matrix is symmetric, so its eigenvectors can be chosen orthonormally. Throughout the matrix results below, the columns of \(V\) are assumed to be orthonormal eigenvectors selected as principal directions. Orthonormality matters: it ensures that \(VV^T\) is the projection matrix onto their span and that the usual PCA reconstruction formula applies. The sign argument does not depend on how the eigenvectors were computed.

What Changes When a Direction Is Reversed?

For any scalar \(c\), multiplying an eigenvector by \(c\) does not in general preserve its unit length. But multiplying by \(-1\) does preserve unit length, and the eigenvector equation is preserved:

$$ \Sigma v=\lambda v \quad\Longrightarrow\quad \Sigma(-v)=\lambda(-v). $$

Thus \(v\) and \(-v\) are two valid unit eigenvectors for the same eigenvalue. Their component scores have opposite signs:

$$ (-v)^T(x-\mu)=-v^T(x-\mu). $$

The score’s sign is therefore tied to the chosen orientation of the eigenvector. Its squared value, and hence the variance of the score, does not depend on that orientation.

Theorem: Suppose \(v\) is a unit eigenvector of \(\Sigma\) with eigenvalue \(\lambda\), and let \(S=v^T(X-\mu)\). Replacing \(v\) by \(-v\) changes \(S\) to \(-S\), but leaves its mean and variance unchanged. In particular, \(E[S]=0\) and \(\operatorname{Var}(S)=\lambda\) for either choice.

Proof. Since \(E[X-\mu]=0\), linearity of expectation gives \(E[S]=v^TE[X-\mu]=0\). From the definition of covariance,

$$ \operatorname{Var}(S) =E\!\left[\{v^T(X-\mu)\}^2\right] =v^T\Sigma v =v^T(\lambda v) =\lambda v^Tv =\lambda, $$

where the last equality uses \(v^Tv=1\). For the reversed direction, the score is \(-S\), whose mean is \(-E[S]=0\) and variance is \(\operatorname{Var}(-S)=(-1)^2\operatorname{Var}(S)=\lambda\). This proves the claim. \(\square\)

Worked Example: A Score and Its Rank-One Reconstruction

Consider the covariance matrix

$$ \Sigma= \begin{pmatrix} 29/5 & 12/5\\ 12/5 & 36/5 \end{pmatrix}. $$

The unit vector \(v=(3/5,4/5)^T\) is an eigenvector with eigenvalue \(9\), because

$$ \Sigma v = \begin{pmatrix} (29/5)(3/5)+(12/5)(4/5)\\ (12/5)(3/5)+(36/5)(4/5) \end{pmatrix} = \begin{pmatrix} (87+48)/25\\ (36+144)/25 \end{pmatrix} = \begin{pmatrix} 27/5\\36/5 \end{pmatrix} =9v. $$

Also, \(v^Tv=(9+16)/25=1\). For a centered observation \(x_c=(2,-1)^T\), the score is

$$ v^Tx_c=(3/5)(2)+(4/5)(-1)=2/5. $$

The projection reconstruction along this direction is \((v^Tx_c)v=(6/25,8/25)^T\). Reversing the direction gives score \((-v)^Tx_c=-2/5\), and its reconstruction is

$$ \{(-v)^Tx_c\}(-v)=(-2/5)(-v)=(6/25,8/25)^T. $$

The score sign changed, but the projected point did not. Because \(v\) is the leading eigenvector here (the other eigenvalue is \(4\)), this is also the rank-one PCA reconstruction.

Simultaneous Sign Changes in a PCA Representation

For centered sample data, let \(X_c\) be an \(n\times p\) matrix whose rows are observations, and let \(V\) be a \(p\times K\) matrix of retained orthonormal principal directions. The score matrix is \(T=X_cV\), and the rank-\(K\) fitted centered data matrix is \(TV^T=X_cVV^T\). For any \(K\times K\) diagonal matrix \(D\) with diagonal entries \(1\) or \(-1\), define \(V_*=VD\). Since \(D^T=D\) and \(D^2=I\), this flips selected direction signs while preserving orthonormality.

Theorem: Under the conditions just stated, replacing \(V\) by \(V_*=VD\) changes the score matrix to \(T_*=TD\), but leaves the fitted centered data matrix unchanged: \(T_*V_*^T=TV^T=X_cVV^T\). Each retained component’s eigenvalue and explained variance are unchanged.

Proof. By the definition of scores,

$$ T_*=X_cV_*=X_cVD=TD. $$

The fitted matrix under the reversed signs is therefore

$$ T_*V_*^T =(TD)(VD)^T =TD D^T V^T =TI V^T =TV^T, $$

because \(DD^T=I\). Equivalently, \(V_*V_*^T=VDD^TV^T=VV^T\), so the projection onto the retained span is unchanged. If the \(j\)th column of \(V\) is \(v_j\), its reversed column is \(\pm v_j\), which remains an eigenvector with the same eigenvalue. Thus the component variance, given by that eigenvalue, is unchanged as well. \(\square\)

The orthonormality condition is essential to the standard PCA projection and reconstruction formulas. It is not enough that the columns of a matrix are merely unit eigenvectors: when eigenvalues are repeated, eigenvectors need not be orthogonal unless they are chosen that way. The sign-invariance algebra above applies to the standard PCA representation with orthonormal retained directions.

Worked Example: Flipping Signs in a Two-Component Sample PCA

Take three centered observations in two variables:

$$ X_c= \begin{pmatrix} 1&1\\ -1&1\\ 0&-2 \end{pmatrix}. $$

The columns have zero sums, their cross-product is zero, and their sums of squares are \(2\) and \(6\). The sample covariance matrix, using divisor \(n-1=2\), is therefore

$$ S=\frac{1}{2}X_c^TX_c =\begin{pmatrix}1&0\\0&3\end{pmatrix}. $$

Ordered from largest eigenvalue to smallest, the directions are \(v_1=(0,1)^T\) and \(v_2=(1,0)^T\). Put these orthonormal directions into \(V=\begin{pmatrix}0&1\\1&0\end{pmatrix}\). The score matrix is

$$ T=X_cV= \begin{pmatrix} 1&1\\ 1&-1\\ -2&0 \end{pmatrix}. $$

Now reverse only the first direction, using \(D=\operatorname{diag}(-1,1)\). Then

$$ V_*=VD= \begin{pmatrix} 0&1\\ -1&0 \end{pmatrix}, \qquad T_*=TD= \begin{pmatrix} -1&1\\ -1&-1\\ 2&0 \end{pmatrix}. $$

With both components retained, the original fitted matrix is \(TV^T=X_c\), and the sign-flipped fitted matrix is also \(T_*V_*^T=X_c\). For example, the first fitted row under the flipped representation is \((-1,1)\begin{pmatrix}0&-1\\1&0\end{pmatrix}=(1,1)\), exactly the first row of \(X_c\). The score for the first component has reversed for every observation, but the reconstructed data have not changed.

Interpreting Loadings Without Overinterpreting Their Signs

A loading convention must be stated because the word loading is used for related quantities. In the eigenvector-coefficient convention, the loading vector for component \(j\) is \(v_j\), the vector of coefficients used to form its score. A common covariance-loading convention instead uses \(\sqrt{\lambda_j}v_j\); these entries are the covariances of the original variables with the component score after that score is standardized to variance one. If variables are standardized, the corresponding correlations also include division by each variable’s standard deviation.

Under any of these conventions, reversing \(v_j\) reverses the signs of that component’s coefficients and signed loadings. Their absolute values, the eigenvalue, and the fitted subspace are unchanged. Thus statements such as “variable 1 is positively associated with component 1” depend on the chosen orientation. Statements about the relative signs of variables within one component are unchanged when the entire component is reversed.

Worked Example: Sign Changes in Covariance and Correlation Loadings

Use the leading direction and eigenvalue from the first example: \(v=(3/5,4/5)^T\), \(\lambda=9\). Under the covariance-loading convention, the loading vector is

$$ \sqrt{\lambda}\,v =3(3/5,4/5)^T =(9/5,12/5)^T. $$

For the reversed direction \(-v\), the covariance loadings are \((-9/5,-12/5)^T\). The variable standard deviations are \(\sqrt{29/5}\) and \(\sqrt{36/5}=6/\sqrt{5}\). Dividing each covariance loading by its variable’s standard deviation gives correlations with the standardized component score:

$$ \left( \frac{9/5}{\sqrt{29/5}}, \frac{12/5}{6/\sqrt{5}} \right) = \left( \frac{9}{\sqrt{145}}, \frac{2}{\sqrt{5}} \right). $$

Reversing the component changes these to \((-9/\sqrt{145},-2/\sqrt{5})\). The magnitudes and the relative signs are the same: both variables still point in the same direction relative to each other on this component. Only the arbitrary orientation of the component axis has changed.

Choosing a Sign Convention and Comparing Results

In computation, a sign convention can make output easier to read and compare. For example, one might require the largest-magnitude entry of each eigenvector to be positive. This rule selects one of the two orientations when that entry is nonzero, but it is only a reporting convention; it does not make that orientation mathematically more correct. If two entries tie in magnitude, an additional tie-breaking rule is needed for the convention to be fully deterministic.

When comparing PCA output across software, samples, or reports, compare signs only after checking the orientation convention. If the directions differ exactly by a sign, their component score columns and signed loading columns should differ by that same sign, while their fitted projections should agree. A sign difference alone is not evidence of disagreement in the component.

Common Mistakes and a Practical Check

  • Calling a negative score a different component. A score’s sign depends on the orientation chosen for its direction. Check whether the direction itself is just the negative of the other reported direction.
  • Assuming signed loadings have a unique interpretation. Their signs reverse with the component orientation. Interpret relative signs within the component, or state the convention used to orient it.
  • Claiming the fitted values reverse too. Both score and direction reverse, so their product is unchanged: \((-t)(-v)^T=tv^T\).
  • Applying a PCA reconstruction formula to arbitrary directions. Projection onto any unit direction is possible, but it is a rank-one PCA reconstruction only when the direction is a leading eigenvector (allowing a choice among tied leading directions).
  • Using nonorthogonal columns in the matrix reconstruction formula. The identity \(VV^T\) represents the PCA projection when the retained columns are orthonormal. Unit length alone does not guarantee this.
Key takeaway: A principal direction and its negative encode the same axis. Reversing the axis reverses its scores and signed loadings, but leaves eigenvalues, explained variance, and the fitted PCA reconstruction unchanged.

Check Your Understanding

Answer each question by tracking both the direction and the quantity built from it.

  1. If \(v\) is a unit eigenvector with eigenvalue \(\lambda\), what are the eigenvalue and unit length of \(-v\)?
  2. For a centered observation \(x-\mu\), how does its score change when \(v\) is replaced by \(-v\)?
  3. Why does reversing a component leave its rank-one projection reconstruction unchanged?
  4. If one column of an orthonormal matrix \(V\) is sign-flipped, what happens to \(X_cV\) and to \(X_cVV^T\)?
  5. Why should a report state its sign convention when describing positive or negative loadings?
Clinical Biostats