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.

## Precalculus

### Course: Precalculus>Unit 7

Lesson 9: Transforming 3D and 4D vectors with matrices

# Composing 3x3 matrices

3X3 matrices can define transformations of the 3D space. In this worked example, we see how to find the matrix transformation that is the composition of two other matrices. Created by Sal Khan.

## Video transcript

- [Instructor] So we have two, three by three matrices here, matrix A and matrix B. And we can of course, view each of them as a transformation in three dimensional space. Now, what we're going to think about in this video is the composition of A of Bs. So you can think of this as the transformation where you apply B first, and then you apply A after that. And then we can represent that by another three by three matrix, which is partially completed here. We have the first and the third column here. And so my question to you is what is this middle column where I have these three blanks? Pause the video and try to work through that. All right, now let's work through this together. So one way to think about how to construct A of B is that what you're doing is you're taking each of the columns of B and you're thinking about what would they be under the transformation A. So if you were to apply the transformation A, to this column, right over here, you would get this column. If you apply the transformation A to this column, right over here, you would get this column. So what we really need to do is apply the transformation A to this column, to the middle column, right over here. And just as a reminder, how this transformation works. A vector zero to three, you can think of it as zero of the one zero, zero vector, the unit vector in the X direction. Plus two of the zero, one, zero vector plus three of the zero, zero one vector. Now, when you're applying transformation, instead of using these unit vectors, you use the image of them under this transformation. And now in this situation, instead of one zero, zero vector, we are going to be using this thing, instead of a zero one zero, we're going to be using this thing. Instead of a zero, zero one, we are going to be using this thing. So this middle column, when it's transformed by this vector is going to be zero, instead of the one zero, zero one, it's going to be zero of the negative three, negative three, three vector. And then we have plus two, plus two of the zero. Let me do that in that purple color of the zero, negative two, three vector. And then last but not least, you're going to have three of the plus three of then I'll do that in yellow, the zero negative for one vector. Now we just do the math. So when you play zero times, all of this, you're just gonna have a zero, zero, zero vector. So we can, those all go away. And then you are left with, let's see, this one is going to be two times zero is zero. Two times negative two is negative four, two times three is six. You're gonna have that, plus three times zero is zero, three times negative four is negative 12, three times one is three. I could have written this a little bit neater, but hopefully you get the idea. And then when we add those two things, zero plus zero, is zero. Negative four plus negative 12 is negative 16, six plus three is nine, and we're done. We have just completed the composition of A of B.