Confused about the Matrix multiplication

Hello, in week 3 the the instructor spoke about the matrix multiplication and how it’s visualized as two linear transformations. (2 matrices to mutliply)
I got the part of linear transformation where we applied the transformation for the first matrix, but when we wanted to do the second linear transformation why did we start from the last transformation?
And in the multiplication the order of matrices got changed, for instance instead of A * B it becomed B * A, I didn’t get that part of the video clearly.
(Execuse me for the bad grammer I’m a foreigner and I can’t speak english well)
Thanks in advance!

1 Like

Please give the video title and a time mark.

1 Like

Hello there,
Week 3 - Linear Transformations - Matrix multiplication starting from 2:40

1 Like

Hi @Mahmoud_Dello,

I have swapped the sides of 2:40 because it might give you a better view:

The “First” is the first matrix to multiply to the vector because it is closer to the vector. This is consistent with 2:04 that the “First” is the transformation which is being applied first. This is also consistent with the flow from 0:30 to 1:30 where the “First” is being done first.


The order of transformations has always been the “First” first, and the “Second” later. This has been the case in 2:40, in 2:04, and in the range from 0:30 to 1:30 - always the “First” first.

We can see this from the maths equation in above - to reproduce the “Combined” transformation, the maths requires us to multiply the “First” to the vector, and finish off by multiplying the “Second” to the product of the first.

This is to say, the “Combined” transformation can be decoupled into two intermediate transformations, namely the “First” and the “Second”, and we need to go through the intermediate ones one by one to get the effect of the “Combined”.


Thanks for your answer Raymond.
But in the part you wrote that we multiply the first matrix because it’s closer to the vector, I didn’t catch that part.

From what I understood when we multiply matrices, we go in the same order that we performed the linear transformation, for instance if we have A, B, and C matrices and we go through all transformations one by one;
first we got the linear transformation of A.
Then we moved to get the linear transformation of B from A product with the vector “basis”, then we do the same step to C again.
So the matrix multiplication should be on the form:

C * B * A
Did I got it right? or should i review the lesson again.
Thanks in adavance.

Hello @Mahmoud_Dello

If you say verbally you want to transform vector u by A first, B next, and finally C, then, in maths, we write it as CBAu.

When doing the maths, we do Au = v first, then we do Bv = w, and finally Cw = y.

To think backward of the above 3 equations, if we substitute the 2nd equation into the 3rd, we get C (Bv) = y, and if we further substitute the 1st equation, we get C (B (Au)) = y which is just CBAu = y which recovers what we want to do.


  1. A is closest to u because it is next to u
  2. I think you are saying the same thing as mine.


Thank you for your help, I really appreciate it.