Tutorials › Multivariate Statistics (Graduate) › Invariance Under Separate Linear Reparameterizations

Canonical Correlation Analysis · Tutorial 391 of 975

Invariance Under Separate Linear Reparameterizations

Learn why canonical correlations are coordinate-invariant and how to transform the coefficient vectors so that canonical scores remain the same.

Intermediate 10 min read

What You'll Learn

  • Define separate nonsingular linear reparameterizations for two variable sets
  • Derive the inverse-transpose transformation for canonical coefficient vectors
  • Prove invariance of the ordered canonical correlations
  • Relate whitening and singular values before and after a coordinate change
  • Distinguish invertible reparameterizations from dimension-reducing transformations

Why Coordinate Changes Matter

A multivariate measurement can be recorded in different units or represented by different linear combinations of its variables. For example, a laboratory might report concentrations in different units, or replace two original measurements with their sum and difference. These choices change the coordinates used to describe a variable set, but should not create or remove association with a second set when the change is invertible. Canonical correlation analysis makes this principle precise: its canonical correlations are unchanged, while the coefficient vectors must be adjusted to describe the same scores in the new coordinates.

The key distinction is between changing coordinates and discarding information. A nonsingular transformation is reversible, so it changes the representation but not the information in either variable set. A singular transformation can collapse distinct directions together or remove directions altogether; it need not preserve all canonical correlations.

Setup and Transformation Rule

Let \(X\in\mathbb{R}^p\) and \(Y\in\mathbb{R}^q\) be random vectors with finite second moments. Write their covariance blocks as \(\Sigma_{XX}=\operatorname{Cov}(X,X)\), \(\Sigma_{YY}=\operatorname{Cov}(Y,Y)\), and \(\Sigma_{XY}=\operatorname{Cov}(X,Y)\). Assume \(\Sigma_{XX}\) and \(\Sigma_{YY}\) are positive definite. This ensures every nonzero linear combination within either set has positive variance and that the usual canonical correlations are well-defined.

A pair of coefficient vectors \(a\in\mathbb{R}^p\) and \(b\in\mathbb{R}^q\) defines centered canonical scores \(a^T(X-E[X])\) and \(b^T(Y-E[Y])\). Now choose nonsingular matrices \(A\in\mathbb{R}^{p\times p}\) and \(B\in\mathbb{R}^{q\times q}\), and record the transformed vectors \(X^*=AX\) and \(Y^*=BY\). Their covariance blocks are

$$ \Sigma_{X^*X^*}=A\Sigma_{XX}A^T,\qquad \Sigma_{Y^*Y^*}=B\Sigma_{YY}B^T,\qquad \Sigma_{X^*Y^*}=A\Sigma_{XY}B^T. $$

If the original score uses coefficient \(a\), its coefficient in the transformed coordinates is not generally \(Aa\). It is \(A^{-T}a\), where \(A^{-T}=(A^{-1})^T\). Indeed,

$$ (A^{-T}a)^T(X^*-E[X^*]) =a^T A^{-1}A(X-E[X]) =a^T(X-E[X]). $$

Similarly, \(b\) becomes \(B^{-T}b\). This inverse-transpose rule is the contragredient transformation of coefficient vectors: the coordinates change one way, while the linear functional that extracts a score changes in the corresponding inverse way.

Definition: A separate nonsingular linear reparameterization of two variable sets is the transformation \(X^*=AX,\;Y^*=BY\), where \(A\) and \(B\) are square and nonsingular. The corresponding coefficient vectors for the same centered scores are \(a^*=A^{-T}a\) and \(b^*=B^{-T}b\).

Worked Example: Rescaling Two Scalar Variables

Suppose \(X\) and \(Y\) are centered scalar random variables with \(\operatorname{Var}(X)=4\), \(\operatorname{Var}(Y)=9\), and \(\operatorname{Cov}(X,Y)=3\). Their correlation is \(3/(\sqrt{4}\sqrt{9})=1/2\). Rescale them as \(X^*=-2X\) and \(Y^*=3Y\).

The transformed variances and covariance are

$$ \operatorname{Var}(X^*)=(-2)^2(4)=16,\qquad \operatorname{Var}(Y^*)=3^2(9)=81,\qquad \operatorname{Cov}(X^*,Y^*)=(-2)(3)(3)=-18. $$

Thus the ordinary signed correlation of the transformed variables is \(-18/(4\cdot9)=-1/2\). In one-dimensional canonical correlation, the canonical correlation is the nonnegative magnitude, so it remains \(1/2\). For example, the original unit-variance scores use \(a=1/2\) and \(b=1/3\). The transformed coefficients are \(a^*=(-2)^{-1}(1/2)=-1/4\) and \(b^*=3^{-1}(1/3)=1/9\). They recover the same scores:

$$ a^*X^*=(-1/4)(-2X)=X/2,\qquad b^*Y^*=(1/9)(3Y)=Y/3. $$

The sign of the raw correlation changed because one variable was multiplied by a negative number; the magnitude and the attainable association did not.

