# Matrix Inverse

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

## Recommended Posts

Ello All, I was curious if the D3DXMatrixInverse function takes the inverse of the 3x3 portion (not including the translation part of the matrix) of the matrix, or does it take the inverse the full 4x4 matrix (including the translation part)? It was seem that it would only need to take the 3x3 portion because the _14, _24, _34, _44 ij positions would stay 0 and 1. --------------- In addition: If the 4x4 Matrix is viewed in portions
 R | 0
---|---
T | 1

R = 3x3 linear transformations (rotation, scale, shear, ...) T = translation (x, y, z) Then when D3DXMatrixInverse takes the inverse of the matrix, does it need to take the inverse T portion? If it does why? [Edited by - LostSource on March 2, 2007 1:15:45 AM]

##### Share on other sites
I sure hope it takes the inverse of the whole matrix, otherwise I have a whole lot of potentially bugged up code. I'm pretty sure it does though.

A 4x4 matrix isn't guaranteed to be a rotation and translation. It could be anything, perhaps a projection matrix or just a general linear system.

If you only inverted the rotational part (assuming no scaling is going on), then you'd rotate in the opposite angle about the same axis, and you'd still be translated into the same position. If you invert the whole thing, you will also translate yourself in the opposite direction. I think...

I hate math.

##### Share on other sites
I believe stanlo is right. The function is supposed to return
Quote:
 Return ValuesPointer to a D3DXMATRIX structure that is the inverse of the matrix

It's usage is not restricted to a specific type of matrices. So it should take the inverse of the entire matrix.

• 33
• 12
• 10
• 9
• 9
• ### Forum Statistics

• Total Topics
631354
• Total Posts
2999490
×