If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Linear algebra

### Course: Linear algebra>Unit 2

Lesson 3: Transformations and matrix multiplication

# Matrix product associativity

Showing that matrix products are associative. Created by Sal Khan.

## Want to join the conversation?

• In the review, (I know this doesn't have to do with the example), if S: x -> y and T: y -> z shouldn't the composition be T(S(x)), rather than S(T(x))? Just clarifying.
• Yes, there is an error in the video.
If S: X -> Y and T: Y -> Z, this means that whatever you put into T has to be a member of the set Y.
S on the other hand returns a member of the set Y.
So you can put S(a), were a € X, into T:
T(S(a))
And another way to write this would be:
(T o S)(a)
Note that T o S is read from right to left. So first you apply the rightmost transformation on a, then whatever your output of S is, you put into T.
You could also think of "T o S" as "T after S".

You could of course also solve that problem by simply redefining the transformations S and T such that:
S: Y -> Z and T: X -> Y (Switching the sets of the transformations.)

Sal, please correct this error in the video. It's a bit confusing. :-)
You don't have to redo the video, just make a remark that:
T: X -> Y and S: Y -> Z.
• What if AB is undefined but BC is defined and the product of BC with A is also defined--wouldn't the parentheses matter then?
• Hey, I have a general question regarding associativity. So, as proven in the video, (AB)C=A(BC)=ABC. But does ABC and all its equivalents is equal to ACB or BCA? Thanks.
• Not necessarily. A(BC)=(AB)C is what "associative" means, but notice that we don't change the order there. Being able to switch order, AB=BA, is a different property called "commutativity", and matrix multiplication is not commutative.