WEBVTT mathematics/linear-algebra/hovasapian
00:00:00.000 --> 00:00:07.000
Welcome back to educator.com and welcome back to linear algebra, today we are going to talk about matrices.
00:00:07.000 --> 00:00:16.000
Matrices are the work horses of linear algebra, essentially everything that we do with linear algebra of a computational nature.
00:00:16.000 --> 00:00:22.000
Well we are not necessarily discussing; the theory is going to somehow use matrices.
00:00:22.000 --> 00:00:27.000
You have dealt with matrices before; you have seen them a little bit in algebra-2 if I am not mistaken.
00:00:27.000 --> 00:00:31.000
You have added, you have subtracted, you have maybe multiplied matrices.
00:00:31.000 --> 00:00:41.000
Today we are going to talk about them generally talk about some of their properties, we are going to go over addition, we are going to go over scalar multiplication, things like that, the transpose of a matrix.
00:00:41.000 --> 00:00:50.000
Having said that, let's just jump right in and familiarize ourselves with what these things are and how they operate.
00:00:50.000 --> 00:01:07.000
The definition matrix is just a rectangular array of MN entries, arranged in M rows and N columns, so for example if I had three rows and two column matrix, the number of entries in that matrix is 3 times (2,6), because they are arranged in a rectangular fashion.
00:01:07.000 --> 00:01:09.000
That's all this MN means.
00:01:09.000 --> 00:01:28.000
Let's, most matrices will be designated by a capital letter and it will look something like this, it will be symbolized most generally A11, A12... A1N.
00:01:28.000 --> 00:01:43.000
Notice this is very similar to the arrangement that we had for the linear systems and of ‘course there is a way in subsequent lesson to represent the linear system by a matrix, and we will see what that is.
00:01:43.000 --> 00:02:02.000
A21, excuse me, A22... A2N and will go down, will go down, this will be AM1, AM2... AMN.
00:02:02.000 --> 00:02:13.000
The top-left entry is A11, bottom-right entry is AMN, this is an M by N matrix.
00:02:13.000 --> 00:02:29.000
This M is the rows, sorry, rows always come first, this is the row and N is a column, so M rows, N columns...
00:02:29.000 --> 00:02:43.000
...Which is why this first subscript here is an M and this second subscript here is an N, okay.
00:02:43.000 --> 00:02:55.000
Basic examples of something like 1, 5, 6, 7, oh, a little thing about notation and matrices.
00:02:55.000 --> 00:03:10.000
You are going to see matrices represent a couple of ways, you are going to see it with these little square brackets, you are going to see it the way that I just did it, which is just 1,5,6,7 with parenthesis like that.
00:03:10.000 --> 00:03:19.000
And sometimes in this particular course, probably not in your book, but in this particular course, often time when I write a matrix, I'll arrange it in a rectangular fashion,
00:03:19.000 --> 00:03:26.000
And it will be clear that it's a matrix, because we will be discussing and talking about it as a matrix, but I often will not put the little parenthesis around it.
00:03:26.000 --> 00:03:32.000
Don't let that throw you, there is no law that it says, a notation has to be this way or that way, these are just convention.
00:03:32.000 --> 00:03:38.000
As long as we know what we are talking about, the notation for that is actually kind of irrelevant, okay.
00:03:38.000 --> 00:03:53.000
This is a 2 by 2 matrix, there are two rows, two columns, you might have something like 3, 4, 7, 0, 6, 8.
00:03:53.000 --> 00:04:00.000
This is going to be three rows, two columns, so this is a 3 by 2 matrix.
00:04:00.000 --> 00:04:04.000
You might have something like this, which is a 1 by 1 matrix.
00:04:04.000 --> 00:04:13.000
1 by 1 matrix is just a number, which is actually an interesting notion, because those of you go on to...
00:04:13.000 --> 00:04:18.000
We go on to study some higher mathematics, perhaps even complex analysis.
00:04:18.000 --> 00:04:24.000
As it turns out numbers an matrices share many properties, we are actually going to be talking about a fair number of those properties.
00:04:24.000 --> 00:04:34.000
The idea of thinking is a number as a 1 by 1 matrix, or the idea of thinking is a, of a square matrix as some kind of a generalized number.
00:04:34.000 --> 00:04:38.000
Its actually good way to think about it, so...
00:04:38.000 --> 00:04:45.000
...Not really going to, not really something that we are going to deal, but it's something to think about, you know may be in the back of your mind if you are wondering.
00:04:45.000 --> 00:04:55.000
Well you know they seem to behave kind of similarly, well there is a reason they behave similarly, because numbers and matrices, their underlying structure which we are going to examine later on is actually the same.
00:04:55.000 --> 00:05:04.000
Okay, so we speak about the Ith row in the Jth column, so let me do this in blue.
00:05:04.000 --> 00:05:16.000
We talk about the Ith row, we talk about the Jth column, so remember the I, J, this was the notation.
00:05:16.000 --> 00:05:32.000
This were first to the row, this were first to the column, so if you have something like A (5, 7), we are talking about the entry that's in the fifth row and the seventh column, go down 5, go over seven and that's your entry.
00:05:32.000 --> 00:05:39.000
Okay, the third, well let's actually do this specific example here.
00:05:39.000 --> 00:05:57.000
Let's say we have a matrix A, which is (1, 2, 3, 4, 7, 9, 10, 4, 6, 5, 9, 6, 0,0, 1, 8) and they can be negative numbers too.
00:05:57.000 --> 00:06:03.000
I just happen to have picked all positive numbers here, so we might talk about the third row, that's going to be this thing.
00:06:03.000 --> 00:06:14.000
you have (6, 5, 9, 6), you might talk about the second column, the second column is going to be that (2, 9, 5, 0)
00:06:14.000 --> 00:06:34.000
A 1 by N matrix, or N, M by 1 matrix.
00:06:34.000 --> 00:06:41.000
Okay, so just single columns or single rows, you can arrange them anyway you like, so 1 by N would be something like this, if I took, let's say the fourth row, I would have 0, oops, lines showing up.
00:06:41.000 --> 00:06:56.000
We don't want that, now let's do it over here, so if I take (0, 0, 1, 8), this is 1 by N.
00:06:56.000 --> 00:07:08.000
In this particular case 1 by 4, or if I take let’s say (4, 4, 6, 8)...
00:07:08.000 --> 00:07:18.000
... This is a ( 1, 2, 3, 4, 4, 5, 1), in general it's not really going to make much of a difference, because we are going to give the special names, they are called vectors.
00:07:18.000 --> 00:07:26.000
And this particular case it's called a four vector, because there are four entries in it, it might have a seven vector which has seven entries in it.
00:07:26.000 --> 00:07:35.000
In general it really doesn't matter what the right vector as columns or rows as long as there is a degrees of consistency, when you are doing your mathematical manipulation.
00:07:35.000 --> 00:07:43.000
Sometimes it's better to write them as columns or rows, because it helps to understand what's going on, especially when we talk about matrix multiplication.
00:07:43.000 --> 00:07:50.000
But in general both this and this are considered four vectors, so...
00:07:50.000 --> 00:08:15.000
... Okay, Let's see here, if M = N, if M = N, if the number of rows equals the number of columns, we call it a square matrix....
00:08:15.000 --> 00:08:20.000
... Call it a square matrix...
00:08:20.000 --> 00:08:30.000
... Something like K = let's say (3, 4, 7, 10)...
00:08:30.000 --> 00:08:47.000
... (11, 14, 8, 1, 0, 5, 6, 7, 7, 6, 5, 0), so this is four this way, four this way.
00:08:47.000 --> 00:09:03.000
This is a 4 by 4 matrix, it is a square matrix, these entries, the ones that go from the A11, A22, A33, A44, the ones that have A...
00:09:03.000 --> 00:09:09.000
... I < font size="-6" > j < /font > , where I = J, those entries are called entries on the main diagonal.
00:09:09.000 --> 00:09:27.000
This is called, to this in red, this is the main diagonal from top-left to bottom-right, so the entries on a main diagonal on this square matrix are (3, 14, 6, and 0) and again notice I haven't put the parenthesis around them, simply for because it's just my own personal notational taste.
00:09:27.000 --> 00:09:40.000
You have a square matrix; you have entries along the main diagonal, well a diagonal matrix...
00:09:40.000 --> 00:09:45.000
... Matrix...
00:09:45.000 --> 00:09:52.000
... Is one where every entry...
00:09:52.000 --> 00:10:02.000
... Alter the main diagonal...
00:10:02.000 --> 00:10:23.000
...Is 0, so something like, I have A, I have (3, 0, 0, 0, 4, 0, 0, 0, 7), so notice I have entries along the main diagonal, 3, 4 and 7, but every other entry is 0.
00:10:23.000 --> 00:10:25.000
This is called a diagonal matrix.
00:10:25.000 --> 00:10:34.000
Diagonal matrix is a square matrix, where all the, the main diagonal is represented, good.
00:10:34.000 --> 00:10:52.000
Okay, so let's start talking about some operations with matrices, let me go back to blue here, the first thing we are going to talk about is matrix addition....
00:10:52.000 --> 00:11:01.000
... addition, so let's start with a definition here, try to be as mathematically precise as possible.
00:11:01.000 --> 00:11:27.000
If A = matrix entry IJ and the symbol here, when we put brackets, just one symbol with IJ, this represents the matrix of all the entries, I < font size="-6" > j < /font > and if B is equal to the matrix B, J...
00:11:27.000 --> 00:11:49.000
... Are both M by N, then A + B is the M by N matrix, C...
00:11:49.000 --> 00:12:05.000
... C < font size="-6" > i < /font > J, where C < font size="-6" > i < /font > J - A < font size="-6" > i < /font > J = B < font size="-6" > i < /font > J, okay.
00:12:05.000 --> 00:12:13.000
That is...
00:12:13.000 --> 00:12:30.000
...We get C by adding, by adding corresponding entries....
00:12:30.000 --> 00:12:33.000
... Of A and B.
00:12:33.000 --> 00:12:41.000
That's al that means, a big part of linear algebra and a lot of the lessons, the subsequent lessons they are going to start with definitions.
00:12:41.000 --> 00:12:51.000
In mathematics the definitions are very important, they are the things that we start form, and often times there is a lot of, there is a lot of formalism to these definitions.
00:12:51.000 --> 00:13:06.000
When we give the definition, when we give them for the sake of being mathematically precise, and of ‘course we do our best to explain it subsequently, so often times the definitions will look a lot more complicated than they really are, simply because we need to be as precise as possible.
00:13:06.000 --> 00:13:11.000
And we need to express that precision symbolically, so that's all it's going on here.
00:13:11.000 --> 00:13:21.000
All the words essentially saying with this definition is if I have a 3 by 3 matrix, and I have another 3 by 3 matrix, and I want to add the matrices, well all I do is add the corresponding entries.
00:13:21.000 --> 00:13:29.000
First entry, first entry, second entry, second entry, then all the way down the line, and then I have at the end a 3 by 3 matrix.
00:13:29.000 --> 00:13:52.000
Let's just do some example, so I think it will make sense, A = (1, - 2, 4, 2, -1, ) so this is a 2 by 3 matrix, and let's say B is also a 2 by 3 matrix ( 0, 2, -4, 1, 3, 1).
00:13:52.000 --> 00:14:01.000
Notice in the definition both A and B are M by N and are our final matrix is also M by N.
00:14:01.000 --> 00:14:12.000
They have to be the same in order to be able to add them, in other words if I have a 3 by 2 matrix and if I have a 2 by 3 matrix that I want to add it to, I can't do that.
00:14:12.000 --> 00:14:25.000
It's, the addition is not defined because Indeed corresponding entries, I need (3,2) matrix, 3 by 2 matrix added to a 3 by 2 matrix, 5 by 7 matrix added to a 5 by 7 matrix.
00:14:25.000 --> 00:14:38.000
Addition actually needs to be defined, so they have to be the same size, both row and column for addition to actually work, so in this case we have a 3 by 2, so A + B...
00:14:38.000 --> 00:14:55.000
... I just add corresponding entries 1 + 0 is 1, -2 + 2 is 0, 4 -4 = 0, 2 + 1 is 3, -1 + 3 is 2, 3 + 1 is 4, and now I have my A + B matrix.
00:14:55.000 --> 00:15:02.000
Just add corresponding entries, nice and easy, basic arithmetic.
00:15:02.000 --> 00:15:12.000
Okay, now let's talk about something called scalar multiplication.
00:15:12.000 --> 00:15:22.000
Many of you have heard the word scalar before, if you haven't, it's just a fancy word for number, real number specifically.
00:15:22.000 --> 00:15:35.000
Okay, so let's, let A = the matrix A < font size="-6" > ij < /font > again with that symbol.
00:15:35.000 --> 00:15:47.000
Well let A be M by N and will, and R a real number.
00:15:47.000 --> 00:15:53.000
We have a matrix A and we have R which is a real number.
00:15:53.000 --> 00:16:01.000
Then...
00:16:01.000 --> 00:16:20.000
... The scalar multiple of A by R, which is symbolized RA, R times A is the, again M by N matrix....
00:16:20.000 --> 00:16:29.000
... B, BA < font size="-6" > ij < /font > , such that...
00:16:29.000 --> 00:16:36.000
... The IJth entry of the B matrix equals R times BA < font size="-6" > ij < /font > .
00:16:36.000 --> 00:16:46.000
In other words all we are doing is we are taking a matrix and if I multiply by the number 5, I multiply every entry in the matrix by 5.
00:16:46.000 --> 00:17:06.000
Let's say if R = -2, and A is the matrix, (4, -3, 2, 5, 2, 0, 3, -6, 2).
00:17:06.000 --> 00:17:18.000
Let's go ahead and put those, then RA is equal to -2 times each entry, -2 times 4, we get -8.
00:17:18.000 --> 00:17:34.000
-2 times -3 is 6, -2 times 2 is -4, -2 times 5 is -10, -2 times 2 is -4, -2 times 0 is 0, -2 times 3 is -6.
00:17:34.000 --> 00:17:45.000
-2 times -6 is 12, -2 times 2 is -2, this is our final matrix.
00:17:45.000 --> 00:18:01.000
Now okay, now let's talk about something called the transpose of a matrix, okay....
00:18:01.000 --> 00:18:15.000
... It's going to be a very important notion, it's going to come up a lot in linear algebra, so let's go ahead, transpose of a matrix.
00:18:15.000 --> 00:18:29.000
Let's start with a definition, if A = the A's by J, is M by N.
00:18:29.000 --> 00:18:52.000
Then the N by M, notice I switch those, the N by M matrix, A will go little T on top, which stands for transpose, equals A < font size="-6" > j < /font > < font size="-6" > i < /font > .
00:18:52.000 --> 00:18:58.000
Well actually I mean....
00:18:58.000 --> 00:19:07.000
... TIJ, where, I will write it down here.
00:19:07.000 --> 00:19:17.000
A < font size="-6" > IJ < /font > , the IJth entry of the transpose matrix is equal to AJI.
00:19:17.000 --> 00:19:37.000
Okay, so if A is, this is an M by N matrix, then the N by M matrix, A transpose is this thing where the entry is equal to the A < font size="-6" > IJ < /font > th entry = A < font size="-6" > JI < /font > , where the indices have been reversed.
00:19:37.000 --> 00:19:49.000
This is called the transpose of A, in other words what we are doing here is we are just exchanging rows for columns, so the first row of A becomes the first column of A transpose.
00:19:49.000 --> 00:19:55.000
The third row of A becomes the third column of A transpose, and its best way to think about it.
00:19:55.000 --> 00:20:02.000
Pick a row and then write it as a column, then move to the next one, pick the next row, write it as the next column.
00:20:02.000 --> 00:20:11.000
That's all you are doing, you are literally just switching, you are flipping the matrix, so let's do some examples.
00:20:11.000 --> 00:20:34.000
If A = (4, -2, 3, 0, 5, 2), well A transpose, so again we are writing the rows now as columns, so I take (4, -2, 3) and I write it as a column, (4, -2, #), and I take the next one (0, %, 2), (0, 5, 2).
00:20:34.000 --> 00:20:41.000
Now what was a 2 by 3 has become a 3 by 2.
00:20:41.000 --> 00:21:08.000
Definition, M by N becomes N by M, that's all you are doing with the transpose is you are flipping it in some sense, so another example, let's say you have a square matrix, so (6, 2, -4) and (3, -1, 2), (0, 4, 3).
00:21:08.000 --> 00:21:22.000
Well, the transpose is going to be (6, 2, -4) written as a column, (3, -1, 2), written as a column, and (0, 4, 3) written as a column.
00:21:22.000 --> 00:21:32.000
All of them here is of literally flipped it along the main diagonal as if this main diagonal were a mirror image, I have moved the 3 here, the 2 here.
00:21:32.000 --> 00:21:41.000
See that 3 is now here, the 2 is here, 0 and up to there, the -4 moved down here, this 4 moved there, the 2 moved there.
00:21:41.000 --> 00:21:53.000
That's all we were doing with the square matrix, but again all you are doing is taking the rows, writing in this columns and do it one by one systematically and you will always get the transpose that you will need.
00:21:53.000 --> 00:22:12.000
Okay, let's see, let's do one more for the transpose, so C = let's say (5, 4, -3, 2, 2, -3),
00:22:12.000 --> 00:22:19.000
This is a 3 by 2 so I know that my C transpose is going to have to be a 2 by 3.
00:22:19.000 --> 00:22:36.000
Take a row, write it as a column (5, 4), take the next row write it as a column, (-3, 2) next row (2, -3), write it as a column starting from top to bottom and you get you C transpose.
00:22:36.000 --> 00:22:42.000
Again all you have done is flip this.
00:22:42.000 --> 00:22:55.000
If we write a 1 by, let's say 3, so let's say we have (3, 5, -1), this is technically a, it is a 1 by 3 matrix, so 1 by 3.
00:22:55.000 --> 00:22:59.000
When we take T transpose, it is going to be a 3 by 1.
00:22:59.000 --> 00:23:06.000
3 by 1 and it's going to be, well (3, 5, 1), it's going to be that thing written as a column.
00:23:06.000 --> 00:23:11.000
But again these once where there are single rows or single columns, we generally call them vectors.
00:23:11.000 --> 00:23:21.000
We will talk more about that specifically more formally in a subsequent lesson, okay so let's recap what we have done here.
00:23:21.000 --> 00:23:29.000
We have a regular matrix, so we are talking about matrix here, regular matrix, let me use red.
00:23:29.000 --> 00:23:45.000
It's just and M by N matrix of M rows and N columns, so let's say we have (1, 6, 7, 3, 2, 1) this is two rows and three columns, this is a 2 by 3.
00:23:45.000 --> 00:24:09.000
A square matrix is N by N that means the number of rows equals the number of columns, so an example might be (1, 6, , 2), two rows, two columns, square matrices are very important, will play a major role throughout or particularly in the latter part of the course when we talk about Eigen values and Eigen vectors.
00:24:09.000 --> 00:24:23.000
A diagonal is a square matrix where all of the entries often mean diagonal or 0, so let's do a 3 by 3 diagonal matrix, so let's take 1, let's take 2, let's take 3, let's just put it along the main diagonal.
00:24:23.000 --> 00:24:31.000
Erase these random, and we put 0's in everywhere else, 0.
00:24:31.000 --> 00:24:39.000
This is a diagonal matrix, entries along the main diagonal, 0's everywhere else, okay.
00:24:39.000 --> 00:24:48.000
Okay, we did something called a matrix addition where the addition of corresponding entries in two or more M by N matrices of the same dimensions.
00:24:48.000 --> 00:24:57.000
Okay, so they have to be the same dimension in order for matrix addition to be defined, if you are going to take a 5 by 7, you have to add it to a 5 by 7.
00:24:57.000 --> 00:25:04.000
You can't add a 5 by 7 matrix to a 2 by 3 matrix, it's not defined because you have to add corresponding entries.
00:25:04.000 --> 00:25:19.000
Scalar multiplication, it's a multiplication of each entry of an M by N matrix, oops, erase these random lines again, so the multiplication of each entry of M by N matrix by a non-zero constant.
00:25:19.000 --> 00:25:29.000
If I have a matrix, could be 3 by 6 and I multiply by 5, I multiply every entry in that matrix by the 5.
00:25:29.000 --> 00:25:41.000
the transpose is where you are exchanging the rows and columns of an M by matrix, thus creating N by M, so if I start with a 6 by 3, I transpose it, I get a 3 by 6.
00:25:41.000 --> 00:25:55.000
If I start with a 4 by 4 and I transpose it, it's still a 4 by 4, but it's different matrix, because the entries have switched places, okay.
00:25:55.000 --> 00:26:10.000
Let's go ahead and finish off with one more example of everything that we have discussed, so let's start off with matrix A, let's go ahead and define that as (3, 1, 2) (2, 4, 1).
00:26:10.000 --> 00:26:29.000
And let's go ahead and put parenthesis around that, let's, matrix B as (6, -5 and 4), (3, 0, -8), good, so these are both 2 by 3.
00:26:29.000 --> 00:26:43.000
Certainly matrix addition is defined here, let's find two times A - 3 times B and take the transpose of the whole thing, so now we are going to put everything together.
00:26:43.000 --> 00:26:50.000
We are going to put addition, subtraction, we are going to put multiplication by scalar, and we are going to put transpose all in one.
00:26:50.000 --> 00:27:15.000
Okay, so let's find 2A, well 2A = 2 times (3, 2, 2), (2, 4, 1) and that's going to equal; (6, 2, 4), 2 times 2 is 4, 2 times 4 is 8, 2 times 1 is 2, that's that 1.
00:27:15.000 --> 00:27:32.000
Let's find -3B, so -3B = -3 times B, which is (6, -5, 4, 3, 0, 8) and that ends up being.
00:27:32.000 --> 00:27:43.000
When I do it I get (-18, 15, -12), actually I am going to squeeze it in here.
00:27:43.000 --> 00:28:01.000
I want to make it a little more clear, so let me write it down here, so I have (-18, 15, -12, -9) and I hope here, checking my arithmetic, because I make a ton of arithmetic errors.
00:28:01.000 --> 00:28:14.000
This is -3B, so now we have 2A - 3B, we will notice this -3B is already, so we have this (-) sign we took care of it already.
00:28:14.000 --> 00:28:21.000
This is the same as 2A + -3B, okay.
00:28:21.000 --> 00:28:38.000
That means I add that matrix with that matrix, so when I add those two, I get (6,...
00:28:38.000 --> 00:28:53.000
... Wait a second, did I get this right, let me double check, -28, this is 15, -12, -9, 0, -24, okay.
00:28:53.000 --> 00:29:17.000
And it's -3B, yes okay, so now let's add 6 + -18 should be -12, 2 + 15 is 17, 4 - 12 is -8.
00:29:17.000 --> 00:29:33.000
4 - 9 is -5, 8 + 0 is 8 and 2 - 24 is -22, so this is our 2A - 3B.
00:29:33.000 --> 00:29:55.000
Now if I take 2A -3B and I transpose it, I am going to write the rows as columns, (-12, 17,, -8), (-12, 17, -8) and please check my arithmetic here.
00:29:55.000 --> 00:30:05.000
(-5, 8, -22), this is 2 by 3, this is 3 by 2, everything checks out.
00:30:05.000 --> 00:30:14.000
This is our final answer, so we have got scalar multiplication, matrix addition, we can look out at the transpose.
00:30:14.000 --> 00:30:21.000
We have the diagonal matrix, which is only entries on the main diagonal, top left or bottom right.
00:30:21.000 --> 00:30:27.000
And we have square matrices, where the number of rows equals the number of columns okay.
00:30:27.000 --> 00:30:31.000
We will go ahead and stop here for now and we will continue on with matrices next time.
00:30:31.000 --> 00:30:34.000
Thank you for joining us here at educator.com, let's see you next time.