# Matrix multiplication Q.

1. Jun 5, 2010

### i.l

Hey,

When trying to multiply the 2 attached matrixes (row X column) I get a much more terms then the attached answer.
C is for cos and s for sin.
What am I doing wrong?
Regards,
i.l

File size:
12.9 KB
Views:
93
2. Jun 5, 2010

### elibj123

You mean you don't have terms canceling out?

I suggest working carefully and invoking some trigonometric identities.

3. Jun 5, 2010

### Staff: Mentor

I get it that c stands for cosine and s stands for sine, but what does c1 mean? Cosine of what? Sine of what?

In one of your multiplications you have c1 in one matrix and c2 in the other, and you wrote the product as c12. What does that mean?

4. Jun 5, 2010

### Simon_Tyler

Simply typing it into Mathematica and using FullSimplify gets the results that you want. It is merely a combination of trig identities - namely the http://en.wikipedia.org/wiki/List_of_trigonometric_identities#Angle_sum_and_difference_identities".

The tricky bit is in the top 2*2 block - I suggest you look at the math for multiplying 2d rotation matrices.

$$A(\text{x\_})\text{:=}\left( \begin{array}{cccc} \cos (x) & -\sin (x) & 0 & a(x) \cos (x) \\ \sin (x) & \cos (x) & 0 & a(x) \sin (x) \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{array} \right)$$

$$A(x).A(y)=\left( \begin{array}{cccc} \cos (x+y) & -\sin (x+y) & 0 & a(x) \cos (x)+a(y) \cos (x+y) \\ \sin (x+y) & \cos (x+y) & 0 & a(x) \sin (x)+a(y) \sin (x+y) \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{array} \right)$$

Last edited by a moderator: Apr 25, 2017