Transformation between random variables If given realization of X and Y, which are i.i.d. Gaussian random variables.
We need to generate random variables C and D which are jointly Gaussian with zero mean and covariance matrix like
$
  \begin{bmatrix}
    2 & -1  \\
    -1 & 2 
  \end{bmatrix}$
using X and Y. How to provide a transformation that can be used to obtain C and D from X and Y?
 A: from the covariance matrix $\sigma^2_C=2, \sigma^2_D=2, \sigma_{CD}=\sigma_{DC}=-1$.
Hence, $\rho_{CD}=\frac{-1}{2}$. The desired transform is
$$\begin{align}
C&=\sigma_CX\\
D&=\sigma_D(\rho_{CD}X+\sqrt{1-\rho^2_{CD}}Y)
\end{align}$$
It is assumed that $X$ and $Y$ are zero-mean. Otherwise, the same transformation should be used with $\tilde{X}=X-\mu_X$ and $\tilde{Y}=Y-\mu_Y$.
A: If $x$ is a vector of i.i.d. Gaussian random variables, and $u=Ax+b$, then $u$ is Gaussian with mean $b$ and covariance matrix $AA^T$.
One way to decompose a given covariance matrix into such a product is the Cholesky decomposition, which msm used for his parametrization
$$
\begin{bmatrix}
    2 & -1  \\
    -1 & 2 
\end{bmatrix}
=
\begin{bmatrix}
    1 & 0  \\
    -\frac12 & 1 
\end{bmatrix}
\begin{bmatrix}
    2 &  0 \\
    0 & \frac32 
\end{bmatrix}
\begin{bmatrix}
    1 & -\frac12  \\
    0 & 1 
\end{bmatrix}
=
\begin{bmatrix}
    \sqrt{2} & 0  \\
    -\frac{\sqrt{2}}2 & \frac{\sqrt{6}}2 
\end{bmatrix}
\begin{bmatrix}
    \sqrt{2} &  -\frac{\sqrt{2}}2 \\
    0 & \frac{\sqrt{6}}2 
\end{bmatrix}
$$
