I want to create an animation in which a bivariate normal distribution rotate in xy plane by using matplotlib.

I don't want to alter the variances in the two principal components, all I want is to rotate the two principal components at the same pace.

How the correlation matrix should evolve in order to achieve this?


1 Answer 1


Suppose your initial covariance matrix is $\Sigma$.

Let $R=\begin{bmatrix} \cos\theta & \sin \theta \\ -\sin \theta & \cos \theta \end{bmatrix}$.

Verify that $R\Sigma R^T$ rotates the principal component as $\theta$ changes. Try to prove this using eigenvalue decomposition of $\Sigma$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.