For more information, please see full course syllabus of Linear Algebra

For more information, please see full course syllabus of Linear Algebra

## Discussion

## Download Lecture Slides

## Table of Contents

## Transcription

## Related Books

### Matrices

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

- Intro 0:00
- Matrices 0:47
- Definition and Example of Matrices
- Square Matrix
- Diagonal Matrix
- Operations with Matrices 10:35
- Matrix Addition
- Scalar Multiplication
- Transpose of a Matrix
- Matrix Types 23:17
- Regular: m x n Matrix of m Rows and n Column
- Square: n x n Matrix With an Equal Number of Rows and Columns
- Diagonal: A Square Matrix Where All Entries OFF the Main Diagonal are '0'
- Matrix Operations 24:37
- Matrix Operations
- Example 25:55
- Example

### Linear Algebra Online Course

### Transcription: Matrices

*Welcome back to educator.com and welcome back to linear algebra, today we are going to talk about matrices.*0000

*Matrices are the work horses of linear algebra, essentially everything that we do with linear algebra of a computational nature.*0007

*Well we are not necessarily discussing; the theory is going to somehow use matrices.*0016

*You have dealt with matrices before; you have seen them a little bit in algebra-2 if I am not mistaken.*0022

*You have added, you have subtracted, you have maybe multiplied matrices.*0027

*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.*0031

*Having said that, let's just jump right in and familiarize ourselves with what these things are and how they operate.*0041

*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.*0050

*That's all this MN means.*0067

*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.*0069

*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.*0088

*A21, excuse me, A22... A2N and will go down, will go down, this will be AM1, AM2... AMN.*0103

*The top-left entry is A11, bottom-right entry is AMN, this is an M by N matrix.*0122

*This M is the rows, sorry, rows always come first, this is the row and N is a column, so M rows, N columns...*0133

*...Which is why this first subscript here is an M and this second subscript here is an N, okay.*0149

*Basic examples of something like 1, 5, 6, 7, oh, a little thing about notation and matrices.*0163

*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.*0175

*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,*0190

*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.*0199

*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.*0206

*As long as we know what we are talking about, the notation for that is actually kind of irrelevant, okay.*0212

*This is a 2 by 2 matrix, there are two rows, two columns, you might have something like 3, 4, 7, 0, 6, 8.*0218

*This is going to be three rows, two columns, so this is a 3 by 2 matrix.*0233

*You might have something like this, which is a 1 by 1 matrix.*0240

*1 by 1 matrix is just a number, which is actually an interesting notion, because those of you go on to...*0244

*We go on to study some higher mathematics, perhaps even complex analysis.*0253

*As it turns out numbers an matrices share many properties, we are actually going to be talking about a fair number of those properties.*0258

*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.*0264

*Its actually good way to think about it, so...*0274

*...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.*0278

*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.*0285

*Okay, so we speak about the Ith row in the Jth column, so let me do this in blue.*0295

*We talk about the Ith row, we talk about the Jth column, so remember the I, J, this was the notation.*0304

*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.*0316

*Okay, the third, well let's actually do this specific example here.*0332

*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.*0339

*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.*0357

*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)*0363

*A 1 by N matrix, or N, M by 1 matrix.*0374

*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.*0394

*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.*0401

*In this particular case 1 by 4, or if I take let’s say (4, 4, 6, 8)...*0416

*... 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.*0428

*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.*0438

*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.*0446

*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.*0455

*But in general both this and this are considered four vectors, so...*0463

*... 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....*0470

*... Call it a square matrix...*0495

*... Something like K = let's say (3, 4, 7, 10)...*0500

*... (11, 14, 8, 1, 0, 5, 6, 7, 7, 6, 5, 0), so this is four this way, four this way.*0510

*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...*0527

*... I _{j}, where I = J, those entries are called entries on the main diagonal.*0543

*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.*0549

*You have a square matrix; you have entries along the main diagonal, well a diagonal matrix...*0567

*... Matrix...*0580

*... Is one where every entry...*0585

*... Alter the main diagonal...*0592

*...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.*0602

*This is called a diagonal matrix.*0623

*Diagonal matrix is a square matrix, where all the, the main diagonal is represented, good.*0625

*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....*0634

*... addition, so let's start with a definition here, try to be as mathematically precise as possible.*0652

*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 _{j} and if B is equal to the matrix B, J...*0661

*... Are both M by N, then A + B is the M by N matrix, C...*0687

*... C _{i}J, where C_{i}J - A_{i}J = B_{i}J, okay.*0709

*That is...*0725

*...We get C by adding, by adding corresponding entries....*0733

*... Of A and B.*0750

*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.*0753

*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.*0761

*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.*0771

*And we need to express that precision symbolically, so that's all it's going on here.*0786

*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.*0791

*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.*0801

*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).*0809

*Notice in the definition both A and B are M by N and are our final matrix is also M by N.*0832

*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.*0841

*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.*0852

*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...*0865

*... 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.*0878

*Just add corresponding entries, nice and easy, basic arithmetic.*0895

*Okay, now let's talk about something called scalar multiplication.*0902

*Many of you have heard the word scalar before, if you haven't, it's just a fancy word for number, real number specifically.*0912

*Okay, so let's, let A = the matrix A _{ij} again with that symbol.*0922

*Well let A be M by N and will, and R a real number.*0935

*We have a matrix A and we have R which is a real number.*0947

*Then...*0953

*... The scalar multiple of A by R, which is symbolized RA, R times A is the, again M by N matrix....*0961

*... B, BA _{ij} , such that...*0980

*... The IJth entry of the B matrix equals R times BA _{ij}.*0989

*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.*0996

