- #1
brydustin
- 205
- 0
I've been trying to invert a real symmetric matrix and the inverse that I compute via eigenvalue decomposition is not the inverse (using QV^-1Q^T), the stranger thing is that QVQ^T gets back my orginal matrix matrix. Even more unusual is that the matrix starts off at approximately identity (in general it won't be), and so the analytical eigenvalue-eigenvector decomposition should be I = I*I*I, but instead V~=I (the eigenvalues) and Q is just a random orthogonal matrix. V is roughly I but when computing the inverse (which should also be I ) it all goes bad. I thought that I could switch over to the cholesky decomposition because the matrix will be positive definite always (for any iteration), but I really don't want to do anything artificial on the first iteration (i.e. if its first iteration, set the inverse equal to the matrix). Plus I need to compute the determinant of this matrix as well which I thought was most practically compute as a product of the eigenvalues. I don't think that I should have to compromise, but its not working...