[MUSIC] So back at the start of the course, we encountered the apples and bananas problems. How to find the price of things when we only have the total bill. And we've looked at vectors so far. And now we're going to look at matrices. And these are objects that rotate and stretch vectors. But they're also objects that let us solve these sorts of problems. So let's go back to that apples and bananas problem. Say I walk into a shop and I buy two apples, and three bananas, and that that costs 8 euros. So I'm saying 2 apples, 3 bananas, cost 8 euros. Now say I go to the shop on another day and I buy 10 apples and 1 banana. And that that costs me, or the shopkeeper charges me 13 euros. And I want to discover what the price for 1 apple and 1 banana is, so I can decide which offers better value or even just predict my bill. Now you might say this is silly. What shop doesn't have sticker prices after all? But actually in business with complicated products and service agreements and higher purchase, this sort of thing, price discovery, happens all the time. Think about what happens when you buy a car for instance. Now these are just simultaneous equations, but I can write them down in another way. The way I would write this down with matrices would be as follows. So I'd write it down as this matrix, what I'm now calling a matrix, an object with numbers in 2 3 10 1. a b, = 8 13. And these things I call matrices. This is a 2 by 2 matrix. This is a 2 row by 1 column matrix. And this is another 2 row by 1 column matrix. And the instruction here is to multiply this out in the following way. So I would multiply the elements in the rows by the elements in the column. So I'd multiply 2 by a, plus 3 times b. So that row times that column, and I'd say that equaled the top row on the right-hand side. And I do the same for the next row, that row times that column is 10a plus 1b, is equal to the row on the bottom on the right-hand side. And that looks like my two simultaneous equations. But this is really handy, because these things, notice, look like vectors. So this matrix operates on this vector to give this other vector, and my question is, what vector transforms to give me this guy on the right? Now let's look at what happens if I multiply this matrix here by the unit basis vector, the x axis vector. Well when I do that multiplication, I'm going to get 2 times 1 plus 3 times 0. And I'm going to get 10 times 1 plus 1 times 0. So I get the vector 2 10. So what this does is it takes the little unit vector which we called e1 hat, and it transforms it to another place. Which is 2 10, which is going to be up here somewhere. So that's e1 hat, changed, and that's equal to 2 10. Now if I do that with the other basis vector. If I do 2 3 10 1 multiplied by 0 1. Then I'm going to get 2 times 0 times plus 3 times 1. 10 times 0 plus 1 times 1, I'm going to get 3 1. So the other basis vector, e2 hat, gets transformed over to 3 1, which is going to be over here somewhere. So that's e2 changed, I'm using the prime here to indicate changed, 3 1. So what this matrix does, is it moves the basis vectors in some way, it transforms them, it changes the space. So what this matrix 2 3 10 1 does is it's a function that operates on input vectors and gives us other output vectors. And a set of simultaneous equations here is asking, in effect, what vector I need in order to get a transformed product at the position 8 13. In order to get an output of 8 13. Now we can see what we mean now by the term linear algebra. Linear algebra is linear, because it just takes input values, our a and b, and multiplies them by constants. So everything is linear. And it's algebra, that is it's a notation describing mathematical objects and a system of manipulating those notations. So linear algebra is a mathematical system for manipulating vectors in the spaces described by vectors. So this is interesting. There seems to be some kind of deep connection between simultaneous equations, these things called matrices, and the vectors we were talking about last week. And it turns that the key to solving simultaneous equation problems is appreciating how vectors are transformed by matrices, which is the heart of linear algebra. >> [MUSIC]