These video lectures of Professor Gilbert Strang teaching 18.06 were recorded in Fall 1999 and do not correspond precisely to the current edition of the textbook. However, this book is still the best reference for more information on the topics covered in each lecture.
Instructor/speaker: Prof. Gilbert Strang
Uh this is the review lecture for the first part of the course, the Ax=b part of the course.
And the exam will emphasize chapter three.
Because those are the --0 chapter three was about the rectangular matrices where we had null spaces and null spaces of A transpose, and ranks, and all the things that are so clear when the matrix is square and invertible, they became things to think about for rectangular matrices.
So, and vector spaces and subspaces and above all those four subspaces.
OK, I'm thinking to start at least I'll just look at old exams, read out questions, write on the board what I need to and we can see what the answers are.
The first one I see is one I can just read out.
Well, I'll write a little.
Suppose u, v and w are nonzero vectors in R^7.
What are the possible -- they span a -- a vector space.
They span a subspace of R^7, and what are the possible dimensions?
So that's a straightforward question, what are the possible dimensions of the subspace spanned by u, v and w?
OK, one, two, or three, right.
One, two or three.
Couldn't be more because we've only got three vectors, and couldn't be zero because -- because I told you the vectors were nonzero.
Otherwise if I allowed the possibility that those were all the zero vector -- then the zero-dimensional subspace would have been in there.
OK. Now can I jump to a more serious question?
We have a five by three matrix.
And I'm calling it U.
I'm saying it's in echelon form.
And it has three pivots, r=3.
First question, what's the null space?
What's the null space of this matrix U, so this matrix is five by three, and I find it helpful to just see visually what five something?
How to be a millionaire? by three means, what that shape is.
It was some crazy guy, what was his name? so that --1 does the matrix have three
Three columns in U then, five rows, three pivots,
It's -- Regis, right.
and what's the null space? Regis.
OK.2 If you saw this, like when you should have been
The null space of U is -- and it asks for a spec-of course I'm looking for an answer that isn't just the definition of the null space, but is the null space of this matrix, with this information.
And what is it?
It's only the zero vector.
Because we're told that the rank is three, so those three columns must be independent, no combination -- of those columns is the zero vector except -- so the only thing in this null space is the zero vector, and I -- I could even say what that vector is, zero, columns also? zero, zero.
So that's what's in the null space.
All right? let me go on with -- this question has multiple parts.
What's the -- oh now it asks you about a ten by three matrix, B, which is the matrix U and two U.
It actually -- I would probably be writing R -- and maybe I should be writing R here now.
This exam goes back a few years when I emphasized U more than R.
Now, what's the echelon form for that matrix?
So the echelon form, what's the rank,
Yes. and what's the echelon form?
Let's suppose this is in reduced echelon form, so that I could be using the letter R.
So I'll ask for the reduced row echelon form so imagine that
So I'm seeing the same length in b, three, and also in x. these are -- U is in reduced row echelon form but now I've doubled the height of the matrix,
So the (x)-s that it multiplies have three components, what will happen when we do row reduction?
What row reduction will take us to what matrix here?
So you start doing elimination.
You're doing elimination on single rows.
But of course we're allowed to think of blocks.
So what, well, what's the answer look like?
U and z- or R -- let's -- I'll stay with this letter U but I'm what was the name of that --2 winning a million dollars or really thinking it's in reduced form, and zero.
Then it asks oh, further, it asks about this matrix.
U, U, U, and zero.
OK, what's the echelon form of this?
So it's just like practice in thinking through what would row elimination, what would row reduction do.
Have I thought this through, so what -- what are we -- if we start doing elimination, basically we're going to subtract these rows from these -- In the column space, because I do know that it can so it's going to take us to U, U, zero, and minus U, For example, I'm going to ask you for a I guess, right?
But is it a- is it three by three?
Take the thing all the way to R -- let's suppose U is really R.
Suppose that we're really going for the reduced row echelon doing linear algebra of course -- but I didn't have to do the form.
Then would we stop there?
We would clean out, we would -- we could use this to -- is that right, can I so I took this row -- these rows away from these to get there.
Now I take these rows away from these, so that gives me zero.
And now what more would I do if I'm really shooting for R, the reduced row echelon form?
I would -- then I want plus ones in the pivot, so I would multiply through by minus one to get plus there.
So essentially I'm seeing reduced row echelon form there and there, and there's just one little twist still to go.
Do you see what that final twist might be?
It certainly has three rows.
To have if -- if U is in reduced row echelon form and now I'm looking at U, U, there's one little step to take, this isn't like a big deal at all, but -- but if I really want this to be in reduced form, what would I still -- might I still have to do?
I might have some zero rows here, I might have some zero rows here that strictly should move to the bottom.
Well, I'm not going to make a project out of that. first of all?
What's the rank of that matrix?
What's the rank of this matrix C?
Given that I know that the original U has rank three, what's the rank of this guy?
That has rank six, I can tell.
What was -- what's the rank of this B, while -- while we're at on TV for a few weeks, did you see that,
it? The rank of B, is that six or three?
So A is a three by three matrix.
Three is right.
Three is right.
Because we actually got it to where we could just see three pivots.
OK, and oh, now finally this easy one, what's the dimension be solved exactly when B is in the column space, of the null space -- of the null space of C transpose?
OK, so what do I -- if I want the dimension of a null space, I want to know the size of the matrix -- so what's the size of the matrix C?
It looks like it's ten by six, is it?
Ten by six, so C is ten by six, so m is ten, so C has ten rows, C transpose has ten columns, so there are ten columns there.
So how many free variables have I got, once I -- There's quite a few trues, shall I take a poll, if I start with the ten columns in C transpose, that's the m for the original C.
And what do I subtract off?
Six. Because we said that was the rank.
So I'm left with four.
Thanks. OK. If b is in the -- and what would -- what does the exam say
So I think that's the right answer -- the dimension of the null space of C transpose would be four.
OK. So that's one question, at least it brought in some -- some of the dimension counts.
OK. Here's another type of question. think about, what's the -- what's the shape of the matrix,
I give you an equation, Ax equals two four two.
And I give you the complete solution.
And what's its rank?
But I don't give you the matrix.
And another -- there's another vector, zero, zero, one.
My first question is what's the dimension of the row space?
Of the matrix A?
So the main thing that you want to get from this question is that a question could start this way. exam, don't just tell me.
Sort of backward way. so I guess I'm asking you what is the column space for this basis for the null space.
By giving you the answer and not telling you what the problem homework, so I was watching it, so there were three -- the is.
But we can get a lot of information, and sometimes we can get complete information about that matrix A.
OK. So what's the dimension of the row space of A?
What's the rank?
Tell me about what's the size of the matrix, yeah, just -- These are the things we want to matrix b and I'll answer them without multiplying it out.2
Its rank -- tell me something about its null space, I heard the right answer for the rank, the rank is one in this case.
Because the dimension of the null space, so the dimension of this instant?3 the null space of A is from knowing that that's the complete solution, it's two.
I'm seeing two vectors here, and they're independent in the null space of A, because they have to be in the
OK, which -- did you watch that quiz, there was a quiz program null space of A if I'm allowed to throw into the solution any amount of those vectors, that tells me that's the null space part then.
So the dimension of the null space is two, and then I -- of course I know the dimensions of all the -- four subspaces.
Now actually it asks what's the matrix?
Well, what's the matrix in this case?
Do we want to -- shall I try to figure that out?
Sure. Let's -- you'd like me to do it, OK.
Well, what's the ---- I actually say in this in the
So what about the matrix, or let me at least start it,
OK. If A times this x gives two, four, two, what does that tell me about the matrix A?
If A times that x solves that equation then it tells me that the first column is -- the first column of A is -- one, two, one, right.
The first column of A has to be one, two, one, because if I multiply by x, that's going to multiply just matrix? the first column, and give me two, four, two.
And then I've got two more columns to find,
and what information have I got to find them with? A basis for the null space.
I've got the null space.
So the fact that this is in the null space, what does that tell
So what is if b has the form -- so I guess I'm asking what's me about the matrix?
A matrix that has zero, zero, one in its null space?
That tells me that the last column of the matrix is zeroes. so how many think true?
Because this is in the null space, the last column has to be
When could it be solved? zeroes.
And because this is in the null space, what's the second column?
Well, this in the null space means that if I multiply A by that vector I must be getting zeroes, so I think that better be minus one, minus two, and minus one.
OK. That's a type of question that just brings out the information that's in that complete solution.
And then actually I go on to ask what vectors -- for what
OK. vectors B can Ax=b be solved?
Ax=b can be solved if what -- so I'm looking for a condition
Definitely not. on b, if any. interesting -- the novel point was there were three ways that
Can it be solved for every right-hand side b?
And the answer is -- yes or no -- right. solvable? the column space of this matrix, and what is it?
It's so the column space of that matrix is all multiples b
Can you tell me something -- so I'll ask questions about this -- b is a multiple of one, two, one.
I can solve the thing if it's a multiple of one, two, one, and of course sure enough -- yeah, that was a multiple of one, two, one, and so I had a solution.
So this is a case where we've got lots of null space.
Let me just recall rank is big, don't forget those cases, don't forget the other cases when r is as big as it can be,
OK. r equal m or r equal n.
Those are -- we had a full lecture on that, the full rank, full lecture, and important -- important case.
I gave you every chance to think about that.
OK. I'll just move on.
I think this is the best type of review.
So I'm going to solve Bx equals zero.
It's just brings these ideas out.
Apologies to the camera while I recover glasses and exam.
OK. How about a few true-false ones?
Actually there won't be a true-false on the quiz.
But it gives us a moment of quick review.
True or false, how do you feel about it at
If the null space -- I have a square matrix.
If its null space is just the zero vector, what about the null space of A transpose?
If the null space of A is just the zero vector, and the matrix is square, what do I know about the null space of A transpose?
Also the zero vector.
And that's a very very important fact.
How about this?
These -- look at the space of five by five matrices as a vector space.
So it's actually a twenty-five-dimensional vector space.
All five by five matrices.
Look at the invertible matrices.
Do they form a subspace?
So I have this five by -- a space of all five by five matrices.
I can add them, I can multiply by numbers.
But now I narrow down to the invertible ones.
And I ask are they a subspace?
And you -- your answer is -- quiet, but nevertheless definite, no.
Because if I add two invertible matrices I have no idea if the
No. answer is invertible.
If I multiply that invertible -- well, it doesn't even have the zero matrix in it, it couldn't be a subspace.
I have to be able to multiply by zero -- and stay in my subspace, and the invertible ones wouldn't work.
Well, the singular ones wouldn't work either.
They have zero -- the zero matrix is in the singular matrices, but if I add two singular matrices I don't know if the answer is singular or not.
OK. So another true-false.
If b squared equals zero then b equals zero. columns then the question is does Ax=b, is it always
True or false?
If b squared equals zero, true, false? you could get help, right --
b squared equals zero, b has to be a square -- square matrix, so that I can multiply it by itself, does that imply that B is zero?
Are there matrices whose square could be the zero matrix?
Yes or no?
Yes there are.
There are matrices whose square is the zero matrix.
So this statement is false.
If b squared is zero, we don't know that b is zero.
For example -- the best example is that matrix.
That matrix is a dangerous matrix.
It will come up in later parts of this course as an example of what can go wrong.
And here is a real simple -- so this -- so if I square that without doing the multiplication and finding the matrix b. matrix, I do get the zero matrix,and it shows -- OK.
A system of m equations in m unknowns is solvable for every right-hand side if the columns are independent.
So can I say that again, I'm -- I'll write it down then
OK. for short. m by m matrix independent
So give me a basis for -- for the null space of B.
Let's see. but you could only use each way once, so you couldn't like use them all the time.
So remember that?
You could -- so you could poll the audience, and that was a very -- that was a hundred percent successful way, so I'll poll the audience on this.
If the other possibility -- another possibility you could call your friend, right, or he's your friend until he gives you the wrong answer, which -- that turned out subspaces, then A is some multiple of B. to be very unreliable, you know, you'd call up your brother or something and ask him for the capital of whatever, Bosnia.
What does he know, he makes some guess,
So what -- I would just take extreme cases if it was me, matrix, independent columns, is Ax=b always solvable?
Maybe just hands up for that?
And who says no?
Oh, gosh, this audience is not reliable.
I guess I'd say, I'd vote yes.
Because independent columns, that means that the rank is the full size m, I have a matrix of rank m.
That means it's -- I mean it's square, so it's an invertible matrix, and nothing could go wrong.
So that's the good case and we always expect it in chapter two, but of course chapter three is -- only one of the possibilities.
OK. Let me move on to another question from an old quiz.
OK. Let's see.
I'm going to give you a matrix, but I'm going to give it to you
OK. as a product of a couple of matrices, one, one, zero, zero, one, zero, one, zero, one, times another matrix, one, zero,
I would like to ask you questions about that matrix minus one, two, zero, one, one, minus one, and all zeroes.
Let's see, what dimension I in -- the null space of B is a subspace of R.
What size vectors I looking for here?
Because if we don't know the size, we aren't going to find it, right? the null -- this matrix is three by four obviously.
So if we're looking for the null space we're looking for those vectors x in R^4.
So the null space of B is certainly a subspace of R^4.
What do you think its dimension is?
Of course once we find the basis we would know the dimension immediately, but let's stop first, what's the rank of this matrix B?
Let's see, what -- is that matrix invertible, that square one there?
Let's say sure, I think it is, yes, that matrix B looks invertible.
Is that pretty clear?
Yeah. So I've gone wrong in this course already, but I'll still hope that that matrix is invertible.
Yeah, yeah, because if I look for a combination of those three columns -- well, I couldn't use this middle column because it would have a one and in a position that I -- column is otherwise all zero, so a combination that gives zero can't give us that problem, and then the other two are clearly independent sets -- so that matrix is invertible.
Later we could take a determinant or other things.
What's the setup?
If I have an invertible matrix, a nice invertible square matrix, times this guy, times this second factor, and I'm looking for the null space, does this have any effect?
Is the null -- so what I'm asking is is the null space of B the same as the null space of just this part?
I think so.
I think so.
If Bx is zero, then multiplying by that guy I'll still have zero.
But also if this times some x give zero, I could always multiply on the left by the inverse of that, because it is invertible, and I would discover that this kind of Bx is zero.
You want me to write some of that down -- if I have a product here, C times -- times D, say, and if C is invertible, the null space of CD, well, it will the same as the null space of D.
If C is invertible.
Multiplying by an invertible matrix on the left can't change the null space.
So basically I'm asking you for the null space of this. so when do I know -- well, I would say suppose the matrix
I don't have to do the multiplication because I have C is invertible.
That first factor C is invertible.
It's not going to change the null space.
So can we just write down a basis now for the null space?
So what's the basis for the null space of -- of that?
So basis for the null space I'm looking for the two -- there are two pivot columns obviously.
It clearly has rank two.
If -- so true or false, if A and B have the same four
I'm looking for the two special solutions.
They'll come from the third and the fourth.
The free variables.
OK. so if the third free variable is a one, then I think probably I need a minus one there and a one there, it looks like.
Do you agree that if I then do that multiplication I'll get
zero? And if I have one in the fourth variable, then maybe I need a one in the second variable and maybe a minus two in the third.
So I just reasoned that through and then if I look back I see sure enough that the free variable part that I sometimes call F, that up -- that two by two corner, is sitting here with all its signs reversed.
So that's -- here I'm seeing minus F, and here I'm seeing the identity in the null space matrix.
OK, so that's the null space.
Another question is solve Bx equal one, zero, one.
OK. So that's one question, now solve complete solutions.
To Bx equal one, zero, one.
OK. Yeah, so I guess I'm seeing if I wanted to get one, zero, one - What's our particular solution?
So I'm looking for a particular solution and then the null space
I-- actually the first column of B, so what's the first column of our matrix B?
It's the vector one, zero, one.
The first column of our matrix agrees with the right-hand side.
So I guess I'm thinking x particular plus x null space will be the particular solution, since the first column of B is exactly right, that's great.
And then I have C times that first null space vector and D times the other null space vector.
The two -- the null space part of the solution, as always has the arbitrary constants, the particular solution doesn't have any arbitrary constants, it's one particular solution, and in this case it'll -- that one would do.
OK. Fine. so those are questions taken from old quizzes, any questions coming to mind?
OK. Well, so that particular x particular, it says that let's see, when I multiply by this guy, I'm going to get the first column of B.
That -- if that's a solution, I multiply B, B times this x will be the first column of B, and so I'm saying that the first column of this B agrees with the right-hand side.
So I'm saying that look at the first column of that matrix B.
If you do the multiplication, it's -- so what's the first column of that matrix?
Is that how you do that multiplication?
I multiply that matrix by that first column.
And it picks out one, zero, one.
So the first column of B is exactly that.
And therefore a particular solution will be this guy.
So I'll repeat that question.
Q: particular solution.
Any of the solutions can be the particular one that we pick out.
So like this plus -- plus this would be another particular
It would be another solution.
The particular is just telling us only take one.
But it's not telling us which one we have to take.
We take the most convenient one.
I guess in this -- in this problem that was that one.
And this pattern of particular plus null space, of course, that's going throughout mathematics of linear systems.
We're really doing mathematics of linear systems here.
Our systems are discrete and they're finite-dimensional -- and so it's linear algebra, but this particular plus null space goes -- that doesn't depend on having finite matrices -- that spreads much -- that spreads everywhere.
OK, I'm going to just like to encourage you to take problems out of the book, let me do the same myself.
OK well here's some easy true or falses.
I don't know why the author put these in here.
OK. If m=n, then the row space equals the column space. is invertible -- suppose A is an invertible
So these are true or falses.
If m equals n, so that means the matrix is square, then the row space equals the column space?
Good, what is equal there?
What can I say is equal, if M -- well,
yeah. Yeah it -- so that's definitely false -- the row space and the column space, and this matrix is like always a good example to consider.
So there's a square matrix but it's row space is the multiples of zero, one, and its column space is the multiples of one, zero.
The row space and the column space are totally different for that matrix.
Now of course if the matrix was symmetric, well, then clearly the row space equals the column space.
OK. How about this question?
The matrices A and minus A share the same four subspaces?
Do the matrices A and minus A have the same column space, do they have the same null space, do they have the same row
space? What's the answer on that?
Yes or no.
OK. How about this?
If A and B have the same four subspaces, then A is a multiple of B.
If -- suppose those subspaces are the same.
Then is A a multiple of B?
How how do you answer a question like that?
Of course if you want to answer it yes, then I would -- then they'd have to think of a reason why.
If you want to answer no way, then you would -- and I would sort of like first I would try to think no, I would say can I come up with an example where it isn't true?
Let me repeat the question.
And then write the answer. matrix, then what -- suppose it's six by six invertible matrix, then what's its row space, and its column space is all of R^6, and the null space, and the null space of A transpose would be the zero vector.
So every invertible matrix is going to give that answer.
If I have a six by six invertible matrix, I know what those subspaces are.
Heck, that was back in chapter two, when I didn't even know what subspaces were.
The row space and column space are both all six-dimensional space -- the whole space, and the rank is six, in other words, and the null spaces have zero dimension.
So do you see now the answer?
So A and B could be.
So A and B could be for example any -- so I'm going to say
false. Because A and B for example -- So an example: A and B any invertible six by six, six by six.
So those would have the same four subspaces but they wouldn't be the same.
Of course th- there should be something about those matrices that would be the same.
It's sort of a natural problem, so now actually we're getting to a math question.
The answer is this is not true.
One matrix doesn't have to be a multiple of the other.
But there must be something that's true.
And that would be sort of like a natural question to ask.
If they have the same subspaces, same four subspaces, then what -- what could you -- instinct wasn't necessarily right.
But I hope you now see that the correct answer is false.
And then you might think OK, well, they certainly do have the same rank.
But do -- obviously if they have the same four subspaces, they have the same rank.
I might say if they have the well, I could extend that question and think about other possibilities and finally come up with something that was true.
But I won't press that one.
Let me keep going with practice questions.
And these practice questions are quite appropriate I think for the exam.
OK. let's see.
If I exchange two rows of A which subspaces stay the same?
So I'm trying to take out questions that we can answer without you know we can answer quickly.
If I have a matrix A, and I exchange two of its rows, which subspaces stay the same?
The row space does stay the same.
And the null space stays the same.
Column space would be a wrong answer.
OK. all right, here's a question.
Oh, this leads into the next chapter.
Why can the vector one, two, three not be a row and also in the null space?
Fitting we close with this question.
Close is -- so V equal this one, two, three can't be in the null space of a matrix and the row space.
And my question is why not?
So this is a question that we can because it's sort of asked in a straightforward way, we can figure out an answer.
Well, actually yeah -- I'll even pin it down, it can't be in the null space -- and be a row.
I'll even pin it down further.
Ask it to be a row of A.
So I'm -- we know the dimensions of these spaces.
But now I'm asking you sort of like the overlap between -- so the null space and the row space, those are in the same n-dimensional space.
Those are -- well, those are both subspaces of n-dimensional space, and I'm basically saying they can't overlap.
I can't have a vector like this, a typical vector, that's in the null space and it's also a row of the matrix.
Why is that?
So that's a new sort of idea.
Let's just see what it would mean.
I mean that A times this V, why can this A times this V it can't be zero.
Oh well, if it's zero, so this is -- I'm getting it into the null space here.
So this is -- now let's put that vector's in the null space, why can't the first row of a matrix be one, two, three?
I can fill out the matrix as I like.
Why is that impossible?
Well, you're seeing it's impossible, right?
That if that was a row of the matrix and in the null space, that number would not be zero, it would be fourteen.
Right. So now we actually are beginning to get a more complete picture of these four subspaces.
The two that are over in n-dimensional space, they actually only share the zero vector.
The intersection of the null space and the row space is only the zero vector.
And in fact the null space is perpendicular to the row space.
That'll be the first topic let's see, we have a holiday Monday -- and I'll see you Wednesday with perpendiculars.
And I'll see you Friday.
So good luck on the quiz.
This is one of over 2,200 courses on OCW. Find materials for this course in the pages linked along the left.
MIT OpenCourseWare is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.
No enrollment or registration. Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.
Knowledge is your reward. Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.
Made for sharing. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)
Learn more at Get Started with MIT OpenCourseWare