# Thread: Data to Test a Cholesky Decomposition

1. ## Data to Test a Cholesky Decomposition

I am writing a computer program that performs a Cholesky Factorization on a real symmetric matrix.

I'd like to test the program with matrices of size 6 x 6 and larger--with known results against which the output of my program can be compared.

Any chance somebody in these forums have some data they could post? Square symmetric matrix AND Cholesky Factorization?

Alternately, is there another resource to which you could point me that would have a variety of matrices along with solutions?

2. ## Re: Data to Test a Cholesky Decomposition

what I'd do is work it the other way around.

Use the software of your choice to randomly generate $L$, and thus $L^*$

Then multiply those to give you the matrix your algorithm can be applied to.

This is a few lines in Mathematica.

3. ## Re: Data to Test a Cholesky Decomposition

Thanks.

I didn't think of that. (Seriously.)
Unfortunately, I don't have Mathematica. (I wonder if Wolfram Alpha offers this sort of functionality.)

I suppose I could write a small program in C++ that uses a random number generator to fill the lower triangular portion of the array and then form L * L^T.
It's a bit more work than I expected, but doable.