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.

Main content

Current time:0:00Total duration:16:30

in the last video we started with the transfer linear transformation s that was a mapping between the set X that was a subset of RN to the set Y and then we had another transformation that was a mapping from the set Y to the set Z we asked ourselves given these two linear transformations could we construct a linear transformation that goes all the way from X to Z and what we did is we made a definition we said well let's let's let's what let's create something called the composition of T with s and what that is is first you apply s to some vector and X to get some vector and Y and that's your vector right there and then you apply T to that to get to Z and so we defined it that way and our next question was was that a linear transformation we show that it was by it met the two requirements for them and because it is a linear transformation I left off in the last video saying that it should be able to be represented by some matrix vector product where this will have to be an L by n matrix because it's a mapping from an n dimensional space which was X it was a member of our it was a subset of RN to an L dimensional space because Z is a subset of our L now in this video let's try to actually construct this matrix so at the beginning of laughs of the last video I wrote told you that T of X could be written as some matrix product B times X let me write that let me write it rewrite it down here so I told you that the linear transformation T applied to some vector X could be written as the matrix vector product B times the vector X and since it was a mapping from a from a M dimensional space to an L dimensional space we know that this is going to be an L by M L by M matrix now similarly I told you that the transformation s can also be written as a matrix vector product where we could say maybe a is its matrix representation times the vector X and since this is a mapping from a Burress was a mapping from a n-dimensional space to an M dimensional space this will be an M by n matrix M by n matrix now by definition what was the composition of T of s T with s what is this by definition we said this is equal to you first apply the transform the linear transformation s to X and I'll arbitrarily switch colors so you first apply the transformation s to X and that essentially gets you into get to a vector right there right this is just a vector in RM or it's really a vector in Y which is subset of RM and then you apply the transformation T to that vector to get you into Z so then you apply T to that you apply T to that well given this we can use our matrix representations to replace this kind of transformation representation all the really the same thing what is the transformation of s applied to X well it's just this right here is just a times X that is just a times X where this is an M by n M by n matrix so we could say that this is equal to the transformation applied to a times X now what is the transformation of what is the T transformation applied to any vector X well that's the matrix B times your vector X so this thing right here is going to be equal to B times whatever I put in there so the the matrix B times the matrix a times the vector X right there this is what our composition transformation is are the composition of T with s applied to the vector X which takes us from the set X all the way to the set Z is this if we use the matrix forms of the two transformations now we know that we can you know at the end of last video I said I wanted to find a I wanted to find just some matrix that if I multiply it times vector that is equivalent to this transformation and I know that I can find this matrix I know that this is exist because this is a linear transformation so how can we do that well we just do what we've always done in the past we find we start with the identity matrix and we apply the transformation to every column of the identity matrix and then you end up with your matrix representation of the transformation itself so first of all how big is the identity matrix going to be well these guys that were inputting into our transformation they are subsets of X or they're members of X which are an n dimensional space it's a subset of RN so these let me write this X is a member of our n so all we do to figure out C is we apply so we start off with the identity matrix so let's see we start with the identity matrix the n-dimensional identity matrix because we're starting our domain is RN and of course we know what that looks like we draw a little straighter we have 1 0 all the way down it's going to be an N by n matrix and then 0 1 all the way down zeros these are zeros right here and then you have ones go all the way down the columns and everything else everything else is 0 we've seen this multiple times that's what your identity matrix looks like just ones down the column from the top left to the bottom right now to figure out C to figure out C the matrix representation of our transformation we all we do is we apply the transformation to each of these columns so we can write we can write that our matrix C is equal to it's going to take some space here the transformation applied to this first column but what is the transformation it is the matrix B it's the matrix B times the matrix a times whatever you're taking the transformation of in this case we're taking the transformation of that so we're taking the transformation of 1 0 0 all the way down there's much as 0s 1 followed by a bunch of zeros that's going to be our first column of C our second column of C is going to be B times a times the second column of our identity matrix and of course you remember these are each the standard basis vectors for RN so this is e 1 2 vector e 2 I could actually put a hat there because their unit vectors but you know that already so this is going to be times e 2 which is 0 1 0 all the way down bunch of zeros and then we're going to keep doing that until we do get to the last column which is B times a times a bunch of zeros all the way down and you get a 1 the nth term is just a 1 right there now what is this going to be equal to I mean it looks fairly complicated right now but all you have to do is make the realization and we've seen this multiple times that look if we write our vector a or we're at our matrix a is just a bunch of column vectors so this is a column vector a1 a2 all the way to a n right we already learned that this was an N by M matrix n by M matrix then what is the vector a times for example 1 well actually let me write it this way times x1 x2 all the way down to xn we've seen this multiple times this is equivalent to this is equivalent to x1 times a1 plus x2 times a2 all the way to plus X n times a n we've seen this multiple times it's a linear combination of these column vectors where the weighting factors are the terms and our vector that we're taking the product of so given that what is this guy going to reduce to this is going to be a 1 times this first entry right here times x1 plus a2 times the second entry plus a3 times the third entry but all of these other entries are 0 the X 2's all the way to the xn are 0 so it's only you're only going to end up with 1 times the first column here an a so this will reduce to let me write this so C will be equal to the first column is going to be B times now a times this this e 1 vector I guess we can call it the standard basis vector right there we already said it's just going to be 1 times the first column in a plus 0 times the second common a plus 0 times the third column and so on and so forth so it's just 1 times the first column in a so it's just a 1 that's simple now what is this one going to be equal to well it's going to be 0 times the first column in a 0 times the first column in a plus 1 times the second column in a plus 0 times the third common a and the rest are going to be 0 so it's just going to be 1 times the second column in a so this one second column in our transformation matrix it's just going to be B times a 2 and I think you get the idea here each of these the next one's going to be B times a 3 and all the way till you get B times a and all the way until you get B times a and and so that's how you would solve for your transformation matrix remember what we were trying to do we were trying to find some let me write out kind of summarize everything that we've done so far we had a mapping s that was a mapping from X to Y but X was a subset of RN Y was a subset of RM and so we said this transformation this linear transformation could be represented as some matrix a where a is a M by n matrix times a vector X then we I showed you another transformation let's call that well we already called it T which was a mapping from Y to Z Z is a subset of RL Z is a subset of RL and of course T the transformation T applied to some vector and X and sorry in Y can be represented as some matrix B times that vector times that vector I should have drawn parentheses there but you get the idea and this since it's a mapping from a subset of RM to RL this will be an L by M matrix and then we said look if we actually just take the definition of if we take the composition of T with s this reduced to of some vector in X this reduced to B so first we applied the S transformation so we multiplied the matrix a times X we multiply the matrix a times X and then we apply the T transformation to this so we just multiply B times that we've multiplied B times that now we know that this is a linear transformation which means it can be represented as a matrix vector product and we just figured out what the matrix vector product is so this thing is going to be equal to this is equivalent to switch colors C times X which is equal to which is equal to this thing right there which is equal to that thing right there which is equal to let me write it this way B be a 1 I'll try to be true to the colors be a 1 where a 1 is the first column vector in our matrix a and then the second column here is going to be B and then we have a 2 where this is the second column vector in a and then you could keep going all the way until you have B times a n a n right there at times X of course times X let me make it maybe make it purple times X like that now this is fair enough we can always do this we can if you give me some matrix remember this is an L by M matrix L by M matrix and you give me another matrix right here that is a M by n matrix M by n matrix I can always do this and how do I know I can always do that because how many entries are each of these each of these A's are going to have M entries right they're going to be they're going to be a 1 I say AI all of them are going to be members of RM so this is well-defined this has m columns this has m entries so each of these matrix vector products are well-defined now this is an interesting thing because I mean we were able to figure out the actual matrix representation of this composition transformation but let's let's extend it a little bit further wouldn't it be nice if this were the same thing as the matrices B times a wouldn't this be nice if this were the same things as the matrix B times I don't want to write problem you start B times a all of that times X all of that times X wouldn't it be nice if these were the same thing because then we could say that the composition of T with s of X is equal to the matrix representation of B times the matrix representation of s and you take the product of those two and then that will create a new matrix representation that you can which you could call C that you can then multiply times X so you won't have to do it you know individually every time or do it this way and I guess the the truth of the matter is there is nothing to stop us from defining this to be equal to B times a we have not defined what a matrix times a matrix is yet so we might as well this is good enough motivation for us to define it in this way so let's throw in this definition let us define let us define so if we have some matrix B and we could well I don't have to draw what it looks like but B is a B is a L by M matrix and then we have some other matrix a and I'll actually show what a looks like where these are its column vectors a1 a2 all the way to a n and then we are going to define the product so this is a definition this is a definition we're going to define the product ba as being equal to the matrix B times each of the column vectors of a so it's B e times a 1 that's going to be its first column this is going to be B times a 2 all the way to B times a n and you've seen this before in algebra 2 but the reason why I did when I went through kind of almost 2 videos to get to here is to show you the motivation for why matrices matrix matrix products are defined this way because it makes the notion of compositions of transformations kind of natural if you take the composition of one trend linear transformation with another the resulting transformation matrix is just the product as we've just defined it of their two transformation matrices now for those of you who you know might not have a lot of experience taking products of matrices and who think this is fairly abstract to look at in the next video I'll actually do a bunch of examples and show you that this definition is actually fairly straightforward