I've been digging this for a while
To find the inverse matrix, I need to find the determinant of the matrix(correct?)
But only way that i found is to calculate all the matrix using a11 (a22a33 - a23*a32) and so on..
Please enlighten me, what could be the best way to find the determinant, so that I can get inverse matrix?
or is there any more efficient way to get inverse matrix without finding the determinant???
Instead of finding the determinant of a general matrix, you can use an LU decomposition and then, like what Intel Math Kernel Library does:
computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
inv(U)
(U is an upper triangular matrix) is easier and more efficient to compute, for example with procedures shown here, but it boils down to the determinant of an upper triangular matrix being just the product of its diagonal.
And an obligatory reminder: use existing math library if possible, numerical computations like this is very easy to get wrong.