Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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?

share|improve this question
    
It's [2] that's different, not [3]. –  joriki Jul 20 '12 at 12:29

1 Answer 1

The value is unchanged from the original matrix; that can't be a coincidence. I suspect that the libraries you're using are treating the matrices as symmetric/Hermitian matrices and don't change the values below the diagonal.

share|improve this answer

Your Answer

 
discard

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.