Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Inverse of 3x3 and up matrices

This topic is 5354 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do you find the inverse of a 3x3 matrix and up (meaning bigger dimensions like 4x4, 5x5) with pencil and paper? I know how to do it with a 2x2 matrix by the book. Find the determinant which is ad-bc assuming the matrix :
[a b]
[c d]
then the inverse is:
[(d/(ad-bc)) (-b/(ad-bc))]
[(-c/(ad-bc)) (a/(ad-bc))]
I''ve been just using my calculator for 3x3 calculations and up because there has been nothing in my book so I''m assuming that I really don''t need to know this but I want to know what''s going behind the scenes in the calculator. This is not a homework question I''m expanding my knowledge on the feeble base that I already have. Thanks in advance.
Charles Hwang -aka Tazel [Maxedge My Site(UC)|E-mail|NeXe|NeHe|SDL] [Google|Dev-C++|GDArticles|C++.com|MSDN]

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
A sophisticated computer program for solving systems of equations could use elimination and pivoting (switching around rows and/or columns) to factor the matrix into upper and lower triangular matrixes, and then use these matrices to solve systems rather than explicitly calculating the inverse matrix.

Ax = b


LUx = b

where L is a lower triangular matrix that looks something like:

x 0 0 0 0
x x 0 0 0
x x x 0 0
x x x x 0
x x x x x

where the x''s could be any number (it depends on the matrix that was factored). Everything above the main diagonal is 0.

and U is an upper diagonal matrix, where everything below the main diagonal is 0.

Any nonsingular square matrix can be factored like this. The factorization is then used to solve the system by doing the following:

let y = Ux
solve Ly = b
solve Ux = y

Solving both of those systems is easy because of the triangular structure of the matrices; straightforward substitution can be used.

There are also iterative methods for solving systems, where in each iteration a closer approximation to the solution is found. The program can just keep iterating until the solution is within the desired tolerance.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!