Transforming multivariate $N(0,1)$ samples into $N(\mu,\sigma^2)$ samples via matrix operations

linear-transformationsnormal distribution

I have samples from $N(0,1)$ and I wish to transform them into samples from $N(\mu,\sigma^2)$. All distributions are multivariate, specifically they are 2D. I know that with univariate distributions, you can simply do $y=\sigma x + \mu$ to transform a standard distribution into any other gaussian. What is the equivalent operation for transforming multivariate standard distributions? I would prefer a matrix solution $Y=A X + \mu$ where $A$ is some matrix I can easily derive from the covariance matrix.

Best Answer

If $X$ is multivariate normal, any affine transform $AX+b$ is also multivariate normal for constants $A,b$. Thus,

$$Z\sim N(0,\mathbb{I}_n)\iff Z_i\overset{\text{i.i.d}}{\sim} N(0,1)\\ \implies Y\equiv \sigma Z+\mu{\bf1}_n\sim N(\mu{\bf1}_n, \sigma^2\mathbb{I}_n)\iff Y_i\overset{\text{i.i.d}}{\sim} N(\mu,\sigma^2),\ $$ where ${\bf1}_n$ is the $n\times 1$ column vector of ones.


Update: More generally, if $X\sim N(\mu_X,\Sigma_X)$, then $Y\equiv AX+b\sim N(A\mu_X+b,A\Sigma_XA').$