Tutorials › Statistical Theory I - Probability and Distribution Theory › Valid Correlation Matrices

Variance and Covariance Structure · Tutorial 365 of 994

Valid Correlation Matrices

Learn to characterize valid correlation matrices and check candidate matrices using positive semidefiniteness, principal minors, and explicit examples.

Intermediate 10 min read

What You'll Learn

  • State the necessary and sufficient conditions for a matrix to be a valid correlation matrix.
  • Explain why correlations of actual random variables produce a positive semidefinite matrix.
  • Use all principal minors to assess positive semidefiniteness.
  • Apply the exact determinant condition for a three-variable correlation matrix.
  • Identify why individually plausible pairwise correlations can still be jointly impossible.
  • Construct random variables that realize a positive semidefinite matrix with unit diagonal.

What Makes a Correlation Matrix Valid?

A list of pairwise correlations can look reasonable one pair at a time and still be impossible as a joint description of random variables. The key restriction is not merely that each correlation lies between \(-1\) and \(1\): the entire matrix must also satisfy a joint consistency condition. That condition is positive semidefiniteness.

Suppose \(X_1,\ldots,X_p\) have finite, strictly positive variances. Their correlation matrix records the correlation of every pair, including each variable's correlation with itself. Thus its diagonal entries are all \(1\). The earlier material on covariance matrices establishes the basic quadratic-form condition behind the second requirement: any linear combination of random variables has nonnegative variance.

Definition: A real \(p\times p\) matrix \(R\) is a valid correlation matrix if there exist random variables \(X_1,\ldots,X_p\) with finite, strictly positive variances such that \(R_{ij}=\operatorname{Corr}(X_i,X_j)\) for all \(i,j\). A real symmetric matrix \(R\) is positive semidefinite if \(a^{\mathsf T}Ra\geq 0\) for every vector \(a\in\mathbb{R}^p\).

The full characterization is especially useful: it tells us both how to reject an impossible candidate and when the matrix conditions alone guarantee that some joint distribution can realize it.

The Characterization

Theorem: A real matrix \(R\) is a valid correlation matrix if and only if it is symmetric, has \(R_{ii}=1\) for every \(i\), and is positive semidefinite.

For necessity, write \(Z_i=(X_i-E[X_i])/\sqrt{\operatorname{Var}(X_i)}\). Each \(Z_i\) has mean \(0\) and variance \(1\), and \(R_{ij}=E[Z_iZ_j]\). The matrix is symmetric because \(E[Z_iZ_j]=E[Z_jZ_i]\), and its diagonal entries are \(E[Z_i^2]=1\). For any \(a\in\mathbb{R}^p\),

$$ a^{\mathsf T}Ra =\sum_{i=1}^p\sum_{j=1}^p a_i a_j E[Z_iZ_j] =E\left[\left(\sum_{i=1}^p a_iZ_i\right)^2\right] \geq 0. $$

This proves that \(R\) is positive semidefinite.

For sufficiency, suppose \(R\) is symmetric, positive semidefinite, and has unit diagonal. By the spectral theorem, there is a real matrix \(U\) such that \(R=UU^{\mathsf T}\). Let \(u_i\) denote row \(i\) of \(U\). Then \(u_i^{\mathsf T}u_j=R_{ij}\), and \(u_i^{\mathsf T}u_i=R_{ii}=1\). Take independent random variables \(\varepsilon_1,\ldots,\varepsilon_p\) with \(P(\varepsilon_k=1)=P(\varepsilon_k=-1)=1/2\), and define \(X_i=\sum_{k=1}^p U_{ik}\varepsilon_k\). Since \(E[\varepsilon_k]=0\) and \(E[\varepsilon_k\varepsilon_l]\) is \(1\) if \(k=l\) and \(0\) otherwise,

$$ E[X_i]=0,\qquad \operatorname{Cov}(X_i,X_j) =E[X_iX_j] =\sum_{k=1}^p U_{ik}U_{jk} =R_{ij}. $$

In particular, \(\operatorname{Var}(X_i)=R_{ii}=1\). Thus the correlations of these variables are exactly the entries of \(R\), proving sufficiency. \(\square\)

