hi in this uh section we're going to discuss um two fundamental ways that we can work with both matrices and vectors that is addition and scalar multiplication [Music] really all of our work with the three fundamental objects of linear algebra scalars vectors and matrices would be very limited if we were not also able to define some operations that we can use with them and there are three fundamental operations that we can sort of um uh define that we'll be using to work with um these the three fundamental objects these are addition scalar multiplication and matrix matrix or matrix vector or vector vector multiplication which are all sort of one class with addition we can take any two objects of the same size and type and add them together the way we do this is we simply add the corresponding elements we can take any object a vector a matrix or another scalar and multiply that by a scalar we can think of it as meaning very much the same thing as multiplication of scalars does the idea of multiplication really means to add an object to itself a certain number of times operationally we perform scalar multiplication simply by taking every element in the object and multiplying it by the same scalar number addition and scalar multiplication are quite straightforward matrix matrix matrix vector matrix mult vector of multiplication is a little bit more tricky we can define multiplication of vectors with vectors matrices with matrices but only according to specific rules um that we will outline in a in a subsequent video we're going to focus for the time being on addition and scalar multiplication addition of scalars is something that we all know how to do very easily it's one of the first things that you learn to do in terms of math we extend the idea of addition to vectors and matrices in a really straightforward way all we need to do is add the corresponding elements right what do we mean by that if we say that x plus y equals z it means that every element of z every z i is the sum of the corresponding elements of x and y right the vector 0 1 2 added to the vector negative 1 5 2 is the vector 1 minus 1 or 0 0 plus 5 or 5 and 2 plus 2 or 4. we just work with corresponding term elements adding matrices has exactly the same rule to add the matrix 3 negative 2 2 1 and the matrix negative 2 negative 2 4 7 we work with corresponding elements 3 minus 2 3 minus 2 is 1 for the 1 1 element of the of the sum negative 2 plus negative 2 is negative 4 for the 1 2 element in the second row we have two plus four for the first column or six and one plus seven or eight for the second row second column this definition the fact that what we need to do is add the corresponding elements leads to two important rules objects of different types can't be added we can't add a scalar to a a matrix they're not the same size they don't have corresponding elements we can't add a vector to a matrix they're not the same size and even if they are the same type we can't add them if they are not the same size a vector of two elements cannot be added to a vector of three elements a two by four matrix cannot be added to a three by three matrix um even if they have the same total number of elements so let's say a three by two matrix and a two by three matrix they're not the same size they don't have the same number of rows and columns they can't be added we wouldn't be able to add them using these rules because if we tried to there would be some elements that didn't correspond to one another that didn't have the same row or in the same column so this is the rule for how we perform addition of matrices and and vectors this is something that most students again tend to find fairly straightforward scalar multiplication is also pretty straightforward multiplication of scalars is really kind of the second main operation you learn in grade school after addition um and uh it can be related to addition through this idea of adding a num value to itself a certain number of times what is three times two is the same as two plus two plus two three times that definition we have to sort of use a little bit of license and extending that to non-integer values but the same idea sort of holds holds true basically we can extend this idea to vectors and scalars in exactly the same way um uh if we can add matrices and vectors uh then we can think about adding a vector to itself a certain number of times or adding a matrix to itself a certain number of times and this idea of scalar multiplication is executed in a very very simple way all we need to do is multiply every element in the matrix with a vector by the same scalar this kind of follows from the definition if we want to add a vector to itself a certain number of times we now we would add the corresponding values and each course each sort of element we would add to itself that same number of times multiply by that number so for vectors k multiplying by u if such a product equals v it means that every element of v is the same scalar multiple multiple of k by the element u ui so 7 times the vector 1 negative 2 4 is 7 times 1 7 7 times negative 2 negative 14 7 times 4 28. matrices follow exactly the same rule multiply every element by the same scalar half times the matrix three negative two two one is half times three or three halves half times negative two for the first row second column negative one for the second row first column half times two is one for the second row second column half times one is half again this is something that most people do not find too challenging because this is what we do the result of multiplying a vector by a scalar or a matrix by a scalar is a vector or matrix of exactly the same size multiplication by a scalar does not change the size of the object we are working with um once we have scalar multiplication and addition we can define the idea of a linear combination linear combinations are something that we are going to be revisiting throughout the class it's one of the core concepts in linear algebra so i'd like to introduce the idea now we will be coming back to this um again later in the class a linear combination of some set of vectors or matrices is simply a sum of scalar multiples of the set so we can take vectors or matrices and multiply them by a scalar add those results together um the the result is a so-called linear combination right some examples a times x plus b times y equals z z is a linear combination of the vectors x and y ax plus b y plus c z equals w w we got a little typo here w is a linear combination of x y and z for matrices exactly the same idea a times a plus b times b plus c times c plus d times d equals m means that m is a linear combination of a b c and d why do we call these a linear combination we'll look at the form that we're using we're taking a constant times a a variable if you will a constant times a vector this is the standard linear form that we talked about with a linear equation and we're taking sums of only linear terms we call it a linear combination in a more sort of abstract more sort of general definition we can say that if we take a sum over some set of m vectors and we multiply a constant by each of those vectors through scalar multiplication and add all of those terms up the result is a linear combination of the step we can apply the same rule to vectors or to matrices and have the same muscle because of how the rules of matrix addition works vector addition works and how scalar multiplication works we can only take linear combinations of a set of vectors or a set of matrices that are of exactly the same size it doesn't make sense to take linear combinations of objects that are not of the same type or the same size all right now that was all defined kind of purely in symbolic math um as we discussed in the uh previous video it sometimes can be very helpful to think about things geometrically so i want to briefly discuss how we can think about addition and scalar multiplication geometrically using spatial vectors right recall that we can uh that points in space especially two and three dimensional sort of space are vectors they're ordered sets and so we can think of vectors in this view of vectors as being points in space or as directed line segments and it's the latter that tends to be most useful in understanding these operations if we think of them this way we can explain addition and scalar multiplication geometrically scalar multiplication by a positive value takes a vector a spatial vector and changes its length without changing the direction in which it points scalar multiplication by a negative value completely reverses the direction that the spatial vector points and if it's not multiplication by negative one also changes the length vector addition follows a so-called parallelo rule that we will sort of discuss in a moment i'm doing sort of so-called head to tail addition again this will be more clear when we show the figure of this and vector subtraction is the same as adding a scalar multiple of negative one it can also be thought of as um connecting the directly connecting the points or doing sort of head-to-head connection of uh of vectors um all right so that was just a bunch of words let's sort of put some pictures associating this scalar multiplication by a positive value changes the length of the vector imagine that we start with a vector u represented by the point one three x equals one y equals three the directed line segment that goes from 0 to that point if we multiply that by 3 3u is the 0.39 multiply each element by the same scalar and that point x equals three y equals nine points in exactly the same direction the directed line segment uh uh maps perfectly onto this but it's three times longer and any scalar multiple by a positive number would lie on this sort of same sort of segment here if we mult by multiply by a negative number say for example negative a half again the rule is that we multiply both elements by the same scalar so negative 1 times negative half is 0.5 3 times negative half is negative 1.5 that's this point here it lies on the same line if i sort of drew a line through along this vector u but extending infinitely that's the little black line here we see the uh negative multiple also lie at least in that point but it's opposite from the origin and it's also because we multiplied by a number less than one in absolute value is shorter than the original vector half the length in this particular case so scalar multiplication really simply corresponds to a scaling this is where the term scalar comes from of the [Music] of the vector of the directed line segment representation of that vector what about addition well vector addition imagine that we start with a vector u the same one u 1 3 and another vector v negative 2 and one when we add them together we add the corresponding terms so one plus negative two is negative one three plus one is four the sum of these is the point one 4 which is here this vector lies at the corner of a parallelogram formed by the using u and v as two sides and then completing the parallelogram so from the end of v we extend a line perfectly parallel to and exactly the same length of u from the end of u we extend a line perfectly parallel to v and we end up with that corner point is the same we can think about this addition as then as kind of walking along first walking along the vector u and then starting from the point u rather than starting at the origin following the vector v until we get to this point right u plus v leads us to this point the order of addition doesn't matter if instead we first of all walked along v and then added u we would end up in the same point um this gives us sort of a geometric interpretation of what it means to add two vectors um we'll sometimes see subtraction of vectors it's worth thinking a little bit about what the geometry of of vector subtraction is if i have a vector u and again this same vector v what would u minus v be u minus v is u plus negative v um 1 minus negative 2 or 1 plus 2 is 3 for the first element 3 minus 1 or 2 for the second element that puts us over here u minus v is the point over here one way we can get to that point is by taking u and adding the line negative v right would take us to this point but another way of getting that same sort of line is to directly connect the heads of u and v and if we go from v to this point u we get the value u v you can sort of think about this in a little bit more sort of abstract terms if we first of all walk along v and then we walk along u minus v what are we doing we're adding u and subtracting v well we already added v so if we now add u and subtract v we ought to get back to u which is exactly what happens the difference uv is sort of the connection from v to u um v minus u has the same interpretation just in the different direction so v minus u also is the vector that connects the points uh u and v but starts at u moving to v we move along u and then add v and subtract u we get us back to v thinking about this in terms of a parallelogram if we take v and we then add to it negative u we get to this point here v minus u v minus u is negative two minus one negative three one minus three is negative two um this representation of vector subtraction is something that you might see a little bit less often but it does have this geometric representation the representation of scalar multiplication and vector addition is something that really is important to internalize it really can help uh in understanding what we're doing when we work with um these two operations with vectors all right so i'm going to sort of stop this video here there will be an accompanying video where we go through some work problems uh involving addition and scalar multiplication of vectors and matrices and a follow-up lecture where we're going to dig into the multiplication of matrices with other matrices and vectors thank you and goodbye