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

# Compositions of linear transformations 1

## Video transcript

let's see if we can build a bit on some of our work with linear transformations let's say I have two linear transformations to have the transformation s that's a mapping or a function from the set X to the set Y and let's just say that X is a subset of me right here X is a subset of r-n and let's say that Y is a subset of our M of our M then we know if s is a linear transformation it can be represented by a matrix vector product so we can write s of X let me do it in the same color I was doing it before we can write that s of some vector X is equal to some matrix a times X and the matrix a it's going to be X whatever X we input into the function though we take the mapping of it's going to be in this set right here it's going to be a member of our n so this is going to be right here X's let me do it like this X is going to be a member of our n so it's actually going to be a member of X which is a subset of RN but I'm just trying to figure out what the dimensions of matrix a are going to be so this is going to have n components right here matrix a has to have n columns so matrix a is going to be let's just say it's an M by n matrix M by n fair enough now let's say we have another linear transformation so actually let me draw what I've said what I've done so far so we have some set X right here that is set X it is a subset of our n RN I could draw out there and we have this mapping S or this linear transformation from X to Y so it goes to a new set Y right here goes to a new set Y and Y is a member of RM so the mapping the mapping X right here the mapping X you take some element here and you apply the transformation s and I've told you linear transformation and you'll get to some value in set Y which is in RM and I said that the matrix representation of our linear transformation is going to be an M by n matrix right because you're going to start with something that has n entries or a vector that's a member of RN and you want to end up with a vector that's in RM fair enough now let's say I have another linear transformation T I have another linear transformation T and it's a mapping from the set Y to the set Z so let me draw so I have I have another set here called set Z and I can map from elements of Y so I could map from here into elements of Z using the linear transformation T so let's similar what I did before we know that Y is a member of RM we know that this is a subset not a member more of a subset of RM and I'm you know these are just arbitrary letters this could be 100 or 5 or whatever I'm just trying to stay abstract now let's say that Z is a member I'm running out of letters let's say Z is a member of our Z is a member of our L then what's the transformation T what's its matrix representation going to be and we know it's a linear transformation I told you that so we know it can be represented in this form so we could say that T of X where X is a member of RM or X is a member of RM is going to be equal to some matrix B times X and what are the dimensions of matrix B going to be X is going to be a member of RM so B is going to have to have M columns and then it's a mapping into a set that's a member of RL so it's going to map from members of RM to members of RL so it's going to be an L by M matrix right there now when you see this a very natural question might arise in your head can we construct some mapping that goes all the way that goes all the way from set X all the way to set P and maybe we will call that let me call that the composition of and maybe we can create that mapping using a combination of s and T so let's call let's just make up some word let's just call T with this little circle s let's just call this a mapping from X all the way to Z from X all the way to Z and we'll call this the composition the composition composition of T with s we're essentially just combining the two functions in order to try to create some mapping that takes us from T from set X all the way to set Z we still haven't defined it how can we actually construct this well a natural thing might be to first apply transformation s let's say that this is our X we're dealing with right here maybe the first thing we want to do is apply s and that will give us an S of X that'll give us this value right here that's in set Y and then what if we were to take that value and apply the transformation T to it so we would apply take this value and apply the transformation T to it to maybe get to this value so this would be the linear transformation T applied to this value this this member of our Y of of the set Y which is an RM so we're just going to apply that transformation to this guy right here which was the transformation s applied to X this might look fancy but all this is remember this is just a vector right here in the set Y which is a subset of RM this is a vector that's in X so when you apply a mapping you get another vector that's in Y and then you apply the mat the linear transformation T to that and then you get another vector that's in set Z so let's define the composition of T with s this is going to be a definition let's define the composition of T with s to be first we apply s to some vector in X so we apply s to some vector in X to get us here and then we apply T to that vector to get us to set Z to get us to set so we apply T to this thing right there now the first question might be is this even a linear transformation is the composition of two linear transformations even a linear transformation is it a linear transformation linear transformation well there are two requirements to be a linear transformation right the sum of the linear transformation of the sum of two vectors should be the linear transformation of each of them sum together so let's see what I know why I just say that verbally it probably doesn't make a lot of sense so let's just try to take the composition the composition of T with s of let's say the sum of two vectors in X so let's say I've taking the vectors X and the vector is y well by definition what is this equal to this is equal to this is equal to applying the linear transformation T to the linear transformation s applied to our two vectors X plus y and what is this equal to I told you at the beginning of the video that s is a linear transformation so by definition of a linear transformation one of our requirements we know that s of X plus y is the same thing as s of X plus s of Y because s is a linear transformation we know that that is true we know that we can replace this thing right there with that thing right there well we also know that T is a linear transformation which means that the transformation applied to the sum of two vectors is equal to the transformation of each of the vectors summed up so the transformation of s of X or the transformation applied to the transformation of s applied to X I know the terminology is getting confused plus T of s of Y this is we can do this because we know that T is a linear transformation but what is this right here this is equal to all this statement right here is equal to the composition of T with s applied to X plus the composition of T with s applied to Y so given that both T and s are linear transformations we got our first requirement that the composition of applied to the sum of two vectors is equal to the composition applied to each of the vectors summed up so that was our first requirement for a linear transformation and then our second one is we need to apply this to a scalar multiple of a vector in X so T of S or let me say this way the composition of T with s applied to some scalar multiple of some vector X that's in our set X this is a vector X that's our set X this should be a capital X this is equal to what well by our definition of our linear of our of our composition this is equal to the transformation T applied to the transformation s applied to C times our vector X and what is this equal to we know that this is a linear transformation so given that this is a linear transformation that s is a linear transformation we know that this can be rewritten as T times C times s applied to X this little replacing that I did with s applied to C times X is the same thing as C times the linear transformation applied to X this just comes out of the fact that s is a linear transformation we've done that multiple times well now we have T applied to some scalar multiple of some vector and so we can do the same thing we know that T is a linear transformation so we know that this is equal to I'll do it down here this is equal to C times T apply to s applied to some vector X that's in there and what is this equal to this is equal to the constant C times the composition T with s of our vector X right there so we've met our second requirement for linear transformation so the composition as we've defined it is definitely a linear transformation now that means that this thing right here can be written this means that the composition of T with s can be written as some matrix let me write it this way the composition of T with s applied to or the transformation of the which is the composition of T with s applied to some vector X can be written as some matrix times our vector X and what will be the dimensions of our matrix we're going from a n dimension space so this is going to have n columns to a l dimension space so this is going to have L rows so there's going to be an L by n matrix now I'll leave you there in this video because I realize I've been making too many 20 minute plus videos in the next video now that we know this is a linear transformation and that we know that we can represent it as a matrix vector product well actually figure out how to represent this matrix especially in relation to the two matrices that define our transformations s and T