How to create a large, well-conditioned symmetric PD matrix?

289 Views Asked by At

I wish to create a large and well-conditioned symmetric PD matrix, say a $1000 \times 1000$ matrix. The matrix should have real values, preferably randomly generated, and should not be a diagonal matrix.

I am currently stuck on how to fix the eigenvalues of my matrix, and I have not found a standard procedure for generating a matrix given a set of eigenvalues.

Can anyone offer a possible procedure that generates such matrix?

1

There are 1 best solutions below

1
On BEST ANSWER

Generate the eigenvalues first, hence you can control the condition number, put them in a diagonal matrix, $D$.

If you have the ability to generate an orthogonal matrix $U$, then we can create the matrix as $UDU^T$.

To generate a random orthogonal matrix, you can for example, you can use Gram-Schmidt procedure or use householder.