*Let's say if R = -2, and A is the matrix, (4, -3, 2, 5, 2, 0, 3, -6, 2).*1006

*Let's go ahead and put those, then RA is equal to -2 times each entry, -2 times 4, we get -8.*1026

*-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.*1038

*-2 times -6 is 12, -2 times 2 is -2, this is our final matrix.*1054

*Now okay, now let's talk about something called the transpose of a matrix, okay....*1065

*... 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.*1081

*Let's start with a definition, if A = the A's by J, is M by N.*1095

*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 _{j}_{i}.*1109

*Well actually I mean....*1132

*... TIJ, where, I will write it down here.*1138

*A _{IJ}, the IJth entry of the transpose matrix is equal to AJI.*1147

*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 _{IJ}th entry = A_{JI}, where the indices have been reversed.*1157

*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.*1177

*The third row of A becomes the third column of A transpose, and its best way to think about it.*1189

*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.*1195

*That's all you are doing, you are literally just switching, you are flipping the matrix, so let's do some examples.*1202

*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).*1211

*Now what was a 2 by 3 has become a 3 by 2.*1234

*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).*1241

*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.*1268

*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.*1282

*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.*1292

*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.*1301

*Okay, let's see, let's do one more for the transpose, so C = let's say (5, 4, -3, 2, 2, -3),*1313

*This is a 3 by 2 so I know that my C transpose is going to have to be a 2 by 3.*1332

*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.*1339

*Again all you have done is flip this.*1356

*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.*1362

*When we take T transpose, it is going to be a 3 by 1.*1375

*3 by 1 and it's going to be, well (3, 5, 1), it's going to be that thing written as a column.*1379

*But again these once where there are single rows or single columns, we generally call them vectors.*1386

*We will talk more about that specifically more formally in a subsequent lesson, okay so let's recap what we have done here.*1391

*We have a regular matrix, so we are talking about matrix here, regular matrix, let me use red.*1401

*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.*1409

*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.*1425

*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.*1449

*Erase these random, and we put 0's in everywhere else, 0.*1463

*This is a diagonal matrix, entries along the main diagonal, 0's everywhere else, okay.*1471

*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.*1479

*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.*1488

*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.*1497

*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.*1504

*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.*1519

*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.*1529

*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.*1541

*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).*1555

*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.*1570

*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.*1589

*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.*1603

*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.*1610

*Let's find -3B, so -3B = -3 times B, which is (6, -5, 4, 3, 0, 8) and that ends up being.*1635

*When I do it I get (-18, 15, -12), actually I am going to squeeze it in here.*1652

*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.*1663

*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.*1681

*This is the same as 2A + -3B, okay.*1694

*That means I add that matrix with that matrix, so when I add those two, I get (6,...*1701

*... Wait a second, did I get this right, let me double check, -28, this is 15, -12, -9, 0, -24, okay.*1718

*And it's -3B, yes okay, so now let's add 6 + -18 should be -12, 2 + 15 is 17, 4 - 12 is -8.*1733

*4 - 9 is -5, 8 + 0 is 8 and 2 - 24 is -22, so this is our 2A - 3B.*1757

*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.*1773

*(-5, 8, -22), this is 2 by 3, this is 3 by 2, everything checks out.*1795

*This is our final answer, so we have got scalar multiplication, matrix addition, we can look out at the transpose.*1805

*We have the diagonal matrix, which is only entries on the main diagonal, top left or bottom right.*1814

*And we have square matrices, where the number of rows equals the number of columns okay.*1821

*We will go ahead and stop here for now and we will continue on with matrices next time.*1827

*Thank you for joining us here at educator.com, let's see you next time.*1831

1 answer

Last reply by: Professor Hovasapian

Sat Oct 14, 2017 3:29 AM

Post by Levon Guyumjan on October 11 at 04:56:03 PM

I truly enjoy your explanation, is detailed and very clear. Thank so much

2 answers

Last reply by: hajar maazia

Sat Jul 13, 2013 9:26 AM

Post by hajar maazia on July 12, 2013

hello ,

Please professor I would like to ask you about how to find DU of the matrices ? suppose i found U how can I get D ?

1 answer

Last reply by: Professor Hovasapian

Sun Jun 2, 2013 4:04 PM

Post by Manfred Berger on May 30, 2013

Is 'regular matrix' supposed to mean the opposite of singular here, or is this just a shape qualifier?

0 answers

Post by Maimouna Louche on June 20, 2012

I use to freeze whenever I see matrixes, thanks, you make it so easy.

I love educator! ^.^

1 answer

Last reply by: Professor Hovasapian

Sat Jul 14, 2012 9:06 PM

Post by Ahmad Alshammari on June 6, 2012

i would pay more than 35 dollars to reach your luctures professor :)

Thank you, and thank you Educator. Hopefully you will make a diff equations course.

0 answers

Post by Mohammed Altannak on March 3, 2012

That was Perfect

Thanks Professor =)

0 answers

Post by Real Schiran on February 29, 2012

Better than ever ! perfection ..

3 answers

Last reply by: Professor Hovasapian

Tue Jan 14, 2014 6:00 AM

Post by Ken Mullin on January 26, 2012

I believe there is an error in the section where Matrix B is recopied (see the elements in the Matrix B in the 2nd row --the original Matrix B has -8 in the 2nd row, 3d column.

The scalar -3 is being multiplied to a Matrix B that has a POSITIVE 8 (not negative, as in the original).

Performing the operation on my TI-84..the 2nd row, 3 column element is a POSITIVE 24 (-3 x -8 = +24).

In the end--the transposed matrix becomes:

-12 5

17 8

-8 26

Am I correct Professor?--Please advise

0 answers

Post by thomas kotch on December 23, 2011

Splendid!