There should be any number of web sites that describe Gaussian Elimination to solve problems like Ax = b. Your problem is similar. You''re solving a problem with multiple right-hand sides (the columns of the identity matrix). Try this link for example code:
http://developer.intel.com/design/pentiumiii/sml/24504301.pdfThey do provide code for a 4x4 matrix, and since they''ve unrolled loops and things its a bit awkward to convert back to a 3x3.
They also provide code for using Cramer''s rule on a 4x4 matrix, which for up to a 4x4 matrix (and not really anything larger) can be more efficient than Gaussian Elimination.
Also, looks like you''re trying to find an inverse
transformation matrix, which has a closed form inverse if you know the rotation angle, translation, and scale values. Do a web search on "inverse transformation matrix." Perhaps look at www.realtimerendering.com, or the articles on gamedev.net.
In any case, by inspection, the inverse to the matrix you give, is, explicitly:
[-1/3 0 0 ]| 0 cos(t) sin(t)|[ 0 -sin(t) cos(t)]
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net