Invariance of the Canonical Correlations

The canonical correlations are the ordered maximum correlations between linear combinations of the two sets, with successive pairs subject to the standard within-set uncorrelatedness constraints. Under a nonsingular transformation, every transformed coefficient pair corresponds to exactly one original pair: set \(a=A^T a^*\) and \(b=B^T b^*\). The score identity above shows that this correspondence preserves the scores themselves, not merely their correlations.

Theorem: Suppose \(X\) and \(Y\) have finite second moments and positive-definite within-set covariance matrices. For any nonsingular \(A\) and \(B\), the ordered canonical correlations for \((AX,BY)\) equal those for \((X,Y)\). If \(a_k,b_k\) are coefficient vectors for a canonical pair, then \(A^{-T}a_k,B^{-T}b_k\) give the same centered canonical scores in the transformed coordinates.

Proof. For any coefficient pair \((a^*,b^*)\) in the transformed coordinates, let \(a=A^T a^*\) and \(b=B^T b^*\). Since \(A\) and \(B\) are nonsingular, this is a bijection between transformed and original coefficient pairs. The centered scores satisfy

$$ (a^*)^T(X^*-E[X^*])=a^T(X-E[X]),\qquad (b^*)^T(Y^*-E[Y^*])=b^T(Y-E[Y]). $$

Consequently, the two scores have the same variances and covariance under the correspondence, and hence the same correlation whenever both coefficients are nonzero. In particular, the set of correlations attainable by nonzero linear combinations is unchanged. The first canonical correlation, the maximum over this set, is therefore unchanged.

For each later canonical pair, the admissible coefficient pairs are additionally constrained so that their scores are uncorrelated with the earlier canonical scores within their respective sets. The earlier scores are preserved exactly by the same correspondence. Thus a candidate score is uncorrelated with an earlier score before transformation if and only if it is uncorrelated with that score afterward: each covariance in the constraint is the same covariance of the same random variables. At every successive maximization, the feasible sets and the objective correlations are therefore identical under the bijection. This proves equality of the ordered canonical correlations and the stated coefficient transformation. \(\square\)

Whitening Gives a Matrix View

The same invariance can be seen through the whitened cross-covariance matrix. With positive-definite within-set covariance matrices, define

$$ C=\Sigma_{XX}^{-1/2}\Sigma_{XY}\Sigma_{YY}^{-1/2}. $$

The canonical correlations are the singular values of \(C\), including zero values up to \(\min(p,q)\). For the transformed variables, define \(C^*=\Sigma_{X^*X^*}^{-1/2}\Sigma_{X^*Y^*}\Sigma_{Y^*Y^*}^{-1/2}\). Set

$$ Q_X=\Sigma_{X^*X^*}^{-1/2}A\Sigma_{XX}^{1/2},\qquad Q_Y=\Sigma_{Y^*Y^*}^{-1/2}B\Sigma_{YY}^{1/2}. $$

Both matrices are orthogonal. For example,

$$ Q_XQ_X^T =\Sigma_{X^*X^*}^{-1/2}A\Sigma_{XX}A^T\Sigma_{X^*X^*}^{-1/2} =I_p, $$

using \(\Sigma_{X^*X^*}=A\Sigma_{XX}A^T\); the corresponding calculation gives \(Q_YQ_Y^T=I_q\). Substitution of the transformed covariance blocks now yields

$$ C^*=Q_X C Q_Y^T. $$

Multiplication on the left and right by orthogonal matrices does not change singular values. To see this, \((C^*)^T C^*=Q_Y C^T C Q_Y^T\), which is an orthogonal similarity of \(C^T C\), so the two matrices have the same eigenvalues. Their nonnegative square roots, the singular values, are therefore equal. This proves the invariance again from the whitened representation.

Worked Example: A Shear and a Change of Scale

Let \(X=(X_1,X_2)^T\) and \(Y=(Y_1,Y_2)^T\) be centered, with \(\Sigma_{XX}=\Sigma_{YY}=I_2\) and \[ \Sigma_{XY}= \begin{pmatrix} 0.8&0\\ 0&0.3 \end{pmatrix}. \] These covariance blocks are valid: the joint covariance has eigenvalues \(1\pm0.8\) and \(1\pm0.3\), all positive. Since the within-set covariance matrices are identities, the canonical correlations are the singular values of \(\Sigma_{XY}\), namely \(0.8\) and \(0.3\).

Now use the nonsingular transformations \[ A=\begin{pmatrix}1&1\\0&1\end{pmatrix},\qquad B=\begin{pmatrix}2&0\\0&1\end{pmatrix}. \] Their determinants are \(1\) and \(2\), so neither transformation loses a coordinate. The transformed covariance blocks are

$$ \Sigma_{X^*X^*}=AA^T= \begin{pmatrix}2&1\\1&1\end{pmatrix},\quad \Sigma_{Y^*Y^*}=BB^T= \begin{pmatrix}4&0\\0&1\end{pmatrix},\quad \Sigma_{X^*Y^*}=A\Sigma_{XY}B^T= \begin{pmatrix}1.6&0.3\\0&0.3\end{pmatrix}. $$

