Main content

## Using matrices to transform the plane

Current time:0:00Total duration:5:17

# Using matrices to transform the plane: Composing matrices

## Video transcript

- [Instructor] So what I have here is two different transformation matrices, and what we're going to
think about in this video is can we construct a new matrix that's based on the composition
of these transformations? Or a simpler way of saying that, a new transformation
that's based on applying one of these transformations first, and then the other one right after that. So first, let's just
review what's going on. If we have some random vector here, a, b, we know that we could view this as a times the one, zero vector, the unit vector in the x direction, plus b times the zero, one vector, the unit vector that goes
in the vertical direction. Now, if you were to apply
this transformational capital A here, it tells you instead of using
one, zero and zero, one, use these two columns instead. So if you were to apply
the transformation here, I guess we could call it a,
b prime, that is going to be, if you apply capital A
transformation matrix, it's going to be a times, not one, zero, you use zero, five instead. And then plus b times not zero, one, you use two, negative one instead. So that's just a little bit of review. But what we're gonna think
about in this video is, what would be the transformation
matrix for the composition? And I could write that as
B of A right over here. And you might recognize
this from function notation, where essentially it's saying you would apply the function A first, and then whatever the output of that is, you would then input that into B and you'd get the output of that. And that makes sense, because you can view
transformation matrices really as functions, functions that map points on the coordinate plane. So, in this situation, what would be the transformation matrix that is a composition of these two? Pause this video and think about that. All right, well, what would happen is, we would first transform any
point using these two vectors, the zero, five, the two, negative one, because that's the first
transformation we do. And then we would apply
this transformation to whatever the resulting vector is. Now, that seems pretty involved and we don't wanna write
it in terms of A or B's, we just wanna write it in terms
of a transformation matrix. So one way to think about it is, we can transform each of these vectors that you have in matrix A. Because remember, that
says, what do you turn the vectors one, zero and zero, one into? So if we transform zero,
five using the matrix B, and if we transform two,
negative one using the matrix B and we put them in their
respective columns, we should have the composition of this. So let me write it this way,
create a little bit of space. So let's say that the
composition B of A is equal to, I'll write a big two-by-two
matrix right over here. The first thing we can do is
apply transformation matrix B to the purple column right over here. And what is that going to tell us? Well, that's gonna be zero
times negative three, one. So let me write it that way. It's going to be zero
times negative three, one plus five times zero, four, zero, four. And this is going to give us a two by one vector right over here. So that you can view as filling up the first
column of this transformation, this composition, I guess you could say. And then let's think
about this second vector right over here, two, negative one. If you transform that using
B, what are you going to get? You're going to get two
times negative three, one. So right here, two times
negative three, one, plus negative one, or maybe
I just write it this way, minus one times zero, four. And this doesn't look
like a matrix just yet, but if you work through it,
it will become a matrix. For example, if I multiply, well, zero times all of
this is going to be zero, and then five times zero is going to be, let me just write it this way. This would turn into
five times zero is zero, five times four is 20. And then this matrix right over here is going to be two times
negative three, one, is going to be negative six, two, and then we have minus zero, four. And now if we wanted to write this clearly as a two-by-two matrix,
this would be equal to, and we get a little bit
of a drum roll here, the first column is zero, 20. And then the second column
is going to be, let's see, negative six minus zero
is still negative six and two minus four is negative two. And we're done. We have just created a
new transformation matrix. It's based on the composition B of A. So if you apply transformation
A first to any vector and then apply transformation
B to whatever you get there, that is equivalent to
just applying this one two-by-two transformation matrix, B of A.