Generate random symmetric positive-definite matrix

4k Views Asked by At

Is there a simple way to generate a random matrix that is symmetric and positive-definite? The symmetry seems like it could be achieved by generating a matrix $M$ with independent random entries and using $M + M^T$, but is there a way I can ensure positive-definiteness?

2

There are 2 best solutions below

0
On BEST ANSWER

Generate a random matrix $M$. This matrix is almost surely full-rank. Now set $A = MM^T$ and $A$ is a positive definite matrix.

0
On

Since a symmetric, positive definite matrix is uniquely determined by its Cholesky decomposition, you could just randomly choose a lower triangular matrix $L$ with positive diagonal entries and obtain your matrix as $LL^T$.