matrix inverses
can someone help me out and give me an easy, clear formula or description for deriving the inverse of a square matrix? if it's as simple as say: (1/(x22*x11 - x12*x21))*(a 2x2 matrix), then how would i multiply a single value into size n-by-n matrix? i understand how to properly multiply two equal square matrices, but nothing else, really. i'm very lost for something that should be so simple.
Finding the inverse of a matrix is not that simple. Generally you use something like Gauss-Jordan elimination (which is not a very hard algorithm). For a 2 by 2 matrix you could probably derive some simple formula.
As usuall wikipedia has more information.
As usuall wikipedia has more information.
for 3x3 and 4x4s i use the adjoint method (or something like that i think it's called). it basically creates an array of cofactors, then computes the determinant. then it uses the cofactor values and determinant to build the inverse matrix. the formula isn't simple (involves cofactor expansion), and there are other methods, but for small matrices they all run at about the same speed.
see this for the formula.
see this for the formula.
the easiest way I can think of is to use Gauss-Jordan:
keep in main that A * A^-1 = I
set up your Gauss-Jordan like so:
[ A | I ]
take the necessary steps to xfrom A to I, and after doing so, whatever is left on the right hand side (originally I) will be your A inverse.
[Edited by - Driv3MeFar on June 7, 2006 3:25:11 PM]
keep in main that A * A^-1 = I
set up your Gauss-Jordan like so:
[ A | I ]
take the necessary steps to xfrom A to I, and after doing so, whatever is left on the right hand side (originally I) will be your A inverse.
[Edited by - Driv3MeFar on June 7, 2006 3:25:11 PM]
Quote:Original post by Driv3MeFar
the easiest way I can think of is to use Gauss-Jordan:
keep in main that A * A^-1 = I
set up your Gauss-Jordan like so:
[ A | I ]
take the necessary steps to xfrom A to I, and after doing so, whatever is left right hand side (originally I) will be your A inverse.
Indeed. The good thing about Gauss-Jordan is how easy it is to implement in code. The method is very sequential.
The easiest way to invert a matrix is to not have to. If you built up the matrix from simple transformations, you can build up its inverse from equally simple transformations.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement