For two random variables and , the covariance measures the extent to which the two variables vary together. This is defined by:
If and are independent, then their covariance equals zero.
For two vectors and , their covariance is a matrix given by:
If we consider the covariance of the components of a vector with each other, then we use a slightly simpler notation ].