Testing Positive Semidefiniteness With Principal Minors

A principal submatrix is formed by selecting the same set of indices for its rows and columns. Its determinant is a principal minor. For a symmetric matrix, checking every principal minor gives an exact test, including when the matrix is singular.

Theorem: A real symmetric matrix is positive semidefinite if and only if every principal minor is nonnegative.

If \(A\) is positive semidefinite, each principal submatrix is also positive semidefinite: its quadratic form is the quadratic form of \(A\) applied to vectors that are zero outside the selected indices. Its eigenvalues are therefore nonnegative, so its determinant, the product of those eigenvalues, is nonnegative.

For the converse, suppose every principal minor of an \(n\times n\) symmetric matrix \(A\) is nonnegative. Expanding the determinant gives

$$ \det(tI+A)=t^n+c_1t^{n-1}+\cdots+c_n, $$

where \(c_k\) is the sum of all principal minors of order \(k\). Hence every \(c_k\geq 0\), and \(\det(tI+A)>0\) for every \(t>0\), since its leading term is strictly positive and all terms are nonnegative. If \(A\) had a negative eigenvalue \(\lambda\), then \(t=-\lambda>0\) would satisfy \(\det(tI+A)=0\), a contradiction. Since \(A\) is symmetric, all its eigenvalues are real; they must therefore all be nonnegative. This is exactly positive semidefiniteness. \(\square\)

For a correlation matrix, the principal minors of order one are already \(1\). A candidate must still pass the tests for every larger principal submatrix. In practice, listing every minor becomes cumbersome for large matrices, but the criterion explains what validity means and provides direct checks for small matrices.

The Three-Variable Condition

For three variables, write the correlations as \(a=R_{12}\), \(b=R_{13}\), and \(c=R_{23}\). The matrix has the form

$$ R= \begin{pmatrix} 1&a&b\\ a&1&c\\ b&c&1 \end{pmatrix}. $$

Its three principal minors of order two are \(1-a^2\), \(1-b^2\), and \(1-c^2\). Nonnegativity of these minors gives the familiar pairwise restrictions \(|a|,|b|,|c|\leq 1\). The determinant is

$$ \det(R)=1+2abc-a^2-b^2-c^2. $$

Thus, together with the pairwise restrictions, the determinant must be nonnegative. If \(a\) and \(b\) are fixed, the determinant condition can also be written as

$$ (c-ab)^2\leq (1-a^2)(1-b^2), \qquad ab-\sqrt{(1-a^2)(1-b^2)} \leq c\leq ab+\sqrt{(1-a^2)(1-b^2)}. $$

This is the exact range of values of \(c\) compatible with \(a\) and \(b\), when \(|a|\leq1\) and \(|b|\leq1\). The range describes joint compatibility, not just the separate bounds on each correlation.

Worked Example: Checking a Positive Definite Candidate

Consider

$$ R= \begin{pmatrix} 1&0.8&0.2\\ 0.8&1&0.2\\ 0.2&0.2&1 \end{pmatrix}. $$

The matrix is symmetric with unit diagonal. Its three principal minors of order two are

$$ 1-0.8^2=0.36,\qquad 1-0.2^2=0.96,\qquad 1-0.2^2=0.96. $$

The determinant is

$$ 1+2(0.8)(0.2)(0.2)-0.8^2-0.2^2-0.2^2 =1+0.064-0.64-0.04-0.04 =0.344. $$

All principal minors are nonnegative, so \(R\) is positive semidefinite. The characterization theorem shows that it is a valid correlation matrix. In fact, every principal minor is positive, so this example passes the stronger, strict version of the test as well.

Worked Example: Pairwise Plausible but Jointly Impossible

Now consider a candidate in which two variables are each assigned correlation \(0.9\) with a third, but have correlation \(-0.9\) with each other:

$$ R= \begin{pmatrix} 1&0.9&0.9\\ 0.9&1&-0.9\\ 0.9&-0.9&1 \end{pmatrix}. $$

Each proposed correlation lies in the permitted pairwise range \([-1,1]\), and each minor of order two is \(1-0.9^2=0.19\). But the determinant is

