matrix question

Started by
3 comments, last by Fragmo 22 years, 2 months ago
my math skills are a bit rusty, perhaps one of your big wonderful brains can help me out. given 2 matrices, matrixA and matrixB, is there a way to find the matrixC such that matrixA * matrixC = matrixB
Advertisement
Yes, if A*C=B then C=A^(-1)*B where A^(-1) is the inverse of A assuming it exists.
Keys to success: Ability, ambition and opportunity.
The inverse of a matrix, is simply multiplying all its values within by -1.
So...

(3, -2, 0) would become (-3, 2, 0).




Unifex
Unifex
quote:Original post by Unifex
The inverse of a matrix, is simply multiplying all its values within by -1.
So...

(3, -2, 0) would become (-3, 2, 0).


Umm, no. What you have described is the additive inverse, not the multiplicative inverse, which is necessary for the problem above. And you showed it using a vector, not a matrix (although granted, your vector is a 1x3 matrix).

The multiplicative inverse is a bit more involved. Sometimes it can be very easy to find -- the inverse of a pure rotation (without shear/scale/etc) is the transpose. Sometimes the inverse does not exist.

Here is a good page describing the matrix inverse and how to calculate it for 2x2 and 3x3 matrices, with pointers to methods for other larger matrices.

How could it not exist? Well, look at the page I just linked, and you''ll see that the inverse of a 2x2 is a matrix scaled by one over (ad - bc). Well, if (ad - bc) is zero, you have no inverse.



---- --- -- -
Blue programmer needs food badly. Blue programmer is about to die!
ok, i''ve tried the inverse matrix but for some reason the results are quite what i expected. i''m thinking maybe my expectations are the problem here. i''m trying to do hierarchial IK movement and i start with 2 normalized vectors that have a common origin. i get the cross product of those 2 vecs and use that as the y-axis of each matrix, and of course the vectors themselves are the z-axes of each resulting matrix. i get the inverse of the first matrix, then multiply the second by that inverse which should give me a relative rotation matrix right? i then want to multiply a 3rd matrix by this relative matrix. my real question is, does this have the effect of rotating the 3rd matrix around the y-axis of those other 2 matrices? and if not, how the heck do you do that?

This topic is closed to new replies.

Advertisement