# How to get around non-commutativity of matrix multiplication?

I have a problem with a matrix equation/transformation problem which I need solving.

I have two transformations $A_1$ and $A_2$, both of which can be expressed as $A_i = R_i \times B_i$, $R_i$ denoting rotation. I want to solve the equation $$R_{12}\times B_{12} = A_1 \times A_2^{-1}$$ for $R_{12}$ when $B_{12} = B_1 \times B_2^{-1} = R_1^{-1} \times A_1 \times A_2^{-1} \times R_2$.

The original transformations $A_1$ and $A_2$ are limited to rotation/scaling/translation. I could decompose the resulting transformation, but I'd prefer to avoid that since the solution isn't unique.

Is there a nice solution to this? It's been years and years since I last touched matrix algebra, so I don't remember all the nifty rules I was taught as an undergrad.

A numerical solution would be fine, but I'd prefer a analytical solution.

-

It sounds like you know $B_{12}$. Therefore, you should be able to invert it and multiply both sides on the right by its inverse.
Direct solution requires at least two of the three know for each $i$: $A_i$, $B_i$, $R_i$. – Emily Oct 19 '12 at 17:03