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:15:09

let's say I have two transformations I have the transformation s which is a function or transformation from RN to R M and I also have the transformation T which is also a transformation from RN to RM I'm going to define right now what it means to add the two transformation so this is a definition let me write it as a definition I'm going to define the addition of our two transformation so if I add our two transformations the addition of two transformations operating on some vector X this is a definition I'm going to say that this is the same thing as the first transformation operating on the vector X plus the second transformation operating on the vector X and obviously this is going to end up being a vector in RM this is going to end up being a vector in RM so this whole thing is going to be a vector in RM so we still are so if we the by definition this S Plus T transformation is still a transformation because it takes an input from RN it's still a transformation from RN to R M now let me make another definition let me define I'll do it in green maybe I'll do it in purple I'm going to define a scalar multiple of a transformation so I'm going to define let's say C where C is just any real number C times the transformation s of some vector X I'm going to say that this is equal to C times the transformation of X this is equal to C times the transformation of X right there and so similarly this is also this is the transformation of X obviously is going to be an RM so if you multiply any vector in RM times some scalar you're still going to have another our M so lucky luckily for us this definition of a scalar multiple so if I have this new transformation called C times s this is still a mapping from RN to RM to RM this is still a vector in RM and this is still a vector in RN fair enough fair enough now let's see what happens if we look at their corresponding matrices for these transformations we've seen in a previous video that any linear transformation can be represented as a matrix vector product so let's say that s s of a vector X is equivalent to the matrix a times that vector X and let's say that T of X is equal to is equal to the matrix B times a vector X and of course since both of these guys are mapping our mappings from RN to RM both of these matrices are going to be M by n both of these are M by n matrices now let's just go back to these definitions that I just constructed what is s of T of X can that then be written as so let me write it this way I'll do it in that same color so you have s now I'm just going to do it in red do it in red so you have maybe I'll do it maybe I'll do it right here you have s plus T capital T s plus T of X I'm just rewriting this up here is equal to s of X plus T of X or the transformation T of X which we now know is equal to these two things so this is equal to this is equal to this term right there the transformation s of X is equal to ax that's that one right there and then the transformation T of X is equal to B the matrix B times X now what are these things now I can write let me write our two matrices in a firm form that you're probably familiar with right now let's say the matrix a is just a bunch of column vectors a1 a2 all the way to a n and similarly the matrix B is just a bunch of column vectors the matrix B is B 1 B 2 all the way to BN right these are each column vectors with M components one for each of the rows and there's n of these because there are n columns at each of these vectors so this when you multiply this guy times let me make it very clear if I multiply and X the vector X is going to look like this the vector X is going to be x1 x2 all the way down to xn and we've shown this multiple multiple times it's a very handy way of thinking about matrix vector products but we know that this product right here can be written as each of these scalar terms and x times it the corresponding column vector in a I've done this in is probably the fifth video that I'm doing this so this this can be rewritten as x1 x1 times a1 plus x2 times a times a2 all the way to X n times a n is equal to this that's what a X can be rewritten as as just a kind of a weighted combination of these column vectors where the weights are each of the values of our vector X and I have to add this guy to be X so BX by the same argument so plus it's just going to be let me do it in the blue is going to be X 1 times B 1 X 1 times B 1 plus X 2 times B 2 all the way to X n times X n times B n now what is this equal to well we can we know that scalar multiplication times vectors it exhibits the distributive property so we can just add these two guys right here and factor out the X 1 and what do we get we get this is equal to this whole expression right here let me draw a line here because I'm not saying that this matrix is equal to that I'm saying that this is equal this is equal to this term Plus this term which is equal to x1 so let me write it is equal to x1 times a1 plus b1 a1 plus b1 plus x2 times a2 right I'm just adding these two terms up x2 times a2 plus b2 all the way to plus all the way to plus X n times a n plus BN so what is this thing equal to well this is equal to some matrix that we you know some new matrix and let's define this new matrix this is equivalent to some new matrix I'll make it pretty big right here times x times our vector X under the vector X in green vector X we know is x1 x2 all the way down to xn but what is the new matrix going to be well this product is going to be each of these scalar terms times the column vectors of this matrix so these guys right here these guys right here are the columns of my matrix this thing is equivalent to a matrix where the first column right here is a1 plus b1 we're essentially adding the column vectors of those two guys the second column right here let me draw a little line right there to show you that these are different expressions the second one would be a2 plus b2 and then we'll just have a bunch of them and then the last one will just be a n plus BN so what happens is is that by definition when I added these two transformations I just use their corresponding matrices and I said you know what this addition of these two transformations created a new transformation created a new transformation that is essentially some matrix times my vector and that matrix ended up being the Sun ended up being the sum of the corresponding column vectors of our two original transformation matrices right this new matrix that I got just and we didn't you know I haven't defined matrix addition yet but we got here just by thinking about vector addition this matrix is constructed by adding the corresponding vectors of the matrix matrices a and B now why did I go through all of this trouble well I can make a new definition here that'll make everything fit together well I'm going to define I'll do it in a I'm going to define I'm going to define this matrix right here as a plus B so my new matrix definition if I have two matrices that I have the same dimensions and they have to have the same dimensions I'm defining a plus B to be equal to a new matrix some new matrix where you add up their corresponding columns so a1 plus b1 just like what I did here I don't have to rewrite it all the way up to a n plus BN is the last column and you've seen this before in your algebra 2 class but I wanted to here to do it because this shows you the motivation for it because now we can say that the sum of two transformations the sum of two transformations so S Plus T of X which is equal to s of X this is a vector s of X plus T of X which we know is equal to which is equal to a times X plus B times X we can now say is equal to because it's equal to some new matrix which we can now call a plus B times X right I just showed I mean this part is from depth from the definition of our transformations in the sum of our transformations that I defined earlier in this video and then we just work to this out and kind of expressed these products as products of or as weighted combinations of the column vectors of these guys we got to this new matrix and I defined this new matrix as a plus B and I did that because it has this neat property now because now the sum of two linear transformations operating on X is equivalent to when you think of it as a matrix vector product as the sum of their two matrices now let's do the same thing with scalar multiplication we know that we know that C time's our transformation of X by definition I'm saying is C times the transformation of X so C times whatever vector this is an RM and so we know that s of X can be this right here can be rewritten as ax so this is C times a times X and we know that ax can be rewritten as this is equal to C times the x1 times the first column vector in a so a1 plus x2 times a2 all the way to plus xn times a n and what is this this is a scalar multiple this is this is just going to be we can just distribute this C and then what do we get we get X and I'll just and multiplication is associative these are C is a scalar x1 is a scalar so we can switch them around if we want we know that scalar multiplication is distributive so we can write this as X 1 times C a1 plus X 2 times C a2 all the way to X n times C a n now what is this equal to this is equal to some new matrix times X this is equal to some new matrix let me make you that here times x1 x2 all the way to xn and what is that new matrix what are the columns of the new matrix well the columns are now that that all the way to that so the columns of this new matrix are ca1 ca2 all the way to CN now why did I go through this exercise well wouldn't it be nice I already said that I multiplied by definition a scalar times the transformation is equal to this is equal or a scalar multiple of a transformation is equal to the scalar times the transformation of of any vector that you kind of input into it and of course that is equal to C times ax now wouldn't it be nice if I could define this thing as some new matrix as some new matrix times a vector X right because this should also be a linear transformation and this new matrix I am going to define this is a definition again I'm going to define this new matrix as being C times a so now we have this definition that C times a if I take any scalar times any matrix a it's just equal to C times each of the column vectors and we know what happens when you take a scalar times each of let me write this is equal to C times a1 C times a2 I'm just rewriting what I just wrote there all the way to C times a n but what is this in effect we know that when you multiply C times a vector you multiply the scalar times each of the vectors elements so this is the equivalent of multiplying C times every entry up in this up in this matrix right here and why this video you're probably saying hey Sal you know I already knew how to you know when algebra 2 and 10th grade or ninth grade I already was exposed to multiplying a scalar times a matrix or adding two matrices with the same dimensions why did you go through all of this you know trouble of defining the sum of transformations and the sum of matrices and I went through the trouble because I wanted you to kind of understand that there's nothing I mean it is natural but there's there's nothing about the universe that said matrices had to be defined this way matrix matrix addition or matrix scalar multiplication or the addition of two transformations I wanted you to see that it's all kind of a weave mat the mathematical world has constructed it in this way because it seems to have nice properties that are useful and that's what I've done in this video in the next video I'll do a couple of scalar multiplications and matrix additions just to make sure that you you remember what you had learned in in your in the year nine through tenth grade algebra class but you'll find that the actual operations are almost trivially simple