Jump to content
  • Advertisement

Archived

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

Drath

Matrix inverse

This topic is 5535 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

Am I correct in saying that a matrix multiplied by its inverse = an identity matrix? Then why don''t I get an identity matrix back when I use D3DXMatrixInverse and D3DXMatrixDeterminant to calculate the inverse then multiply the two together? My origional matrix equals camera view * a projection matrix which is then transposed.

Share this post


Link to post
Share on other sites
Advertisement
The inverse of 2 is 0.5 meaning 2 * 0.5 = 1 which you could say is the identity matrix of a 1x1 matrix.

Share this post


Link to post
Share on other sites
Well to be fair, numbers have additive inverses as well as multiplicative inverses.

2 and -2 are additive inverses.
2 and 0.5 are multiplicative inverses.

Generally, when referring to matrices, you''re referring to the multiplicative inverse (the additive inverse isn''t as useful, especially with 3D work).


Josh

Share this post


Link to post
Share on other sites
There are a couple of things to remember here. First, any square matrix which has a determinant of 0 has an undefined inverse. Second, double-check the order in which you multiply the inverse and the original.

It should be: A*inv(A) = I

Share this post


Link to post
Share on other sites
Well I have got my code working. I put an extra unneeded transformation somewhere though that still doesn''t clear up why the previous part didn''t work considering none of the checking code has been changed.

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!