> [!NOTE] Theorem
> Let $n,m\in \mathbb{N}^{+}.$ Let $(X_{j})_{j=1}^{n}$ and $(Y_{k})_{k=1}^{m}$ be [[Sequences|sequences]] of [[Square-Integrable Discrete Real-Valued Random Variable|square-integrable discrete real-valued random variables]]. Then for all $a_{j},b_{k}\in \mathbb{R},$ $\text{Cov}\left( \sum_{j=1}^{n} a_{j}X_{j}, \sum_{k=1}^{m} b_{k}Y_{k} \right) = \sum_{j=1}^{n} \sum_{k=1}^{m} a_{j} b_{k} \text{Cov} (X_{j},Y_{k})$ where $\text{Cov}(X,Y)$ denotes the [[Covariance of Square-Integrable Discrete Real-Valued Random Variables|covariance]] of $X$ and $Y.$
**Proof**: First note that
$\begin{align}
\text{Cov}(aX+bY, Z) &= \mathbb{E}[((aX+bY)-\mathbb{E}[aX+bY])(Z-\mathbb{E}[Z])] \\
&= \mathbb{E}[(aX-\mathbb{E}[aX]+bY-\mathbb{E}[bY])(Z-\mathbb{E}[Z])] \\
&= \mathbb{E}[(aX-\mathbb{E}[aX])(Z-\mathbb{E}[Z]) + (bY-\mathbb{E}[bY])(Z-\mathbb{E}[Z])] \\
&= a \mathbb{E}[(X-\mathbb{E}[X])(Z-\mathbb{E}[Z])] +b \mathbb{E}[(Y-\mathbb{E}[Y])(Z-\mathbb{E}[Z])] \\
&= a \text{Cov}(X,Z) + b\text{Cov}(Y,Z).
\end{align}$
Repeatedly applying this and using [[Covariance of Square Integrable Discrete Real-Valued Random Variables is Symmetric|symmetry of covariance]] gives $\begin{align}
\text{LHS} &= \sum_{j=1}^{n} a_{j} \text{Cov} \left( X_{j}, \sum_{k=1}^{m} b_{j}Y_{j} \right) \\
&= \sum_{j=1}^{n}a_{j} \text{Cov} \left( \sum_{k=1}^{m} b_{j} Y_{j}, X_{j} \right) \\
&= \sum_{j=1}^{n} \sum_{k=1}^{m}a_{j} b_{j} \text{Cov}(Y_{j}, X_{j}).
\end{align}$