# Tranformation matrices

One of the concepts that I had to use constantly during my research, but never really manage to get my head around, was the concept of transformations represented as matrices. It was something I was not formally taught and ended up being forced to use and understand in a slow and painful way. And I finally managed to grasp it when I would least expect it: when I had to teach it to others! (This is one of the aspects that I really love about teaching btw.)

Even when I thought I understand the concept of transformation matrices, it was still hard to explain to students what is the difference between multiplication of a coordinate frame by a transformation from the left or from the right side. As you might remember from your algebra classes, matrix multiplication is not ‘commutative’, which means that A*B is not the same as B*A when A and B are matrices. But what is the physical interpretation when multiplying a coordinate frame with a transformation matrix from the left or from the right?

Since this year I will be teaching the course of robotics, I decided to invest a lot in making such concepts clear through animations. So, below you can see the difference between a ‘left’ and a ‘right’ multiplication of a coordinate frame by a rotation transformation. In both cases, we multiply with the same transformation (rotation around the ‘blue’ axis). Can you understand what is the difference?

Do you spot the difference? Maybe check another example of another coordinate frame and the same transformation applied from the left and from the right:

As you can see, when we multiply from the left, the coordinate frame is rotating around the blue axis of the static coordinate frame, while when we multiply from the right, the coordinate frame rotates around its own blue axis.

The same is true for translation transformations, as it can be seen on the examples below. This time, we multiply with a translation transfromation along the blue axis, once from the left and ones from the right:

Neat, eh?