Variance of a linear combination of vectors Let $A$ and $B$ be two constant matrices and let $x$ and $ y$ be two random vectors, what is the general formula for $Var(Ax+By)$? I know the formula for when $x$ and $y$ are scalar random variables and $A$ and $B$ are constants, but what about the matrix case?
 A: The "variance" of a vector random variable is actually 
a covariance matrix.
If
$\mathbf X = (X_1, X_2, \ldots X_n)$ is a (row) vector where the $X_i$ are
scalar random variables, then the "variance" of $\mathbf X$ is a $n\times n$ matrix
$\operatorname{var}(\mathbf X)$ whose $(i,j)$-th entry is $\operatorname{cov}(X_i,X_j)$. Extending the notion of expectation in the obvious way to vectors
(expectation of a vector is the vector of expectations)
so that $E[\mathbf X] = (E[X_1], E[X_2], \ldots E[X_n]) = \mathbf m$ is
the mean vector of $\mathbf X$, we can write (with further similar extension
to matrices) 
$$\operatorname{var}(\mathbf X) 
= E\left[(\mathbf X - \mathbf m)^T(\mathbf X - \mathbf m)\right]
= \left[E\left[\left(X_i-E[X_i]\right)\left(X_j-E[X_j]\right)\right]\right]
= \left[\operatorname{cov}(X_i,X_j)\right],$$
that is, the $(i,j)$-th entry of the matrix $\operatorname{var}(\mathbf X)$
is $\operatorname{cov}(X_i,X_j)$. Note that the diagonal entries of
$\operatorname{var}(\mathbf X)$ are the variances of the $X_i$'s.
More generally, $\operatorname{cov}(\mathbf X, \mathbf Y)$ is a matrix whose $(i,j)$-th entry is $\operatorname{cov}(X_i,Y_j)$
Now apply all this to find the covariance matrix of the vector
$\mathbf X A^T + \mathbf YB^T$. (Note that your $Ax+bY$ assumes column vectors
and I have translated your expression into my preference for row vectors.)
We get
$$\operatorname{var}(\mathbf X A^T + \mathbf YB^T)
= A\operatorname{var}(\mathbf X) A^T + B\operatorname{var}(\mathbf Y)B^T
+ A\operatorname{cov}(\mathbf X, \mathbf Y)B^T + B\operatorname{cov}(\mathbf Y, \mathbf X)A^T$$
which is a generalization of 
$$\begin{align}
\operatorname{var}(aX+bY)
&= a^2\operatorname{var}(X) + b^2\operatorname{var}(Y)
+ ab\operatorname{cov}(X, Y) + ba\operatorname{cov}(Y,X)\\
&= a^2\operatorname{var}(X) + b^2\operatorname{var}(Y)
+ 2ab\operatorname{cov}(X, Y).
\end{align}$$
