[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:01.30,0:00:06.80,Default,,0000,0000,0000,,Let's learn about matrices. So, what is a, well, what I do I mean when I say matrices? Dialogue: 0,0:00:06.80,0:00:10.40,Default,,0000,0000,0000,,Well, matrices is just the plural for matrix. Dialogue: 0,0:00:10.40,0:00:15.70,Default,,0000,0000,0000,,Which is probably a word you're familiar with more because of Hollywood than because of mathematics. Dialogue: 0,0:00:15.70,0:00:20.90,Default,,0000,0000,0000,,So, what is a matrix? Well, it's actually a pretty simple idea. Dialogue: 0,0:00:20.90,0:00:24.50,Default,,0000,0000,0000,,It's just a table of numbers. That's all a matrix is. Dialogue: 0,0:00:24.50,0:00:27.80,Default,,0000,0000,0000,,So, let me draw a matrix for you. Dialogue: 0,0:00:27.80,0:00:30.30,Default,,0000,0000,0000,,I don't like that toothpaste colored blue, so, let me use another color. Dialogue: 0,0:00:30.30,0:00:37.60,Default,,0000,0000,0000,,This is an example of a matrix. If I said, I don't know I'm going to pick some random numbers; Dialogue: 0,0:00:37.60,0:00:46.00,Default,,0000,0000,0000,,Five, one, two, three, zero, minus five. That is a matrix. Dialogue: 0,0:00:46.00,0:00:51.50,Default,,0000,0000,0000,,And all it is is a table of numbers and, oftentimes if you want to have a variable for a matrix, you Dialogue: 0,0:00:51.50,0:00:54.60,Default,,0000,0000,0000,,use a capital letter. So, you could use a capital 'A'. Dialogue: 0,0:00:54.60,0:01:00.10,Default,,0000,0000,0000,,Sometimes in some books they make it extra bold. So it could be a bold 'A', would be a matrix. Dialogue: 0,0:01:00.10,0:01:04.50,Default,,0000,0000,0000,,And, just a little bit of notation, So, they would call this matrix. Or, we would call Dialogue: 0,0:01:04.50,0:01:10.10,Default,,0000,0000,0000,,this matrix, just by convention, you would call this a two by three matrix. Dialogue: 0,0:01:10.10,0:01:16.50,Default,,0000,0000,0000,,And, sometimes they actually write it '2 by 3' below the bold letter they use to represent the matrix Dialogue: 0,0:01:16.50,0:01:18.40,Default,,0000,0000,0000,,What is two? And, what is three? Dialogue: 0,0:01:18.40,0:01:23.20,Default,,0000,0000,0000,,Well, two is the number of rows. We have one row, two row. This is a row, this is a row. Dialogue: 0,0:01:23.20,0:01:26.30,Default,,0000,0000,0000,,We have three columns; one, two , three. Dialogue: 0,0:01:26.30,0:01:28.50,Default,,0000,0000,0000,,So, that's why it's called a two by three matrix. Dialogue: 0,0:01:28.50,0:01:34.20,Default,,0000,0000,0000,,When you say, you know, if I said, if I said that B, I'll put it extra bold. Dialogue: 0,0:01:34.20,0:01:42.68,Default,,0000,0000,0000,,If B is a five by two matrix, that means that B would have, I can, let me do one Dialogue: 0,0:01:42.68,0:01:46.89,Default,,0000,0000,0000,,I'll just type in numbers; zero, minus five, ten. Dialogue: 0,0:01:49.30,0:01:52.60,Default,,0000,0000,0000,,So, it has five rows, it has two columns. Dialogue: 0,0:01:52.60,0:01:56.00,Default,,0000,0000,0000,,We'll have another column here. So, let's see; minus ten, three, Dialogue: 0,0:01:56.00,0:02:04.10,Default,,0000,0000,0000,,I'm justing putting in random numbers here. Seven, two, pi. Dialogue: 0,0:02:04.10,0:02:07.00,Default,,0000,0000,0000,,That is a five by two matrix. Dialogue: 0,0:02:07.00,0:02:11.70,Default,,0000,0000,0000,,So, I think you'd now have a kind of a convention that all a matrix is is a Dialogue: 0,0:02:11.70,0:02:15.00,Default,,0000,0000,0000,,table of numbers. You can represent it when you're doing it in variable form Dialogue: 0,0:02:15.00,0:02:19.10,Default,,0000,0000,0000,,you represent it as bold face capital letter. Sometimes you'd write two by three there. Dialogue: 0,0:02:19.10,0:02:22.70,Default,,0000,0000,0000,,And, you can actually reference the terms of the matrix. Dialogue: 0,0:02:22.70,0:02:26.30,Default,,0000,0000,0000,,In this example, the top example, where we have matrix A. Dialogue: 0,0:02:26.30,0:02:32.60,Default,,0000,0000,0000,,If someone wanted to reference, let's say, this, this element of the matrix. Dialogue: 0,0:02:32.60,0:02:37.40,Default,,0000,0000,0000,,So, what is that? That is in the second row. It's in row two. Dialogue: 0,0:02:37.40,0:02:39.10,Default,,0000,0000,0000,,And, it's in column two. Right? Dialogue: 0,0:02:39.10,0:02:42.50,Default,,0000,0000,0000,,This is column one, this is column two. Row one, row two. Dialogue: 0,0:02:42.50,0:02:45.10,Default,,0000,0000,0000,,So, it's in the second row, second column. Dialogue: 0,0:02:45.10,0:02:51.90,Default,,0000,0000,0000,,So, sometimes people will write that A, then they'll write, you know Dialogue: 0,0:02:51.90,0:02:58.50,Default,,0000,0000,0000,,two comma two is equal to zero. Dialogue: 0,0:02:58.50,0:03:02.10,Default,,0000,0000,0000,,Or, they might write, sometimes they'll write a lowercase a, Dialogue: 0,0:03:02.10,0:03:07.10,Default,,0000,0000,0000,,two comma two is equal to zero. Dialogue: 0,0:03:07.10,0:03:11.70,Default,,0000,0000,0000,,Well, what is A? These are just the same thing. Dialogue: 0,0:03:11.70,0:03:14.20,Default,,0000,0000,0000,,I'm just doing this to expose you to the notation, because Dialogue: 0,0:03:14.20,0:03:16.10,Default,,0000,0000,0000,,a lot of this really is just notation. Dialogue: 0,0:03:16.10,0:03:21.80,Default,,0000,0000,0000,,So, what is a, one comma three? Dialogue: 0,0:03:21.80,0:03:24.60,Default,,0000,0000,0000,,Well, that means we're in the first row and the third column. Dialogue: 0,0:03:24.60,0:03:27.60,Default,,0000,0000,0000,,First row; one, two, three. It's this value right here. Dialogue: 0,0:03:27.60,0:03:29.20,Default,,0000,0000,0000,,So, that equals two. Dialogue: 0,0:03:29.20,0:03:32.10,Default,,0000,0000,0000,,So, this is just all notation of what a matrix is; Dialogue: 0,0:03:32.10,0:03:34.10,Default,,0000,0000,0000,,it's a table of numbers, it can be represented this way. Dialogue: 0,0:03:34.10,0:03:37.00,Default,,0000,0000,0000,,We can represent its different elements that way. Dialogue: 0,0:03:37.00,0:03:38.30,Default,,0000,0000,0000,,So, you might be asking Dialogue: 0,0:03:38.30,0:03:41.60,Default,,0000,0000,0000,,"Sal, well, that's nice, a table of numbers with fancy Dialogue: 0,0:03:41.60,0:03:44.20,Default,,0000,0000,0000,,words and fancy notations. But, what is it good for?" Dialogue: 0,0:03:44.21,0:03:46.10,Default,,0000,0000,0000,,And that's the interesting point. Dialogue: 0,0:03:46.10,0:03:51.60,Default,,0000,0000,0000,,A matrix is just a data representation. It's just a way of writing down data. Dialogue: 0,0:03:51.60,0:03:53.60,Default,,0000,0000,0000,,That's all it is. It's a table of numbers. Dialogue: 0,0:03:53.60,0:03:57.80,Default,,0000,0000,0000,,But, it can be used to represent a whole set of phenomenon. Dialogue: 0,0:03:57.80,0:04:01.50,Default,,0000,0000,0000,,And if you're doing this in you Algebra 1 or your Algebra 2 class Dialogue: 0,0:04:01.50,0:04:03.60,Default,,0000,0000,0000,,you're probably using it to represent linear equations. Dialogue: 0,0:04:03.60,0:04:07.85,Default,,0000,0000,0000,,But, we will learn, later, that it, and I'll do a whole set of videos Dialogue: 0,0:04:07.87,0:04:10.60,Default,,0000,0000,0000,,on applying matrices to a whole bunch of different things. Dialogue: 0,0:04:10.60,0:04:14.50,Default,,0000,0000,0000,,But, it can represent, it's very powerful and if you're doing Dialogue: 0,0:04:14.50,0:04:19.10,Default,,0000,0000,0000,,computer graphics, that matrixes...The elements can represent pixels on your screen, Dialogue: 0,0:04:19.10,0:04:21.40,Default,,0000,0000,0000,,they can represent points in coordinate space, Dialogue: 0,0:04:21.40,0:04:23.00,Default,,0000,0000,0000,,they can represent...Who knows! Dialogue: 0,0:04:23.00,0:04:24.90,Default,,0000,0000,0000,,There's tonnes of things that they can represent. Dialogue: 0,0:04:24.90,0:04:27.60,Default,,0000,0000,0000,,But, the important thing to realize is that a matrix Dialogue: 0,0:04:27.60,0:04:30.50,Default,,0000,0000,0000,,isn't, it's not a natural phenomenon. Dialogue: 0,0:04:30.50,0:04:34.70,Default,,0000,0000,0000,,It's not like a lot of the mathematical concepts we've been looking at. Dialogue: 0,0:04:34.70,0:04:37.70,Default,,0000,0000,0000,,It's a way to represent a mathematical concept. Dialogue: 0,0:04:37.70,0:04:40.40,Default,,0000,0000,0000,,Or, a way of representing values. But you kinda have to Dialogue: 0,0:04:40.40,0:04:43.00,Default,,0000,0000,0000,,define what it's representing. Dialogue: 0,0:04:43.00,0:04:44.70,Default,,0000,0000,0000,,But, lets put that on the back burner a little bit Dialogue: 0,0:04:44.70,0:04:48.30,Default,,0000,0000,0000,,in terms of what it actually represents. Dialogue: 0,0:04:48.30,0:04:52.20,Default,,0000,0000,0000,,And the, oh, my wife is here. She's looking for our filing cabinet. Dialogue: 0,0:04:52.20,0:04:54.50,Default,,0000,0000,0000,,But anyway, back to what I was doing. Dialogue: 0,0:04:54.50,0:04:57.10,Default,,0000,0000,0000,,So, so, lets put on the back burner what a matrix is Dialogue: 0,0:04:57.10,0:04:59.40,Default,,0000,0000,0000,,actually representing. Let's learn the conventions. Dialogue: 0,0:04:59.40,0:05:02.20,Default,,0000,0000,0000,,Because, I think, uhm, at least initially, that tends to be Dialogue: 0,0:05:02.20,0:05:04.02,Default,,0000,0000,0000,,the hardest part, How do you add matrices? Dialogue: 0,0:05:04.02,0:05:06.41,Default,,0000,0000,0000,,How do you multiple matrices? How do you invert a matrices? Dialogue: 0,0:05:06.41,0:05:09.07,Default,,0000,0000,0000,,How do you find the determinant of a matrix? Dialogue: 0,0:05:09.07,0:05:11.40,Default,,0000,0000,0000,,I know all of those words might sound unfamiliar. Unless, Dialogue: 0,0:05:11.40,0:05:13.70,Default,,0000,0000,0000,,you've already been confused by then in your algebra class. Dialogue: 0,0:05:13.70,0:05:15.90,Default,,0000,0000,0000,,So. I'm gonna teach you all of those things first. Dialogue: 0,0:05:15.90,0:05:18.40,Default,,0000,0000,0000,,Which are all really human-defined conventions. Dialogue: 0,0:05:18.40,0:05:22.70,Default,,0000,0000,0000,,And then, later on, I'll make a whole bunch of videos on the intuition behind them, Dialogue: 0,0:05:22.70,0:05:26.70,Default,,0000,0000,0000,,and what they actually represent. So, let's get started. Dialogue: 0,0:05:26.70,0:05:29.70,Default,,0000,0000,0000,,So, lets say I wanted to add these two matrices. Dialogue: 0,0:05:29.70,0:05:33.60,Default,,0000,0000,0000,,Let's say, the first one, let me switch colors. Let's say, Dialogue: 0,0:05:33.60,0:05:37.70,Default,,0000,0000,0000,,I'll do relatively small ones, just, not to waste space. Dialogue: 0,0:05:37.70,0:05:42.50,Default,,0000,0000,0000,,So, you have the matrix; three, negative one, I don't know, Dialogue: 0,0:05:42.50,0:05:49.10,Default,,0000,0000,0000,,two, zero. I don't know, let's call that A, capital A. Dialogue: 0,0:05:49.10,0:05:54.40,Default,,0000,0000,0000,,And let's say matrix B, and I'm just making up numbers. Dialogue: 0,0:05:54.40,0:06:06.30,Default,,0000,0000,0000,,Matrix B is equal to; minus seven, two, three, five. Dialogue: 0,0:06:06.30,0:06:14.00,Default,,0000,0000,0000,,So, my question to you is: What is A, Dialogue: 0,0:06:14.00,0:06:16.30,Default,,0000,0000,0000,,so I'm doing it bold like they do in the text books, plus Dialogue: 0,0:06:16.30,0:06:21.70,Default,,0000,0000,0000,,matrix B? So, I'm adding two matrices. And, once again Dialogue: 0,0:06:21.70,0:06:25.70,Default,,0000,0000,0000,,this is just human convention. Someone defined how matrices add. Dialogue: 0,0:06:25.70,0:06:27.50,Default,,0000,0000,0000,,They could've defined it some other way. But, they said; Dialogue: 0,0:06:27.50,0:06:29.85,Default,,0000,0000,0000,,we're gonna make matrices add the way I'm Dialogue: 0,0:06:29.85,0:06:32.50,Default,,0000,0000,0000,,about to show you because it's useful for a whole set of phenomenon. Dialogue: 0,0:06:32.50,0:06:35.00,Default,,0000,0000,0000,,So, when you add two matrices you essentially just add Dialogue: 0,0:06:35.00,0:06:40.00,Default,,0000,0000,0000,,the corresponding elements. So, how does that work? Dialogue: 0,0:06:40.00,0:06:43.00,Default,,0000,0000,0000,,Well, you add the element that's in row one column one with Dialogue: 0,0:06:43.00,0:06:46.10,Default,,0000,0000,0000,,the element that's in row one column one. Alright, so, it's Dialogue: 0,0:06:46.10,0:06:50.50,Default,,0000,0000,0000,,three plus minus seven. So, three plus minus seven. Dialogue: 0,0:06:50.50,0:06:55.00,Default,,0000,0000,0000,,That'll be the one-one element. Then, the row one column two element Dialogue: 0,0:06:55.00,0:06:58.61,Default,,0000,0000,0000,,will be minus one plus two. Dialogue: 0,0:06:58.61,0:07:01.70,Default,,0000,0000,0000,,Put parenthesis around them so you know that these are Dialogue: 0,0:07:01.70,0:07:05.40,Default,,0000,0000,0000,,separate elements. And, you could guess how this keeps going. Dialogue: 0,0:07:05.40,0:07:20.70,Default,,0000,0000,0000,,This element will be two plus three. This element, this last element will be zero plus five. Dialogue: 0,0:07:20.70,0:07:26.70,Default,,0000,0000,0000,,So, that equals what? Three plus minus seven, that is minus four. Dialogue: 0,0:07:26.70,0:07:32.00,Default,,0000,0000,0000,,Minus one plus two, that's one. Two plus three is five. And, Dialogue: 0,0:07:32.00,0:07:39.80,Default,,0000,0000,0000,,zero plus five is five. So, there we have it, that is how we humans have defined the addition of two matrices. Dialogue: 0,0:07:39.80,0:07:43.20,Default,,0000,0000,0000,,And, by this definition, you can imagine that this is going to be the same thing Dialogue: 0,0:07:43.20,0:07:49.10,Default,,0000,0000,0000,,as B plus A. Right? And remember, this is something we have to think about Dialogue: 0,0:07:49.10,0:07:53.00,Default,,0000,0000,0000,,because we're not adding numbers anymore. You know one plus two is the same as Dialogue: 0,0:07:53.00,0:07:56.70,Default,,0000,0000,0000,,two plus one. Or, any two normal numbers, it doesn't matter what order you Dialogue: 0,0:07:56.70,0:07:59.90,Default,,0000,0000,0000,,add them in. But matrices it's not completely obvious. But, when you define it in this way Dialogue: 0,0:07:59.90,0:08:03.70,Default,,0000,0000,0000,,it doesn't matter if we do A plus B or B plus A. Right? Dialogue: 0,0:08:03.70,0:08:06.60,Default,,0000,0000,0000,,If we did B plus A, this would just say negative seven plus three. Dialogue: 0,0:08:06.60,0:08:10.10,Default,,0000,0000,0000,,This would just say two plus negative one. But, it would come out to the same values. Dialogue: 0,0:08:10.10,0:08:11.90,Default,,0000,0000,0000,,That is matrix addition. Dialogue: 0,0:08:11.90,0:08:15.30,Default,,0000,0000,0000,,And, you can imagine, matrix subtraction, it's essentially the same thing. Dialogue: 0,0:08:15.30,0:08:21.59,Default,,0000,0000,0000,,We would...Well, actually let me show you. What would be A minus B? Dialogue: 0,0:08:27.04,0:08:32.30,Default,,0000,0000,0000,,Well, you can also view that, this is capital B, it's a matrix Dialogue: 0,0:08:32.30,0:08:34.80,Default,,0000,0000,0000,,that's why I'm making it extra bold. But, that's the same thing as; Dialogue: 0,0:08:34.80,0:08:42.80,Default,,0000,0000,0000,,A plus minus one, times B. What's B? Well, B is; Dialogue: 0,0:08:42.80,0:08:47.80,Default,,0000,0000,0000,,minus seven, two, three, five. And, when you multiply Dialogue: 0,0:08:47.80,0:08:50.40,Default,,0000,0000,0000,,a scalar, when you just multiply a number times the matrix, Dialogue: 0,0:08:50.40,0:08:52.70,Default,,0000,0000,0000,,you just multiply that number times every one of its elements. Dialogue: 0,0:08:52.70,0:08:58.40,Default,,0000,0000,0000,,So, that equals A, matrix A, plus the matrix, we just multiply Dialogue: 0,0:08:58.40,0:09:02.40,Default,,0000,0000,0000,,the negative one times every element in here. So, seven, Dialogue: 0,0:09:02.40,0:09:08.40,Default,,0000,0000,0000,,minus two, minus three, five. And then we can do Dialogue: 0,0:09:08.40,0:09:11.70,Default,,0000,0000,0000,,what we just did up there. We know what A is. So, Dialogue: 0,0:09:11.70,0:09:15.80,Default,,0000,0000,0000,,this would equal, let's see, A is up here. So, three plus Dialogue: 0,0:09:15.80,0:09:21.20,Default,,0000,0000,0000,,seven is ten, negative one, plus negative two is minus three, Dialogue: 0,0:09:21.20,0:09:28.90,Default,,0000,0000,0000,,two plus minus three is minus one and zero plus five is five. Dialogue: 0,0:09:28.90,0:09:31.60,Default,,0000,0000,0000,,And, you didn't have to go through this exercise right here. Dialogue: 0,0:09:31.60,0:09:33.80,Default,,0000,0000,0000,,You could have, literally, just subtracted these elements from these elements Dialogue: 0,0:09:33.80,0:09:35.20,Default,,0000,0000,0000,,and you would have gotten the same value. Dialogue: 0,0:09:35.20,0:09:38.50,Default,,0000,0000,0000,,I did this because I wanted to show you also that multiplying Dialogue: 0,0:09:38.50,0:09:41.30,Default,,0000,0000,0000,,a scalar times, or just a value or a number, times a matrix Dialogue: 0,0:09:41.30,0:09:46.60,Default,,0000,0000,0000,,is just multiplying that number times all of the elements of that matrix. Dialogue: 0,0:09:46.60,0:09:50.90,Default,,0000,0000,0000,,And, so what...By this definition of matrix addition what do we know? Dialogue: 0,0:09:50.90,0:09:54.20,Default,,0000,0000,0000,,Well, we know that both matrices have to be the same size, Dialogue: 0,0:09:54.20,0:09:58.70,Default,,0000,0000,0000,,by this definition of the way we're adding. So, for example Dialogue: 0,0:09:58.70,0:10:01.10,Default,,0000,0000,0000,,you could add these two matrices, You could add, I don't know, Dialogue: 0,0:10:01.10,0:10:08.50,Default,,0000,0000,0000,,one, two, three, four, five, six, seven, eight, nine to this matrix; Dialogue: 0,0:10:08.50,0:10:14.50,Default,,0000,0000,0000,,to, I don't know, minus ten, minus one hundred, minus one thousand. Dialogue: 0,0:10:14.50,0:10:20.10,Default,,0000,0000,0000,,I'm making up numbers. One, zero, zero, one ,zero, one. Dialogue: 0,0:10:20.10,0:10:21.80,Default,,0000,0000,0000,,You can add these two matrices. Right? Dialogue: 0,0:10:21.80,0:10:24.90,Default,,0000,0000,0000,,Because they have the same number of rows and the same number of columns. Dialogue: 0,0:10:24.90,0:10:30.40,Default,,0000,0000,0000,,So, for example, if you were to add them. The first term up here would be one plus minus ten, Dialogue: 0,0:10:30.40,0:10:34.40,Default,,0000,0000,0000,,so, it would be minus nine. Two plus minus one hundred, minus ninety-eight. Dialogue: 0,0:10:34.40,0:10:39.50,Default,,0000,0000,0000,,I think you get the point. You'd have exactly nine elements and you'd have three rows of three columns. Dialogue: 0,0:10:39.50,0:10:44.80,Default,,0000,0000,0000,,But, you could not add these two matrices. You could not add... Dialogue: 0,0:10:44.80,0:10:48.60,Default,,0000,0000,0000,,Let me do it in a different color, just to show it is different, Dialogue: 0,0:10:48.60,0:10:52.50,Default,,0000,0000,0000,,You could not add, this blue, you could not add this matrix; Dialogue: 0,0:10:52.50,0:11:03.40,Default,,0000,0000,0000,,minus three, two to the matrix; I don't know, nine, seven. Dialogue: 0,0:11:03.40,0:11:05.10,Default,,0000,0000,0000,,And why can you not add them? Dialogue: 0,0:11:05.10,0:11:07.70,Default,,0000,0000,0000,,Well, they don't have corresponding elements to add up. Dialogue: 0,0:11:07.70,0:11:11.60,Default,,0000,0000,0000,,This is a one row by two column, this is one by two Dialogue: 0,0:11:11.60,0:11:15.80,Default,,0000,0000,0000,,and this is two by one. So, they don't have the same dimensions Dialogue: 0,0:11:15.80,0:11:18.70,Default,,0000,0000,0000,,so we can't add or subtract these matrices. Dialogue: 0,0:11:18.70,0:11:22.30,Default,,0000,0000,0000,,And, just as a side note, when a matrix has...when one of its Dialogue: 0,0:11:22.30,0:11:26.80,Default,,0000,0000,0000,,dimensions is one. So, for example, here you have one row Dialogue: 0,0:11:26.80,0:11:30.20,Default,,0000,0000,0000,,and multiple columns. This is actually called a row vector. Dialogue: 0,0:11:30.20,0:11:32.50,Default,,0000,0000,0000,,A vector is essentially a one dimensional matrix, where one Dialogue: 0,0:11:32.50,0:11:35.70,Default,,0000,0000,0000,,of the dimensions is one. So, this is a row vector and similarly, Dialogue: 0,0:11:35.70,0:11:38.80,Default,,0000,0000,0000,,this is a column vector. That's just a little extra terminology Dialogue: 0,0:11:38.80,0:11:41.40,Default,,0000,0000,0000,,that you should know. Uhm, if you take linear algebra and calculus Dialogue: 0,0:11:41.40,0:11:44.20,Default,,0000,0000,0000,,your professor might use those terms and it's good to be Dialogue: 0,0:11:44.20,0:11:49.02,Default,,0000,0000,0000,,familiar with it. Anyway, I'm pushing eleven minutes, so I will continue this in the next video. See you soon.