# Covariance matrix explanation

I try to understand and visualize myself covariance matrix. Supposing I have a matrix A = [ 2 3 4; 5 5 6 ], how do I calculate its covariance matrix, and what is its practical meaning? (All I was able to understand by now is that on the diagonal of the covariance matrix, variances for particular variables are placed, and on the upper and lower fields correlations between those variables.)

• Please also see concise an comprehensive explanation of covariance and related matrices via matrix multiplication. – ttnphns Apr 16 '13 at 11:58
• As far as I know, a covariance matrix can be computed for (a) multivariate distributions and (b) multivariate samples, but not for arbitrary $m$ by $n$ matrices such as your A, so it's impossible to tell what you're asking. Could you clarify? – whuber Apr 16 '13 at 15:31

If you have a vector of random variables $X = (X_1,...,X_n)^T$, the co-variance matrix $\Sigma$ can be calculated finding the pairwise co-variance of each of the variables. E.g. $\Sigma_{ij} = Cov(X_i,X_j)$.
So, like you say, along the diagonals you have $\Sigma_{ii} = Cov(X_i, X_i)=Var(X_i)$ and the upper and lower have the co-variance for each pair of variables. The co-variance is numerically describing how each of the variables vary with each other.