# Matrix Inversion Cholesky Factorization -> results not exact

I am calculating the inverse of a square matrix using different libraries via Cholesky factorization. However my results are not as I was expecting. I am not an expert in maths, but I was expecting to get a closer result.

I am using MLK, magma and CULA libraries to calculate the inverse of a matrix in CPU and GPUs. After doing the calculation with different libraries I've noticed the results always differ in one element. Say I want to calculate the inverse of A= [0.237306,0.000458;0.000458,0.238497]:

A[0] = 0.237306 A[1] = 0.000458 A[2] = 0.000458 A[3] = 0.238497

The result I obtain is:

inv(A)[0] = 4.213983 inv(A)[1] = -0.008092 inv(A)[2] = 0.000458 inv(A)[3] = 4.192946

However, the correct result should be

4.2139841 -0.0080924 -0.0080924 4.1929404

As you can see, inv(A)[3] is different, although the rest of them are fine. Is that how Cholesky Inversion should work? Is this a correct/approximate result or am I doing something wrong here?

• It's [2] that's different, not [3]. – joriki Jul 20 '12 at 12:29