Archived

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

PRISMA

Inverse of a Matrix

Recommended Posts

Hey everyone. I need some help. I have forgotten how to inver a 4x4 matrix. I remember how to inver a 2x2 and a 3x3, but a 4x4 (or an NxN for that matter) uses a different algorithm. Any replies (relevant) will be greatly appreciated.

Share this post


Link to post
Share on other sites
Actually we just talked about this is the rotation about an arbitrary axis thread.

Do you know how to do a Gauss-Jordan reduction on a matrix?

If so, in order to calculate the inverse of an n x n matrix you can simply create a new matrix with the n x 2n matrix with the right square being the matrix to be inverted and the left square being the n x n identity matrix, and perform a gaussian reduction on the matrix.

So if you want to invert:
[1 2 3]
[1 4 9]
[1 1 1]
create a matrix:
[1 2 3 1 0 0]
[1 4 9 0 1 0]
[1 1 1 0 0 1]
And perform the reduction and you''d get:
[1 0 0 -2.5 .5 3]
[0 1 0 4.0 -1 -3]
[0 0 1 -1.5 .5 1]

And the matrix
[-2.5 .5 3]
[4.0 -1 -3]
[-1.5 .5 1]
is the inverse.

Share this post


Link to post
Share on other sites