$$ 1+2(0.9)(0.9)(-0.9)-3(0.9^2) =1-1.458-2.43 =-2.888. $$

The negative determinant violates positive semidefiniteness. Therefore no three random variables can have all these pairwise correlations simultaneously. Checking the three pairs separately would miss the incompatibility.

Worked Example: A Valid Boundary Case

Consider a candidate with \(a=b=0.5\). The feasible interval for \(c\) is

$$ 0.25-\sqrt{(0.75)(0.75)} \leq c\leq 0.25+\sqrt{(0.75)(0.75)}, \qquad\text{so}\qquad -0.5\leq c\leq1. $$

Choose the endpoint \(c=-0.5\). The resulting matrix is

$$ R= \begin{pmatrix} 1&0.5&0.5\\ 0.5&1&-0.5\\ 0.5&-0.5&1 \end{pmatrix}. $$

Each minor of order two is \(1-0.5^2=0.75\), while

$$ \det(R)=1+2(0.5)(0.5)(-0.5)-3(0.5^2) =1-0.25-0.75=0. $$

All principal minors are nonnegative, so the matrix is valid even though its determinant is zero. To verify this directly, take independent random signs \(\varepsilon_1,\varepsilon_2\), each equally likely to be \(1\) or \(-1\), and set

$$ X_1=\varepsilon_1,\qquad X_2=\tfrac12\varepsilon_1+\tfrac{\sqrt{3}}2\varepsilon_2,\qquad X_3=\tfrac12\varepsilon_1-\tfrac{\sqrt{3}}2\varepsilon_2. $$

Each variable has mean zero and variance \(1\). Using \(E[\varepsilon_1\varepsilon_2]=0\), their pairwise covariances are \(E[X_1X_2]=0.5\), \(E[X_1X_3]=0.5\), and \(E[X_2X_3]=0.25-0.75=-0.5\). Since their variances are \(1\), these covariances are also their correlations. This realizes the stated matrix.

Common Mistake: Checking Only the Leading Minors

A tempting shortcut is to check only the minors in the upper-left corner, sometimes called the leading principal minors. Nonnegative leading principal minors are not, in general, enough to establish positive semidefiniteness. For example,

$$ A= \begin{pmatrix} 1&1&2\\ 1&1&2\\ 2&2&1 \end{pmatrix} $$

has leading principal minors \(1\), \(0\), and \(0\), all nonnegative. But the principal minor using rows and columns \(1\) and \(3\) is

$$ \det\begin{pmatrix}1&2\\2&1\end{pmatrix}=1-4=-3. $$

So \(A\) is not positive semidefinite. The correction is to check all principal minors when using the semidefinite criterion. Another distinction matters at the boundary: a zero determinant does not automatically mean a matrix is invalid. The third worked example shows a valid correlation matrix with determinant zero.

Why the Conditions Matter

A correlation matrix summarizes a collection of pairwise relationships while representing one joint set of variables. Positive semidefiniteness enforces consistency across every linear combination, not just across individual pairs. This is why the matrix criterion is useful when assessing a proposed dependence structure: it rules out combinations that cannot arise from random variables.

Key takeaway: A candidate is a valid correlation matrix exactly when it is symmetric, has ones on its diagonal, and is positive semidefinite. For three variables, check all three pairwise minors and the determinant; pairwise bounds alone do not guarantee joint validity.

Check Your Understanding

Use the matrix conditions and the calculations in this tutorial to answer the following.

  1. Why must the diagonal entries of a correlation matrix equal \(1\), assuming each variable has strictly positive variance?
  2. For a symmetric \(3\times3\) matrix with unit diagonal, write the determinant condition in terms of \(a=R_{12}\), \(b=R_{13}\), and \(c=R_{23}\).
  3. If \(a=0\) and \(b=0.6\), what interval of values for \(c\) is compatible with a valid three-variable correlation matrix?
  4. Why is it not enough to check that every off-diagonal entry lies between \(-1\) and \(1\)?
  5. What does a zero determinant tell you about the validity test, and why does it not by itself imply invalidity?