**comp.graphics.algorithms**

## Subject: **Re: 4x4 matrix inversion**

"Kaba"

news:MPG.1ecd9f578503f57798975a@news.cc.tut.fi...

> Deriving the n = 4 version is left as an exercise:)

The OP indicated that his matrices are built from affine

transformations but stored in 4-by-4 matrices. It is

probably better not to invert it by a general 4-by-4

process. To the OP: If M is the 3-by-3 block and T is

the 3-by-1 translation (or 1-by-3 if you use a different

storage convention), then the inverse has M^{-1} as its

3-by-3 block and translation -M^{-1}*T.

Regarding the cofactor expansion that reduces the 4-by-4

to 3-by-3 determinant calculations. You can save a lot

of cycles by reducing instead to only 2-by-2 determinants.

The Matrix4 class at my website implements the inversion

this way.

--

Dave Eberly

http://www.geometrictools.com

Reply

View All Messages in

**comp.graphics.algorithms**

path:

4x4 matrix inversion =>Re: 4x4 matrix inversion =>

Replies:

Re: 4x4 matrix inversion

Copyright © 2006 WatermarkFactory.com. All Rights Reserved.