# Finding covariance from a transformed random variable given its covariance matrix

Let the bivariate random variable $$A=(A_1,A_2)^T$$ have a Gaussian distribution on $$\mathbb{R}^2$$ with zero mean and covariance matrix be given by

$$\begin{pmatrix} 1 & -0.4\\-0.4 & 1\end{pmatrix}$$.

Let $$B$$ = $$\begin{pmatrix} 1 \\ 2 \end{pmatrix}$$ and $$C$$= $$\begin{pmatrix} 2 \\ 1 \end{pmatrix}$$. Define $$X=B^TA,Y=C^TA$$. How do I find the covariance of X and Y?

I know that $$cov(X,Y) = E(XY)-E(X)E(Y)$$. I don't quite understand how to read a covariance matrix.

• The covariance matrix of a vector $X$ is defined as $\mathbb{E}\left(XX^\top\right) - \mathbb{E}\left(X\right)\mathbb{E}\left(X\right)^\top$. The $(i,j)$th component of it is the covariance between $X_i$ and $X_j$. Oct 30, 2021 at 20:40
• Hi, yes I am aware of that property, but I am confused with how I can obtain $cov(X,Y)$, and also what does $B^TA$ and $C^TA$ actually mean? Thanks in advance! @svensvenson
– user986741
Oct 30, 2021 at 20:44

You have $$B^\top A = A_1 + 2A_2$$ and $$C^\top A = 2A_1 + A_2$$. Then,

$$\begin{eqnarray*} Cov\left(X,Y\right) &=& Cov\left(A_1+2A_2,2A_1+A_2\right)\\ &=& 2Cov\left(A_1,A_1\right) + Cov\left(A_1,A_2\right) + 4Cov\left(A_1,A_2\right)+2Cov\left(A_2,A_2\right). \end{eqnarray*}$$

• And we can obtain the covariances from the covariance matrix am I right?
– user986741
Oct 30, 2021 at 20:52
• Yes, the $(i,j)$th entry of the covariance matrix is $Cov\left(A_i,A_j\right)$. Oct 30, 2021 at 20:55
• @svensvenson then final answer would be $2(1)+1(-0.4)-4(-0.4)+2(1) = 2$? Nov 2, 2021 at 12:42

You can use matrix properties:

$$\begin{split}\text{Cov}(B^TA, C^TA)&=B^T\text{Cov}(A, A)C\\ &=B^T\text{Var}(A)C\end{split}$$

It is 1-dimensional (a scalar).