Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to generate random numbers from a multivariate normal distribution in Matlab. Normally, this is done like:

$w = \overline{w} + \text{chol}(\Sigma) \cdot \vec{l}$

But in my case I don't know $\Sigma$ itself, but only its inverse $B=\Sigma^{-1}$

Is there a way to calculate $chol(B^{-1})$, without calculating $B^{-1}$? If I can get an expression like

$w = \overline{w} + F(B)~\backslash~ \vec{l}$, where \ is a more optimal way to calculate an inverse in Matlab, that would be great.

share|cite|improve this question
Not sure if this helps but have you referred mvnrnd? – Inquest Mar 1 '12 at 18:11
mvnrnd takes sigma as second argument, so I'd have to run mvnrnd(mean,inv(B)) which is a pretty expensive calculation. – Ben Ruijl Mar 1 '12 at 21:58
I'm doing the same thing, but I have been getting funky results. You can take the cholesky decomposition of $\Sigma^{-1}$ and find the upper cholesky decomposition of that and then take the inverse. However, what I am left with is a triangular matrix that can reproduce $\Sigma$, but it isn't the same as $chol(\Sigma)$ – John Jan 30 '13 at 19:53

If you want to generate multi-variante normal distributed vectors with covariance matrix $\Sigma^{-1}$, you don't need the cholesky decomposition of $\Sigma^{-1}$. Any decomposition $AA^T = \Sigma^{-1}$ is okay. That includes $L^{-T} (L^{-T})^T = \Sigma^{-1}$ where $LL^T = \Sigma$ is the cholesky decomposition of $\Sigma$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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