One way of doing this is to use gaussian elimination. If the matrix to invert is A, the inversion of A is A' and the identity matrix is I, then the algorithm is:
Row reduce A until it is I. If you now use the same row reductions on I, you get A'. ---- The reduction of A can be written: E1 E2 .. En A = I Now A' = E1 E2 .. En I This is just the same as reducing the matrix (A | I) into ( I | A') (first the columns of A, then the columns of I) , and return the matrix composed of the last n columns of ( I | A' ) An other approach is to LU decompose A into LU and then create A'. ---- Now, remember: the inverse of A exists if, and only if A is nxn (square) and det(A)=0 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---
