A covariance matrix is a square matrix that represents that covariance between each pair of elements in a given multivariate random variable.

For a 2D random variable, the covariance matrix is

The off-diagonal entries are equal since . If and are uncorrelated, the off-diagonal entries of the covariance matrix are zero.

For a -dimensional random variable, the covariance matrix is given by

Properties

  1. The