Sign in to follow this  
applesauce

matrix inverses

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this