# Covariance matrix calculations

I know the covariance matrix of five variables $(a,b,c,x,y)$:

$C = \left(\begin{array}{ccccc} \sigma^2_x&0&0&0&0\\ 0&\sigma^2_y&0&0&0\\ 0&0&\sigma^2_a&c_{a,b}&c_{a,c}\\ 0&0&c_{a,b}&\sigma^2_b&c_{b,c}\\ 0&0&c_{a,c}&c_{b,c}&\sigma^2_c\\ \end{array}\right)$

How can I compute the value of $\text{cov}(ax+2b+c,ay+3b+c)$?

• Do the variables follow a multivariate Gaussian distribution?
– Ale
Mar 19, 2018 at 17:17
• Yes they do, sorry I forgot to mention it. Mar 23, 2018 at 8:25

Given that the variables follow a multivariate Gaussian distribution (as stated in the comments), then you can compute the covariance. In the next steps I will define $\mu_x,\dots,\mu_c$ as the expected values of $x,\dots,c$ and I will use the same properties mentioned here: Beginner's question: covariance of products of independent variables
$cov(ax+2b+c,ay+3b+c)=cov(ax,ay)+cov(ax,3b)+cov(ax,c)+cov(2b,ay)+cov(2b,3b)+cov(2b,c)+cov(c,ay)+cov(c,3b)+cov(c,c)$
$cov(ax,ay) = \sigma^2_a \mu_x \mu_y \quad \text{(see link above)}\\ cov(ax,3b) = 3cov(ax,b) = 3 [E(axb)-E(ax)E(b)]=3[E(x)E(ab)-E(a)E(x)E(b)]=3[E(x)(cov(a,b)+E(a)E(b))-E(a)E(x)E(b)]=3c_{a,b}\mu_x\\ cov(ax,c) = c_{a,c}\mu_x\\ cov(2b,ay) = 2c_{a,b}\mu_y\\ cov(2b,3b) = 6\sigma^2_b\\ cov(2b,c) = 2c_{b,c}\\ cov(c,ay) = c_{a,c}\mu_y\\ cov(c,3b) = 3c_{b,c}\\ cov(c,c) = \sigma^2_c$