# Applying PCA on covariance matrix in order to generate a new random variable.

Let $\mathbf{x}$ be a random $n\times1$ real vector, $\mathbf{x}\in\Bbb{R}^n$, which is distributed normally with mean $\bar{\mathbf{x}}$ and covariance matrix $\Sigma_x\in\Bbb{R}^{n\times n}$, i.e. $\mathbf{x}\sim\mathcal{N}(\bar{\mathbf{x}},\Sigma_x)$.

I would like to generate a new random vector, $\mathbf{y}\in\Bbb{R}^m$, with $m<n$, for which the following requirements should be meet:

1. $\mathbf{y}\sim\mathcal{N}(\bar{\mathbf{y}},\Sigma_y)$
2. The covariance matrix $\Sigma_y$ should follow from $\Sigma_x$ via a PCA (Principal Component Analysis) process.

The above conditions arise from the fact that I need to apply PCA on $\Sigma_x$ such that only a fraction of the energy is preserved (say $90\%$), and the projection matrix, say $P$, transforms the original random vector $\mathbf{x}$ into $\mathbf{y}=P\mathbf{x}$.

I am looking for a discussion here, if you like to share your thoughts on this. Thanks a lot in advance!