The following content is provided under a Creative
Commons license.
Your support will help MIT OpenCourseWare
continue to offer high quality educational resources for free.
To make a donation or to view additional materials
from hundreds of MIT courses, visit MIT OpenCourseWare
at ocw.mit.edu.
PROFESSOR STRANG: Just to give an overview in three lines:
the text is the book of that name, Computational Science
and Engineering.
That was completed just last year,
so it really ties pretty well with the course.
I don't cover everything in the book, by all means.
And I don't, certainly, don't stand here and read the book.
That would be no good.
But you'll be able, if you miss a class -- well,
don't miss a class.
But if you miss a class, you'll be able, probably,
to see roughly what we did.
OK, so the first part of the semester
is applied linear algebra.
And I don't know how many of you have had a linear algebra
course, and that's why I thought I would
start with a quick review.
And you'll catch on.
I want matrices to come to life, actually.
You know, instead of just being a four
by four array of numbers, there are four by four,
or n by n or m by n array of special numbers.
They have a meaning.
When they multiply a vector, they do something.
And so it's just, part of this first step
is just, like, getting to recognize,
what's that matrix doing?
Where does it come from?
What are its properties?
So that's a theme at the start.
Then differential equations, like Laplace's equation,
are beautiful examples.
So here we get, especially, to numerical methods,
finite differences, finite elements, above all.
So I think in this class you'll really
see how finite elements work, and other ideas.
All sorts of ideas.
And then the last part of the course is about Fourier.
That's Fourier series, that you may have seen,
and Fourier integrals.
But also, highly important, Discrete Fourier Transform,
DFT.
That's a fundamental step for understanding
what a signal contains.
Yeah, so that's great stuff, Fourier.
OK, what else should I say before I start?
I said this was my favorite course,
and maybe I'll elaborate a little.
Well, I think what I want to say is that I really
feel my life is here to teach you and not to grade you.
I'm not going to spend this semester worrying about grades,
and please don't.
They come out fine.
We've got lots to learn.
And I'll do my very best to explain it clearly.
And I know you'll do your best.
I know from experience.
This class goes for it and does it right.
So that's what makes it so good.
OK.
Homeworks, by the way, well, the first homework
will simply be a way to get a grade list, a list of everybody
taking the course.
They won't be graded in great detail.
Too large a class.
And you're allowed to talk to each other about homework.
So homework is not an exam at all.
So let me just leave any discussion of exams and grades
for the future.
I'll tell you, you'll see how informally the first homework
will be.
And I hope it'll go up on the website.
The first homework will be for Monday.
So it's a bit early, but it's pretty open-ended.
If you could take three problems from 1.1,
the first section of the book, any three,
and any three problems from 1.2, and print your name
on the homework -- because we're going to use that to create
the grade list -- I'll be completely happy.
Well, especially if you get them right
and do them neatly and so on.
But actually we won't know.
So that's for Monday.
OK.
And we'll talk more about it.
I'll announce the TA on the website and the TA hours,
the office hours, and everything.
There'll be a Friday afternoon office hour,
because homeworks will typically come Monday.
OK.
Questions about the course before I just start?
OK.
Another time for questions, too.
OK, so can we just start with that matrix?
So I said about matrices, I'm interested in their properties.
Like, I'm going to ask you about that.
And then, I'm interested in their meaning.
Where do they come from?
You know, why that matrix instead of some other?
And then, the numerical part is how do we deal with them?
How do we solve a linear system with that coefficient matrix?
What can we say about the solution?
So the purpose.
Right.
OK, now help me out.
So I guess my plan with the video taping
is, whatever you say, I'll repeat.
So say it as clearly as possible, and it's
fantastic to have discussion, conversation here.
So I'll just repeat it so that it safely gets on the tape.
So tell me its properties.
Tell me the first property that you notice about that matrix.
Symmetric.
Right.
I could have slowed down a little
and everybody probably would have said that at once.
So that's a symmetric matrix.
Now we might as well pick up some matrix notation.
How do I express the fact that this a symmetric matrix?
In simple matrix notation, I would
say that K is the same as K transpose.
The transpose, everybody knows, it comes from -- oh,
I shouldn't say this -- flipping it across the diagonal.
That's not a very "math" thing to do.
But that's the way to visualize it.
And let me use a capital T for transpose.
So it's symmetric.
Very important.
Very, very important.
That's the most important class of matrices,
symmetric matrices.
We'll see them all the time, because they
come from equilibrium problems.
They come from all sorts of -- they come everywhere
in applications.
And we will be doing applications.
The first week or week and a half,
you'll see pretty much discussion
of matrices and the reasons, what their meaning is.
And then we'll get to physical applications:
mechanics and more.
OK.
All right.
Now I'm looking for properties, other properties,
of that matrix.
Let me write "2" here so that you got a spot to put it.
What are you going to tell me next about that matrix?
Periodic.
Well, okay.
Actually, that's a good question.
Let me write periodic down here.
You're using that word, because somehow that pattern
is suggesting something.
But you'll see I have a little more
to add before I would use the word periodic.
So that's great to see that here.
What else?
Somebody else was going to say something.
Please.
Sparse!
Oh, very good.
Sparse.
That's also an obvious property that you
see from looking at the matrix.
What does sparse mean?
Mostly zeros.
Well that isn't mostly zeros, I guess.
I mean, that's got what, out of sixteen entries,
it's got six zeros.
That doesn't sound like sparse.
But when I grow the matrix -- because this is just a four
by four.
I would even call this one K_4.
When the matrix grows to 100 by 100,
then you really see it as sparse.
So if that matrix was 100 by 100, how many non-zeros
would it have?
So if n is 100, then the number of non-zeros -- wow,
that's the first MATLAB command I've written.
A number of non-zeros of K would be --
anybody know what it would be?
I'm just asking to go up to five by five.
I'm asking you to keep that pattern alive.
Twos on the diagonal, minus ones above and below.
So yeah, so 298, would it be?
A hundred diagonal entries, 99 and 99, maybe 298?
298 out of 100 by 100 would be what?
It's been a long summer.
Yeah, a lot of zeros.
A lot.
Right.
Because the matrix has got what 100 by 100, 10,000 entries.
Out of 10,000.
So that's sparse.
But we see those all the time, and fortunately we do.
Because, of course, this matrix, or even 100 by 100,
we could deal with if it was dense.
But 10,000, 100,000, or 1 million,
which happens all the time now in scientific computation.
A million by million dense matrix
is not a nice thing to think about.
A million by million matrix like this is a cinch.
OK.
So sparse.
What else do you want to say?
Toeplitz.
Holy Moses.
Exactly right.
But I want to say, before I use that word,
so that'll be my second MATLAB command.
Thanks.
Toeplitz.
What's that mean?
So this matrix has a property that we
see right away, which is?
I want to stay with Toeplitz but everybody tell me
something more about properties of that matrix.
Tridiagonal.
Tridiagonal, so that's almost a special subcase of sparse.
It has just three diagonals.
Tridiagonal matrices are truly important.
They come in all the time, we'll see
that they come from second order differential equations, which
are, thanks to Newton, the big ones.
Ok, now it's more than tridiagonal and what more?
So what further, we're getting deeper now.
What patterns do you see beyond just tridiagonal,
because tridiagonal would allow any numbers there
but those are not, there's more of a pattern than just three
diagonals, what is it?
Those diagonals are constant.
If I run down each of those three diagonals,
I see the same number.
Twos, minus ones, minus ones, and that's
what the word Toeplitz means.
Toeplitz is constant diagonal.
Ok.
And that kind of matrix is so important.
It corresponds, yeah, if we were in EE,
I would use the words time-invariant filter, linear,
time-invariant.
So it's linear because we're dealing with a matrix.
And it's time-invariant, shift-invariant.
I just use all these equivalent words
to mean that we're seeing the same thing row
by row, except of course, at, shall I call that the boundary?
That's like, the end of the system and this
is like the other end and there it's chopped off.
But if it was ten by ten I would see that row eight times.
100 by 100 I'd see it 98 times.
So it's constant diagonals and the guy who first
studied that was Toeplitz.
And we wouldn't need that great historical information
except that MATLAB created a command to create that matrix.
K, MATLAB is all set to create Toeplitz matrices.
Yeah, so I'll have to put what MATLAB would put.
I realize I'm already using the word MATLAB.
I think that MATLAB language is really convenient
to talk about linear algebra.
And how many know MATLAB or have used it?
Yeah.
You know it better than I. I talk a good line with MATLAB
but I -- the code never runs.
Never!
I always forget some stupid semicolon.
You may have had that experience.
And I just want to say it now that there are other languages,
and if you want to do homeworks and want
to do your own work in other languages, that makes sense.
So the older established alternatives
were Mathematica and Maple and those two
have symbolic-- they can deal with algebra as well
as numbers.
But there are newer languages.
I don't know if you know them.
I just know my friends say, yes they're terrific.
Python is one.
And R. I've just had a email saying,
tell your class about R. And others.
Ok, so but we'll use MATLAB language because that's really
a good common language.
Ok, so what is a Toeplitz matrix?
A Toeplitz matrix is one with constant diagonals.
You could use the word time-invariant,
linear time-invariant filter.
And to create K, this is an 18.085 command.
It's just set up for us.
I can create K by telling the system the first row.
Two, minus one, zero, zero.
That would, then if it wasn't symmetric
I would have to give the first column also.
Toeplitz would be constant diagonal,
it doesn't have to be symmetric.
But if it's symmetric, then the first row and first column
are the same vector, so I just have to give that vector.
Okay, so that's the quickest way to create K.
And of course, if it was bigger then I would,
rather than writing 100 zeros, I could put zeros of 98 and one.
Wouldn't I have to say that?
Or is it one and 98?
You see why it doesn't run.
Well I guess I'm thinking of that as a row.
I don't know.
Anyway.
I realize getting this videotaped means I'm
supposed to get things right!
Usually it's like, we'll get it right later.
But anyway, that might work.
Okay.
So there's a command that you know.
"zeros", that creates a matrix of this size with all zeros.
Okay.
That would create the 100 by 100.
Good.
Ok.
Oh, by the way, as long as we're speaking about computation
I've gotta say something more.
We said that the matrix is sparse.
And this 100 by 100 matrix is certainly sparse.
But if I create it this way, I've created all those zeros
and if I ask MATLAB to work with that matrix, to square it
or whatever, it would carry all those zeros
and do all those zero computations.
In other words, it would treat K like a dense matrix
and it would just, it wouldn't know the zeros were there
until it looked.
So I just want to say that if you have really big systems
sparse MATLAB is the way to go.
Because sparse MATLAB keeps track only of the non-zeros.
So it knows-- and their locations, of course.
What the numbers are and their location.
So I could create a sparse matrix out of that,
like KS for K sparse.
I think if I just did sparse(K) that
would create a sparse matrix.
And then if I do stuff to it, MATLAB
would automatically know those zeros were there
and not spend it's time multiplying by zero.
But of course, this isn't perfect
because I've created the big matrix before sparsifying it.
And better to have created it in the first place
as a sparse matrix.
Ok.
So those were properties that you could see.
Now I'm looking for little deeper.
What's the first question I would ask about a matrix if I
have to solve a system of equations,
say KU=F or something.
I got a 4 by 4 matrix, four equations, four unknowns.
What would I want to know next?
Is it invertible?
Is the matrix invertible?
And that's an important question and how
do you recognize an invertible matrix?
This one is invertible.
So let me say K is invertible.
And what does that mean?
That means that there's another matrix,
K inverse such that K times K inverse is the identity matrix.
The identity matrix in MATLAB would be eye(n)
and it's the diagonal matrix of ones.
It's the unit matrix; it's the matrix that doesn't do anything
to a vector.
So this K has an inverse.
But how do you know?
How can you recognize that a matrix is invertible?
Because obviously that's a critical question and many,
many-- since our matrices are not--
a random matrix would be invertible, for sure,
but our matrices have patterns, they're
created out of a problem and the question
of whether that matrix is invertible is fundamental.
I mean finite elements has these,
zero-energy modes that you have to watch out for because, what
are they?
They produce non-invertible stiffness matrix.
Ok.
So how did we know, or how could we
know that this K is invertible?
Somebody said invertible and I wrote it down.
Yeah?
Well ok.
Now I get to make a speech about determinants.
Don't deal with them!
Don't touch determinants.
I mean this particular four by four
happens to have a nice determinant.
I think it's five.
But if it was a 100 by 100 how would
we show that the matrix was invertible?
And what I mean by this is the whole family is invertible.
All sizes are invertible.
K_n is invertible for every n, not just
this particular guy, whose determinant we could take.
But as five by five, six by six, we
would be up in the-- but you're completely right.
The determinant is a test.
Alright.
But I guess I'm saying that it's not the test that I would use.
So what I do?
I would row reduce.
That's the default option in linear algebra.
If you don't know what to do with a matrix,
if you want to see what's going on, row reduce.
What does that mean?
That means-- shall I try it?
So let me just start it, just so I'm not using
a word that we don't need.
Ok.
And actually, maybe the third lecture, maybe next Monday
we'll come back to row reduce.
So I won't make heavy weather of that, certainly not now.
So what is row reduce?
Just so you know.
I want to get that minus one to be a zero.
I'm aiming for a triangular matrix.
I want to clean out below the diagonal
because if my matrix is triangular then
I can see immediately everything.
Right?
Ultimately I'll reach a matrix U that'll be upper triangular
and that first row won't change but the second row will change.
And what does it change to?
How do I clean out, get a zero in that, where
the minus one is right now?
Well I want to use the first row, the first equation.
I want to add some multiple of the first row
to the second row.
And what should that multiple be?
I want to multiply that row by something.
And I'll say "add" today.
Later I'll say "subtract."
But what shall I do?
Just tell me what the heck to do.
I've got that row and I want to use it,
I want to take a combination of these two rows.
This row and some multiple of this one that'll
produce a zero.
This is called the pivot.
That's the first pivot P-I-V-O-T. Pivot.
And then that's the pivot row.
And what do I do?
Tell me what to do.
Add half this row to this one.
When I add half of that row to that one, what do I get?
I get that zero.
What do I get here for the second pivot?
What is it?
1.5, 3/2.
Because half of that is, so 3/2.
And the rest won't change.
So I'm happy with that zero.
Now I've got a couple more entries below that first pivot,
but they're already zero.
That's where the sparseness pays off.
The tridiagonal really pays off.
So those zeros say the first column is finished.
So I'm ready to go on to the second column.
It's like I got to this smaller problem with the 3/2 here.
And a zero there.
What do I do now?
There is the second pivot, 3/2.
Below it is a non-zero.
I gotta get rid of it.
What do I multiply by now?
2/3.
2/3 of that new second row added to the third row
will clean out the third row.
This was already cleaned out.
This is already a zero.
But I want to have 2/3 of this row added to this one so
what's my new third row?
Starts with zero and what's the third pivot now?
You see the pivots appearing?
The third pivot will be 4/3 because I've got 2/3 this -1
and 2 is 6/3 so I have 6/3, I'm taking 2/3 away, I get 4/3
and that -1 is still there.
So you see that I'm-- this is fast.
This is really fast.
And the next step, maybe you can see the beautiful patterns
that are coming.
Do you want to just guess the fourth pivot?
5/4, good guess, right.
5/4.
Now this is actually how MATLAB would find the determinant.
It would do elimination.
I call that elimination because it
eliminated all those numbers below the diagonal
and got zeros.
Now what's the determinant?
If I asked you for the determinant,
and I will very rarely use the word determinant,
but I guess I'm into it now, so tell me the determinant.
Five.
Why's that?
I guess I did say five earlier.
But how do you know it's five?
Whatever the determinant of that matrix is, why is it five?
Because it's a triangular matrix.
Triangular matrices, you've got all these zeros.
You can see what's happening.
And the determinant of a triangular matrix
is just the product down the diagonal.
The product of these pivots.
The determinant is the product of the pivots.
And that's how MATLAB would compute a determinant.
And it would take 2 times 3/2 times 4/3 times 5/4
and it would give the answer five.
My friend Alan Edelman told me something yesterday.
MATLAB computes in floating point.
So 4/3, that's 1.3333, etc.
So MATLAB would not, when it does that multiplication,
get a whole number.
Right?
Because in MATLAB that would be 1.333 and probably
it would make that last pivot a decimal, a long decimal.
And then when it multiplies that it gets whatever it gets.
But it's not exactly five I think.
Nevertheless MATLAB will print the answer five.
It's cheated actually.
It's done that calculation and I don't
know if it takes the nearest integer when
it knows that the-- I shouldn't tell you this,
this isn't even interesting.
If the determinant of an integer matrix, whole number
is a whole number, so MATLAB says,
better get a whole number.
And somehow it gets one.
Actually, it doesn't always get the right one.
So maybe later I'll know the matrix whose determinant
might not come out right.
But ours is right, five.
Now where was this going?
It got thrown off track by the determinant.
What's the real test?
Well so I said there are two ways to see
that a matrix is invertible.
Or not invertible.
Here we're talking about the first way.
How do I know that this matrix-- I've got an upper triangular
matrix.
When is it invertible?
When is an upper triangular matrix invertible?
Upper triangular is great.
When you've got it in that form you
should be able to see stuff.
So this key question of invertible,
which is not obvious for a typical matrix
is obvious for a triangular matrix.
And why?
What's the test?
Well, we could do the determinant
but we can say it without using that long word.
The diagonal is non-zero.
K as invertible because the diagonal-- no,
it's got a full set of pivots.
It's got four non-zero pivots.
That's what it takes.
That's what it's going to take to solve systems.
So this is the first step in solving this system.
In other words, to decide if a matrix is invertible,
you just go ahead and use it.
You don't stop first necessarily to check invertibility.
You go forward, you get to this point
and you see non-zeros there and then
you're practically got to the answer here.
I'll leave for another day the final back-- going back upwards
that gives you the answer.
So K is invertible.
That means full set of pivots. n non-zero pivots.
And here they are, two, 3/2, 4/3 and 5/4.
Worth knowing because this matrix K is so important.
We'll see it over and over again.
Part of my purpose today is to give some matrices
a name because we'll see them again and you'll know them
and you'll recognize them.
While I'm on this invertible or not invertible business
I want to ask you to change K. To make it not invertible.
Change that matrix.
How could I change that matrix?
Well, of course, many ways.
But I'm interested in another matrix
and this'll be among my special matrices.
And it will start out the same.
It'll have these same diagonals.
It'll be Toeplitz.
I'm going to call it C and I want
to say the reason I'm talking about it now is that it's not
going to be invertible.
And I'm going to tell you a C and see if you can tell me
why it is not invertible.
So here's the difference: I'm going to put minus one
in the corners.
Still zeros there.
So that matrix C still has that pattern.
It's still a Toeplitz matrix, actually.
That would still be the matrix Toeplitz of 2, -1, 0, -1.
I claim that matrix is not invertible
and I claim that we can see that without computing determinants,
we can see it without doing elimination, too.
MATLAB would see it by doing elimination.
We can see it by just human intelligence.
Now why?
How do I recognize a matrix that's not invertible?
And then, by converse, how a matrix that is invertible.
I claim-- and let may say first, let
me say why that letter C. That letter C stands for circulant.
It's because-- This word circulant, why circulant,
it's because that diagonal which only had three guys
circled around to the fourth.
This diagonal that only had three entries
circled around to the fourth entry.
This diagonal with two zeros circled around
to the other two zeros.
The diagonal are not only constant, they loop around.
And you use the word periodic.
Now for me, that's the periodic matrix.
See, a circulant matrix comes from a periodic problem.
Because it loops around.
It brings numbers, zero is the same
as number four or something.
And why is that not invertible?
The thing is can you find a vector?
Because matrices multiply vectors,
that's their whole point.
Can you see a vector that it takes to zero?
Can you see a solution to Cu=0?
I'm looking for a u with four entries
so that I get four zeros.
Do you see it?
All ones.
That will do it.
So that's a nice, natural entry, a constant.
And do you see why when I-- we haven't
spoken about multiplying matrices times vectors.
And most people will do it this way.
And let's do this one this way.
You take row one times that, you get two, minus one, zero,
minus one.
You get the zero because of that new number.
Here we always got zero from the all ones vector and now
over here that minus one, you see it's just right.
If all the rows add to zero then this vector of all ones
will be, I would use the word "in the null space"
if you wanted a fancy word, a linear algebra word.
What does that mean?
It solves Cu=0.
And why does that show that the matrix isn't invertible?
Because that's our point here.
I have a solution to Cu=0.
I claim that the existence of such a solution
has wiped out the possibility that the matrix is invertible
because if it was invertible, what would this lead to?
If invertible, if C inverse exists what would
I do to that equation that would show me
that C inverse can't exist?
Multiply both sides by C inverse.
So you're seeing, just this first day you're
seeing some of the natural steps of linear algebra.
Row reduction, multiply-- when you
want to see what's happening, multiply both sides
by C inverse.
That's the same as in ordinary language,
do the same thing to all the equations.
So I multiply both sides by the same matrix.
And here I would get C^(-1) C u = C^(-1) 0.
So what does that tell me?
I made it long, I threw in this extra step.
You were going to jump immediately to C^(-1) C is I,
is the identity matrix and when the identity matrix multiplies
a vector u, you get u.
And on the right side, C inverse,
whatever it is, if it existed, times zero
would have to be zero.
So this would say that if C inverse exists,
then the only solution is u equals zero.
That's a good way to recognize invertible matrices.
If it is invertible then the only solution to Cu=0 is u=0.
And that wasn't true here.
So we conclude C is not invertible.
C is therefore not invertible.
Now can I even jump in.
I've got two more matrices that I
want to tell you about that are also close cousins of K and C.
But let me just explain physically a little bit
about where these matrices are coming from.
So maybe next to K-- so I'm not going to put periodic there.
Right?
That's the one that I would call periodic.
This one is fixed at the ends.
Can I draw a little picture that aims to show that?
Aims to show where this is coming from.
It's coming from I think of this as controlling
like four masses.
Mass one, mass two, mass three and mass four
with springs attached and with endpoints fixed.
So if I put some weights on those masses-- we'll do this;
masses and springs is going to be the very first application
and it will connect to all these matrices.
And all I'm doing now is just asking to draw the system.
Draw the mechanical system.
Actually I'll usually draw it vertically.
But anyway, it's got four masses and the fact
that this minus one here got chopped off,
what would I call that end?
I'd call that a fixed end.
So this is a fixed, fixed matrix.
Both ends are fixed.
And it's the matrix that would govern--
and the springs and masses all the same
is what tells me that the thing is Toeplitz.
Now what's the picture that goes with C?
What's the picture with C?
Do you have an instinct of that?
So C is periodic.
So again we've got four masses connected by springs.
But what's up with those masses to make the problem cyclic,
periodic, circular, whatever word you like.
They're arranged in a ring.
The fourth guy comes back to the first one.
So the four masses would be, so in some kind of a ring,
the springs would connect them.
I don't know if that's suggestive, but I hope so.
And what's the point of, can we just
speak about mechanics one moment?
How does that system differ from this fixed system?
Here the whole system can't move, right?
If there no force, then nothing can happen.
Here the whole system can turn.
They can all displace the same amount
and just turn without any compression of the springs,
without any force having to do anything.
And that's why the solution that kills this matrix is
[1, 1, 1, 1].
So [1, 1, 1, 1] would describe a case where all
the displacements were equal.
In a way it's like the arbitrary constant in calculus.
You're always adding plus C. So here we've
got a solution of all ones that produces zero the way
the derivative of a constant function is the zero function.
So this is just like an indication.
Yes, perfect.
I've got two more matrices.
Are you okay for two more?
Yes okay, what are they?
Okay a different blackboard for the last two.
So one of them is going to come by freeing up this end.
So I'm going to take that support away.
And you might imagine like a tower oscillating up and down
or you might turn it upside down and like a hanging spring,
or rather four springs with four masses hanging onto them.
But this end is fixed and this is not fixed anymore,
this is now free.
And can I tell you the matrix, the free-fixed matrix.
Free-fixed.
Because it's the top end that I changed,
I'm going to call it T. So all the other guys
are going to be the same but the top one, the top row,
the boundary row, boundary conditions
are always the tough part, the tricky part,
the key part of a model, and here
the natural boundary condition is to have a 1 there.
That two changed to a one.
Now if I asked you for the properties of that matrix--
so that's the third. shall I do the fourth one?
So you have them all, you'll have the whole picture.
The fourth one, well you can guess.
What's the fourth?
What am I going to do?
Free up the other end.
So this guy had one free end and the other guy
has B for both ends.
B for both ends are going to be free.
So this is free-fixed.
This'll be free-free.
So that means I have this free end,
the usual stuff in the middle, no change,
and the last row is what?
What am I going to put in the last row? -1, 1.
-1, 1.
So I've changed the diagonal.
There I put a single one in because I freed up one end.
With B I freed both ends and I got two minus ones.
Now what do you think?
So we've drawn the free-fixed one and what's your guess?
They're all symmetric.
That's no accident.
They're all tridiagonal, no accident again.
Why are they tridiagonal?
Physically they're tridiagonal because that mass is only
connected to its two neighbors, it's
not connected to that mass.
That's why we get a zero in the two, four position.
Because two is not connected to four.
So it's tridiagonal.
And it's not Toeplitz anymore, right?
Toeplitz says constant diagonals and these are not
quite constant.
I would create K, I would take T equal K,
if I was going to create this matrix and then I would say
T(1, 1) = 1.
That command would fix up the first entry.
Yeah, that's a serious question.
Maybe, can I hang on until Friday, and even
maybe next week.
Because it's very important.
When I said boundary conditions are the key to problems,
I'm serious.
If I had to think okay, what do people come in my office
ask about questions, I say right away,
what's the boundary condition?
Because I know that's where the problem is.
And so here we'll see these guys clearly.
Fixed and free, very important.
But also let me say two more words, I never can resist.
So fixed means the displacement is zero.
Something was set to zero.
The fifth guy, the fifth over here, that fifth column was
knocked out.
Free means that in here it could mean that the fifth guy is
the same as the fourth.
The slope is zero.
Fixed is u is zero.
Free is slope is zero.
So here I have a slope of zero at that end,
here I have it at both ends.
So maybe that's a sort of part answer.
Now I wanted to get to the difference between these two
matrices.
And the main properties.
So what are we see?
Symmetric again, tridiagonal again,
not quite Toeplitz, but almost, sort of morally Toeplitz.
But then the key question was invertible or not.
Key question was invertible or not.
Right.
And what's your guess on these two?
Do you think that one's invertible or not?
Make a guess.
You're allowed to guess.
Yeah it is.
Why's that?
Because this thing has still got a support.
It's not free to shift forever.
It's held in there.
So that gives you a hint about this guy.
Invertible or not for B?
No.
And now prove that it's not.
Physically you were saying, well this free guy
with this thing gone now, this is now free-free.
Physically we're saying the whole thing can move,
there's nothing holding it.
But now, for linear algebra, that's not the proper language.
You have to say something about that matrix.
Maybe tell me something about Bu=0.
What are you going to take for u?
Yeah.
Same u.
We're lucky in this course, u = [1, 1, 1, 1] is the guilty main
vector many times.
Because again the rows are all adding to zero and the all ones
vector is in the null space.
If I could just close with one more word.
Because it's the most important.
Two words, two words.
Because they're the most important words,
they're the words that we're leading to in this chapter.
And I'm assuming that for most people they will be new words,
but not for all.
It's a further property of this matrix.
So we've got, how many?
Four properties, or five?
I'm going to go for one more.
And I'm just going to say that name first
so you know it's coming.
And then I'll say, I can't resist
saying a tiny bit about it.
I'll use a whole blackboard for this.
So I'm going to say that K and T are -- here it comes,
take a breath -- positive definite matrices.
So if you don't know what that means, I'm happy.
Right?
Because well, I can tell you one way
to recognize a positive definite matrix.
And while we're at it, let me tell you about C and B.
Those are positive semi-definite because they hit zero somehow.
Positive means up there, greater than zero.
And what is greater than zero that we've already seen?
And we'll say more.
The pivots were.
So if I have a symmetric matrix and the pivots are all positive
then that matrix is not only invertible, because I'm
in good shape, the determinant isn't zero,
I can go backwards and do everything,
those positive numbers are telling me that more than that,
the matrix is positive definite.
So that's a test.
We'll say more about positive definite,
but one way to recognize it is compute the pivots
by elimination.
Are they positive?
We'll see that all the eigenvalues are positive.
The word positive definite just brings the whole
of linear algebra together.
It connects to pivots, it connects to eigenvalues,
it connects to least squares, it's all over the place.
Determinants too.
Questions or discussion.
It's a big class and we're just meeting for the first time
but there's lots of time to, chance to ask me.
I'll always be here after class.
So shall we stop today?
I'll see you Friday or this afternoon.
If this wasn't familiar, this afternoon would be a good idea.
Thank you.