Covariance of a random vector after a linear transformation

If $\mathbf {Z}$ is random vector and $A$ is a fixed matrix, could someone explain why $$\mathrm{cov}[A \mathbf {Z}]= A \mathrm{cov}[\mathbf {Z}]A^\top.$$

For a random (column) vector $\mathbf Z$ with mean vector $\mathbf{m} = E[\mathbf{Z}]$, the covariance matrix is defined as $\operatorname{cov}(\mathbf{Z}) = E[(\mathbf{Z}-\mathbf{m})(\mathbf{Z}-\mathbf{m})^T]$. Thus, the covariance matrix of $A\mathbf{Z}$, whose mean vector is $A\mathbf{m}$, is given by \begin{align}\operatorname{cov}(A\mathbf{Z}) &= E[(A\mathbf{Z}-A\mathbf{m})(A\mathbf{Z}-A\mathbf{m})^T]\\ &= E[A(\mathbf{Z}-\mathbf{m})(\mathbf{Z}-\mathbf{m})^TA^T]\\ &= AE[(\mathbf{Z}-\mathbf{m})(\mathbf{Z}-\mathbf{m})^T]A^T\\ &= A\operatorname{cov}(\mathbf{Z})A^T. \end{align}
I would add to the answer by Dilip Sarwate that the same result holds also for transformation of the form $\mathbf{Z}A^T$: $$\mathrm{cov}(\mathbf{Z}A^T) = A\mathrm{cov}(\mathbf{Z})A^T$$
Using the same approach: \begin{align} \mathrm{cov}(\mathbf{Z}A^T)&=\mathbb{E}[(\mathbf{Z}A^T-\mathbf{m}A^T)(\mathbf{Z}A^T-\mathbf{m}A^T)^T] \\ &=\mathbb{E}[(\mathbf{Z}-\mathbf{m})A^TA(\mathbf{Z}-\mathbf{m})^T] \\ &=\mathbb{E}[A(\mathbf{Z}-\mathbf{m})(\mathbf{Z}-\mathbf{m})^TA^T] \\ &=A\mathbb{E}[(\mathbf{Z}-\mathbf{m})(\mathbf{Z}-\mathbf{m})^T]A^T \\ &=A\mathrm{cov}(\mathbf{Z})A^T \\ \end{align}
Using $AB^TBA^T=BAA^TB^T$ in step (3): \begin{align}AB^TBA^T &= \left(\left(AB^TBA^T\right)^T\right)^T \\ &= \left(BA^TAB^T\right)^T \\ &= B\left(BA^TA\right)^T \\ &= BAA^TB^T \end{align}
• Why is $AB^TBA^T=BAA^TB^T$? Feb 21 '20 at 17:42