For two random variable vectors *A* and
*B*, the covariance is defined as

where *N* is the length of each column,
*μ*_{A} and
*μ*_{B} are the mean values of
*A* and *B*, respectively, and
`*`

denotes the complex conjugate.

The *covariance matrix* of two random variables is the matrix
of pairwise covariance calculations between each variable,

For a matrix *X*, in which each column is a
random variable composed of observations, the covariance matrix is the pairwise
covariance calculation between each column combination. In other words, $$C(i,j)=\mathrm{cov}\left(X(:,i),X(:,j)\right)$$.