For the first original canonical pair, \(a=b=(1,0)^T\). Since \[ A^{-T}=\begin{pmatrix}1&0\\-1&1\end{pmatrix},\qquad B^{-T}=\begin{pmatrix}0.5&0\\0&1\end{pmatrix}, \] the transformed coefficients are \(a^*=(1,-1)^T\) and \(b^*=(0.5,0)^T\). As \(X^*=(X_1+X_2,X_2)^T\) and \(Y^*=(2Y_1,Y_2)^T\), these coefficients give \(a^{*T}X^*=X_1\) and \(b^{*T}Y^*=Y_1\). The second pair transforms to \(a^*=(0,1)^T\), \(b^*=(0,1)^T\), giving \(X_2\) and \(Y_2\). The two original canonical correlations, \(0.8\) and \(0.3\), are thus retained, with the same scores represented in the new coordinates.

Worked Example: Why the Coefficient Uses an Inverse Transpose

Let \(X_1\) and \(X_2\) be independent, each with mean zero and variance one, and consider the original score \(X_1\), whose coefficient is \(a=(1,0)^T\). Record the vector instead as \[ X^*=\begin{pmatrix}1&2\\0&1\end{pmatrix}X =\begin{pmatrix}X_1+2X_2\\X_2\end{pmatrix}. \] The transformation matrix has determinant one. Its inverse transpose is \[ A^{-T}=\begin{pmatrix}1&0\\-2&1\end{pmatrix}, \] so the coefficient for the same score is \(a^*=(1,-2)^T\). Direct substitution verifies \[ a^{*T}X^*=(X_1+2X_2)-2X_2=X_1. \]

Using \(A^{-1}a=(1,0)^T\) instead would give the score \(X_1+2X_2\), not \(X_1\). Its variance is \(1+4=5\), because independence gives \(\operatorname{Cov}(X_1,X_2)=0\); the original score has variance \(1\). The inverse alone is not the coefficient rule for a column vector in a score written as \(a^TX\). Transposing the score identity is what produces the inverse transpose.

Common Pitfalls and Practical Meaning

Coordinate invariance is useful when variables have different units or when an analyst chooses a numerically convenient set of linear combinations. Rescaling, rotating, or applying an invertible shear within either set may change the numerical entries of covariance matrices and the displayed coefficients. Those changes do not alter the canonical correlations. The coefficient vectors are coordinate-dependent descriptions of scores; the scores and their correlations can be represented unchanged.

The claim has limits. The transformation must be nonsingular and act separately within each set. A singular map can discard a direction, and a transformation that combines variables across the two sets changes which quantities are being associated. Neither case is covered by the invariance theorem.

Common mistake: “The variables have been rescaled or mixed, so the canonical correlations must change because the covariance matrices changed.” The correction is to compare the full optimization problem, not individual covariance entries. Under nonsingular separate transformations, coefficient pairs correspond bijectively and produce exactly the same centered scores. A related error is to apply \(A\) to the coefficient vector; the correct rule is \(A^{-T}\), as required by the score identity.

Worked Example: A Singular Transformation Can Remove a Root

Use the two-dimensional model from the shear example: the within-set covariance matrices are \(I_2\), and the cross-covariance is \(\operatorname{diag}(0.8,0.3)\). Instead of an invertible change of coordinates, retain only the first component of \(X\), so \(X^*=X_1\), while keeping \(Y^*=Y\). This map from \(X\) to \(X^*\) is singular as a map from \(\mathbb{R}^2\) to the recorded information: it discards \(X_2\).

The only whitened cross-covariance row is now \((0.8,0)\). Its sole singular value is \[ \sqrt{0.8^2+0^2}=0.8. \] The original canonical correlations were \(0.8\) and \(0.3\), but the second root is no longer available because the \(X_2\) direction has been removed. This does not contradict invariance: the transformation is not nonsingular and does not give a bijection between coefficient vectors.

Key takeaway: Under separate nonsingular linear transformations \(X^*=AX\) and \(Y^*=BY\), canonical correlations are unchanged. The coefficient vectors that preserve the same scores transform as \(a^*=A^{-T}a\) and \(b^*=B^{-T}b\). Invertibility is essential.

Check Your Understanding

Use the definitions and arguments above to answer these questions.

  1. If \(X^*=AX\), what coefficient \(a^*\) gives the same centered score as \(a\), and how can you verify the formula directly?
  2. Why does the bijection between coefficient pairs establish invariance of successive canonical correlations, not just the first one?
  3. What property of the matrices \(Q_X\) and \(Q_Y\) explains why the singular values of the whitened cross-covariance are unchanged?
  4. If one variable is multiplied by a negative scalar, why can its signed scalar correlation change while its canonical correlation remains the same?
  5. Give a reason a singular transformation may remove a canonical correlation, and explain why this does not violate the invariance result.
Clinical Biostats