1
00:00:05 --> 00:00:05.98
Hi.
2
00:00:05.98 --> 00:00:11
This is the first lecture in
MIT's course 18.06,
3
00:00:11 --> 00:00:15
linear algebra,
and I'm Gilbert Strang.
4
00:00:15 --> 00:00:21
The text for the course is this
book, Introduction to Linear
5
00:00:21 --> 00:00:22
Algebra.
6
00:00:22 --> 00:00:27.56
And the course web page,
which has got a lot of
7
00:00:27.56 --> 00:00:32
exercises from the past,
MatLab codes,
8
00:00:32 --> 00:00:38
the syllabus for the course,
is web.mit.edu/18.06.
9
00:00:38 --> 00:00:42.97
And this is the first lecture,
lecture one.
10
00:00:42.97 --> 00:00:49
So, and later we'll give the
web address for viewing these,
11
00:00:49 --> 00:00:50
videotapes.
12
00:00:50 --> 00:00:55
Okay, so what's in the first
lecture?
13
00:00:55 --> 00:00:57
This is my plan.
14
00:00:57 --> 00:01:01
The fundamental problem of
linear algebra,
15
00:01:01 --> 00:01:05
which is to solve a system of
linear equations.
16
00:01:05 --> 00:01:10
So let's start with a case when
we have some number of
17
00:01:10 --> 00:01:14
equations, say n equations and n
unknowns.
18
00:01:14 --> 00:01:20
So an equal number of equations
and unknowns.
19
00:01:20 --> 00:01:22
That's the normal,
nice case.
20
00:01:22 --> 00:01:25.99
And what I want to do is --
with examples,
21
00:01:25.99 --> 00:01:30
of course -- to describe,
first, what I call the Row
22
00:01:30 --> 00:01:31.02
picture.
23
00:01:31.02 --> 00:01:34
That's the picture of one
equation at a time.
24
00:01:34 --> 00:01:39
It's the picture you've seen
before in two by two equations
25
00:01:39 --> 00:01:42
where lines meet.
26
00:01:42 --> 00:01:45
So in a minute,
you'll see lines meeting.
27
00:01:45 --> 00:01:49
The second picture,
I'll put a star beside that,
28
00:01:49 --> 00:01:53.03
because that's such an
important one.
29
00:01:53.03 --> 00:01:58
And maybe new to you is the
picture -- a column at a time.
30
00:01:58 --> 00:02:02
And those are the rows and
columns of a matrix.
31
00:02:02 --> 00:02:08
So the third -- the algebra way
to look at the problem is the
32
00:02:08 --> 00:02:12
matrix form and using a matrix
that I'll call A.
33
00:02:12 --> 00:02:15
Okay, so can I do an example?
34
00:02:15 --> 00:02:20
The whole semester will be
examples and then see what's
35
00:02:20 --> 00:02:22
going on with the example.
36
00:02:22 --> 00:02:24.36
So, take an example.
37
00:02:24.36 --> 00:02:27.8
Two equations,
two unknowns.
38
00:02:27.8 --> 00:02:33
So let me take 2x -y =0,
let's say.
39
00:02:33 --> 00:02:34
And -x 2y=3.
40
00:02:34 --> 00:02:40
Okay.
let me -- I can even say right
41
00:02:40 --> 00:02:48
away -- what's the matrix,
that is, what's the coefficient
42
00:02:48 --> 00:02:50
matrix?
43
00:02:50 --> 00:02:57
The matrix that involves these
numbers --
44
00:02:57 --> 00:03:01
a matrix is just a rectangular
array of numbers.
45
00:03:01 --> 00:03:06.67
Here it's two rows and two
columns, so 2 and -- minus 1 in
46
00:03:06.67 --> 00:03:10
the first row minus 1 and 2 in
the second row,
47
00:03:10 --> 00:03:12
that's the matrix.
48
00:03:12 --> 00:03:15
And the right-hand -- the,
unknown -- well,
49
00:03:15 --> 00:03:18
we've got two unknowns.
50
00:03:18 --> 00:03:23
So we've got a vector,
with two components,
51
00:03:23 --> 00:03:29
x and x, and we've got two
right-hand sides that go into a
52
00:03:29 --> 00:03:30
vector 0 3.
53
00:03:30 --> 00:03:35
I couldn't resist writing the
matrix form, right -- even
54
00:03:35 --> 00:03:38
before the pictures.
55
00:03:38 --> 00:03:42
So I always will think of this
as the matrix A,
56
00:03:42 --> 00:03:46
the matrix of coefficients,
then there's a vector of
57
00:03:46 --> 00:03:46
unknowns.
58
00:03:46 --> 00:03:49
Here we've only got two
unknowns.
59
00:03:49 --> 00:03:52
Later we'll have any number of
unknowns.
60
00:03:52 --> 00:03:56
And that vector of unknowns,
well I'll often -- I'll make
61
00:03:56 --> 00:03:58
that x -- extra bold.
62
00:03:58 --> 00:04:04.38
A and the right-hand side is
also a vector that I'll always
63
00:04:04.38 --> 00:04:05
call b.
64
00:04:05 --> 00:04:10
So linear equations are A x
equal b and the idea now is to
65
00:04:10 --> 00:04:15
solve this particular example
and then step back to see the
66
00:04:15 --> 00:04:17
bigger picture.
67
00:04:17 --> 00:04:21
Okay, what's the picture for
this example,
68
00:04:21 --> 00:04:22
the Row picture?
69
00:04:22 --> 00:04:27
Okay, so here comes the Row
picture.
70
00:04:27 --> 00:04:34.43
So that means I take one row at
a time and I'm drawing here the
71
00:04:34.43 --> 00:04:41
xy plane and I'm going to plot
all the points that satisfy that
72
00:04:41 --> 00:04:43
first equation.
73
00:04:43 --> 00:04:49
So I'm looking at all the
points that satisfy 2x-y =0.
74
00:04:49 --> 00:04:55
It's often good to start with
which point on the horizontal
75
00:04:55 --> 00:04:59
line --
on this horizontal line,
76
00:04:59 --> 00:05:00
y is zero.
77
00:05:00 --> 00:05:05
The x axis has y as zero and
that -- in this case,
78
00:05:05 --> 00:05:07
actually, then x is zero.
79
00:05:07 --> 00:05:10
So the point,
the origin -- the point with
80
00:05:10 --> 00:05:13
coordinates (0,0) is on the
line.
81
00:05:13 --> 00:05:15
It solves that equation.
82
00:05:15 --> 00:05:21
Okay, tell me in --
well, I guess I have to tell
83
00:05:21 --> 00:05:25
you another point that solves
this same equation.
84
00:05:25 --> 00:05:30
Let me suppose x is one,
so I'll take x to be one.
85
00:05:30 --> 00:05:33
Then y should be two,
right?
86
00:05:33 --> 00:05:38
So there's the point one two
that also solves this equation.
87
00:05:38 --> 00:05:42
And I could put in more points.
88
00:05:42 --> 00:05:45
But, but let me put in all the
points at once,
89
00:05:45 --> 00:05:48
because they all lie on a
straight line.
90
00:05:48 --> 00:05:52.62
This is a linear equation and
that word linear got the letters
91
00:05:52.62 --> 00:05:53
for line in it.
92
00:05:53 --> 00:05:56
That's the equation -- this is
the line that ...
93
00:05:56 --> 00:06:00
of solutions to 2x-y=0 my first
row, first equation.
94
00:06:00 --> 00:06:04
So typically,
maybe, x equal a half,
95
00:06:04 --> 00:06:07
y equal one will work.
96
00:06:07 --> 00:06:10
And sure enough it does.
97
00:06:10 --> 00:06:13
Okay, that's the first one.
98
00:06:13 --> 00:06:19
Now the second one is not going
to go through the origin.
99
00:06:19 --> 00:06:22
It's always important.
100
00:06:22 --> 00:06:25
Do we go through the origin or
not?
101
00:06:25 --> 00:06:28
In this case,
yes, because there's a zero
102
00:06:28 --> 00:06:29
over there.
103
00:06:29 --> 00:06:33
In this case we don't go
through the origin,
104
00:06:33 --> 00:06:37
because if x and y are zero,
we don't get three.
105
00:06:37 --> 00:06:42
So, let me again say suppose y
is zero, what x do we actually
106
00:06:42 --> 00:06:43
get?
107
00:06:43 --> 00:06:47
If y is zero,
then I get x is minus three.
108
00:06:47 --> 00:06:50
So if y is zero,
I go along minus three.
109
00:06:50 --> 00:06:54.59
So there's one point on this
second line.
110
00:06:54.59 --> 00:06:58
Now let me say,
well, suppose x is minus one --
111
00:06:58 --> 00:07:00
just to take another x.
112
00:07:00 --> 00:07:05
If x is minus one,
then this is a one and I think
113
00:07:05 --> 00:07:10
y should be a one,
because if x is minus one,
114
00:07:10 --> 00:07:14
then I think y should be a one
and we'll get that point.
115
00:07:14 --> 00:07:15.85
Is that right?
116
00:07:15.85 --> 00:07:18
If x is minus one,
that's a one.
117
00:07:18 --> 00:07:21
If y is a one,
that's a two and the one and
118
00:07:21 --> 00:07:26.8
the two make three and that
point's on the equation.
119
00:07:26.8 --> 00:07:27
Okay.
120
00:07:27 --> 00:07:30.73
Now, I should just draw the
line, right, connecting those
121
00:07:30.73 --> 00:07:33
two points at -- that will give
me the whole line.
122
00:07:33 --> 00:07:36
And if I've done this
reasonably well,
123
00:07:36 --> 00:07:39
I think it's going to happen to
go through -- well,
124
00:07:39 --> 00:07:43
not happen -- it was arranged
to go through that point.
125
00:07:43 --> 00:07:49
So I think that the second line
is this one, and this is the
126
00:07:49 --> 00:07:53
all-important point that lies on
both lines.
127
00:07:53 --> 00:07:59
Shall we just check that that
point which is the point x equal
128
00:07:59 --> 00:08:01
one and y was two,
right?
129
00:08:01 --> 00:08:05.43
That's the point there and
that, I believe,
130
00:08:05.43 --> 00:08:08
solves both equations.
131
00:08:08 --> 00:08:11
Let's just check this.
132
00:08:11 --> 00:08:16
If x is one,
I have a minus one plus four
133
00:08:16 --> 00:08:18
equals three,
okay.
134
00:08:18 --> 00:08:25
Apologies for drawing this
picture that you've seen before.
135
00:08:25 --> 00:08:30.75
But this -- seeing the row
picture --
136
00:08:30.75 --> 00:08:32
first of all,
for n equal 2,
137
00:08:32 --> 00:08:36
two equations and two unknowns,
it's the right place to start.
138
00:08:36 --> 00:08:36.97
Okay.
139
00:08:36.97 --> 00:08:38
So we've got the solution.
140
00:08:38 --> 00:08:40
The point that lies on both
lines.
141
00:08:40 --> 00:08:43
Now can I come to the column
picture?
142
00:08:43 --> 00:08:45
Pay attention,
this is the key point.
143
00:08:45 --> 00:08:48
So the column picture.
144
00:08:48 --> 00:08:52
I'm now going to look at the
columns of the matrix.
145
00:08:52 --> 00:08:55
I'm going to look at this part
and this part.
146
00:08:55 --> 00:09:00
I'm going to say that the x
part is really x times -- you
147
00:09:00 --> 00:09:04
see, I'm putting the two -- I'm
kind of getting the two
148
00:09:04 --> 00:09:09
equations at once --
that part and then I have a y
149
00:09:09 --> 00:09:15
and in the first equation it's
multiplying a minus one and in
150
00:09:15 --> 00:09:20
the second equation a two,
and on the right-hand side,
151
00:09:20 --> 00:09:21.67
zero and three.
152
00:09:21.67 --> 00:09:26
You see, the columns of the
matrix, the columns of A are
153
00:09:26 --> 00:09:31
here and the right-hand side b
is there.
154
00:09:31 --> 00:09:35
And now what is the equation
asking for?
155
00:09:35 --> 00:09:41
It's asking us to find --
somehow to combine that vector
156
00:09:41 --> 00:09:46
and this one in the right
amounts to get that one.
157
00:09:46 --> 00:09:52
It's asking us to find the
right linear combination -- this
158
00:09:52 --> 00:09:56
is called a linear combination.
159
00:09:56 --> 00:10:00
And it's the most fundamental
operation in the whole course.
160
00:10:00 --> 00:10:03
It's a linear combination of
the columns.
161
00:10:03 --> 00:10:06
That's what we're seeing on the
left side.
162
00:10:06 --> 00:10:10
Again, I don't want to write
down a big definition.
163
00:10:10 --> 00:10:12
You can see what it is.
164
00:10:12 --> 00:10:15
There's column one,
there's column two.
165
00:10:15 --> 00:10:19
I multiply by some numbers and
I add.
166
00:10:19 --> 00:10:24
That's a combination -- a
linear combination and I want to
167
00:10:24 --> 00:10:29
make those numbers the right
numbers to produce zero three.
168
00:10:29 --> 00:10:30
Okay.
169
00:10:30 --> 00:10:35
Now I want to draw a picture
that, represents what this --
170
00:10:35 --> 00:10:37
this is algebra.
171
00:10:37 --> 00:10:41
What's the geometry,
what's the picture that goes
172
00:10:41 --> 00:10:41.87
with it?
173
00:10:41.87 --> 00:10:42.22
Okay.
174
00:10:42.22 --> 00:10:45
So again, these vectors have
two components,
175
00:10:45 --> 00:10:47
so I better draw a picture like
that.
176
00:10:47 --> 00:10:49
So can I put down these
columns?
177
00:10:49 --> 00:10:53
I'll draw these columns as they
are, and then I'll do a
178
00:10:53 --> 00:10:55
combination of them.
179
00:10:55 --> 00:10:58
So the first column is over two
and down one,
180
00:10:58 --> 00:10:59
right?
181
00:10:59 --> 00:11:03
So there's the first column.
182
00:11:03 --> 00:11:05
The first column.
183
00:11:05 --> 00:11:06
Column one.
184
00:11:06 --> 00:11:10
It's the vector two minus one.
185
00:11:10 --> 00:11:17
The second column is -- minus
one is the first component and
186
00:11:17 --> 00:11:18
up two.
187
00:11:18 --> 00:11:19
It's here.
188
00:11:19 --> 00:11:22
There's column two.
189
00:11:22 --> 00:11:27
So this, again,
you see what its components
190
00:11:27 --> 00:11:29
are.
191
00:11:29 --> 00:11:33
Its components are minus one,
two.
192
00:11:33 --> 00:11:33
Good.
193
00:11:33 --> 00:11:35
That's this guy.
194
00:11:35 --> 00:11:39
Now I have to take a
combination.
195
00:11:39 --> 00:11:42
What combination shall I take?
196
00:11:42 --> 00:11:49
Why not the right combination,
what the hell?
197
00:11:49 --> 00:11:49
Okay.
198
00:11:49 --> 00:11:55
So the combination I'm going to
take is the right one to produce
199
00:11:55 --> 00:11:59
zero three and then we'll see it
happen in the picture.
200
00:11:59 --> 00:12:04
So the right combination is to
take x as one of those and two
201
00:12:04 --> 00:12:05.49
of these.
202
00:12:05.49 --> 00:12:11
It's because we already know
that that's the right x and y,
203
00:12:11 --> 00:12:15
so why not take the correct
combination here and see it
204
00:12:15 --> 00:12:15
happen?
205
00:12:15 --> 00:12:19
Okay, so how do I picture this
linear combination?
206
00:12:19 --> 00:12:23
So I start with this vector
that's already here -- so that's
207
00:12:23 --> 00:12:27
one of column one,
that's one times column one,
208
00:12:27 --> 00:12:28
right there.
209
00:12:28 --> 00:12:32
And now I want to add on --
so I'm going to hook the next
210
00:12:32 --> 00:12:37
vector onto the front of the
arrow will start the next vector
211
00:12:37 --> 00:12:38
and it will go this way.
212
00:12:38 --> 00:12:40
So let's see,
can I do it right?
213
00:12:40 --> 00:12:44
If I added on one of these
vectors, it would go left one
214
00:12:44 --> 00:12:49
and up two, so we'd go left one
and up two, so it would probably
215
00:12:49 --> 00:12:51
get us to there.
216
00:12:51 --> 00:12:53
Maybe I'll do dotted line for
that.
217
00:12:53 --> 00:12:54
Okay?
218
00:12:54 --> 00:12:57
That's one of column two tucked
onto the end,
219
00:12:57 --> 00:13:00
but I wanted to tuck on two of
column two.
220
00:13:00 --> 00:13:05
So that -- the second one --
we'll go up left one and up two
221
00:13:05 --> 00:13:05
also.
222
00:13:05 --> 00:13:07.3
It'll probably end there.
223
00:13:07.3 --> 00:13:09
And there's another one.
224
00:13:09 --> 00:13:13
So what I've put in here is two
of column two.
225
00:13:13 --> 00:13:14
Added on.
226
00:13:14 --> 00:13:17
And where did I end up?
227
00:13:17 --> 00:13:22
What are the coordinates of
this result?
228
00:13:22 --> 00:13:28
What do I get when I take one
of this plus two of that?
229
00:13:28 --> 00:13:31
I do get that,
of course.
230
00:13:31 --> 00:13:36.09
There it is,
x is zero, y is three,
231
00:13:36.09 --> 00:13:38
that's b.
232
00:13:38 --> 00:13:40
That's the answer we wanted.
233
00:13:40 --> 00:13:42
And how do I do it?
234
00:13:42 --> 00:13:45
You see I do it just like the
first component.
235
00:13:45 --> 00:13:49
I have a two and a minus two
that produces a zero,
236
00:13:49 --> 00:13:54
and in the second component I
have a minus one and a four,
237
00:13:54 --> 00:13:57
they combine to give the three.
238
00:13:57 --> 00:13:59
But look at this picture.
239
00:13:59 --> 00:14:02
So here's our key picture.
240
00:14:02 --> 00:14:08
I combine this column and this
column to get this guy.
241
00:14:08 --> 00:14:09
That was the b.
242
00:14:09 --> 00:14:12
That's the zero three.
243
00:14:12 --> 00:14:12
Okay.
244
00:14:12 --> 00:14:17.77
So that idea of linear
combination is crucial,
245
00:14:17.77 --> 00:14:23
and also -- do we want to think
about this question?
246
00:14:23 --> 00:14:26
Sure, why not.
247
00:14:26 --> 00:14:29
What are all the combinations?
248
00:14:29 --> 00:14:33
If I took -- can I go back to
xs and ys?
249
00:14:33 --> 00:14:38.8
This is a question for really
-- it's going to come up over
250
00:14:38.8 --> 00:14:42
and over, but why don't we see
it once now?
251
00:14:42 --> 00:14:48
If I took all the xs and all
the ys, all the combinations,
252
00:14:48 --> 00:14:52
what would be all the results?
253
00:14:52 --> 00:14:56.48
And, actually,
the result would be that I
254
00:14:56.48 --> 00:14:59.96
could get any right-hand side at
all.
255
00:14:59.96 --> 00:15:05
The combinations of this and
this would fill the whole plane.
256
00:15:05 --> 00:15:07
You can tuck that away.
257
00:15:07 --> 00:15:10
We'll, explore it further.
258
00:15:10 --> 00:15:16
But this idea of what linear
combination gives b and what do
259
00:15:16 --> 00:15:20
all the linear combinations
give,
260
00:15:20 --> 00:15:25
what are all the possible,
achievable right-hand sides be
261
00:15:25 --> 00:15:27.84
-- that's going to be basic.
262
00:15:27.84 --> 00:15:28.28
Okay.
263
00:15:28.28 --> 00:15:32
Can I move to three equations
and three unknowns?
264
00:15:32 --> 00:15:36
Because it's easy to picture
the two by two case.
265
00:15:36 --> 00:15:39
Let me do a three by three
example.
266
00:15:39 --> 00:15:44
Okay, I'll sort of start it the
same way,
267
00:15:44 --> 00:15:52
say maybe 2x-y and maybe I'll
take no zs as a zero and maybe a
268
00:15:52 --> 00:15:59
-x 2y and maybe a -z as a -- oh,
let me make that a minus one
269
00:15:59 --> 00:16:05
and, just for variety let me
take, -3z, -3ys,
270
00:16:05 --> 00:16:11
I should keep the ys in that
line, and 4zs is,
271
00:16:11 --> 00:16:13
say, 4.
272
00:16:13 --> 00:16:14
Okay.
273
00:16:14 --> 00:16:16
That's three equations.
274
00:16:16 --> 00:16:19
I'm in three dimensions,
x, y, z.
275
00:16:19 --> 00:16:22
And, I don't have a solution
yet.
276
00:16:22 --> 00:16:27
So I want to understand the
equations and then solve them.
277
00:16:27 --> 00:16:27
Okay.
278
00:16:27 --> 00:16:30
So how do I you understand
them?
279
00:16:30 --> 00:16:32
The row picture one way.
280
00:16:32 --> 00:16:38
The column picture is another
very important way.
281
00:16:38 --> 00:16:43
Just let's remember the matrix
form, here, because that's easy.
282
00:16:43 --> 00:16:46
The matrix form -- what's our
matrix A?
283
00:16:46 --> 00:16:51
Our matrix A is this right-hand
side, the two and the minus one
284
00:16:51 --> 00:16:56
and the zero from the first row,
the minus one and the two and
285
00:16:56 --> 00:16:59
the minus one from the second
row,
286
00:16:59 --> 00:17:04
the zero, the minus three and
the four from the third row.
287
00:17:04 --> 00:17:07
So it's a three by three
matrix.
288
00:17:07 --> 00:17:10
Three equations,
three unknowns.
289
00:17:10 --> 00:17:12
And what's our right-hand side?
290
00:17:12 --> 00:17:16
Of course, it's the vector,
zero minus one,
291
00:17:16 --> 00:17:16.63
four.
292
00:17:16.63 --> 00:17:17
Okay.
293
00:17:17 --> 00:17:21.13
So that's the way,
well, that's the short-hand to
294
00:17:21.13 --> 00:17:24
write out the three equations.
295
00:17:24 --> 00:17:30
But it's the picture that I'm
looking for today.
296
00:17:30 --> 00:17:33.96
Okay, so the row picture.
297
00:17:33.96 --> 00:17:39
All right, so I'm in three
dimensions, x,
298
00:17:39 --> 00:17:40
y and z.
299
00:17:40 --> 00:17:46.97
And I want to take those
equations one at a time and ask
300
00:17:46.97 --> 00:17:55
-- and make a picture of all the
points that satisfy --
301
00:17:55 --> 00:17:57
let's take equation number two.
302
00:17:57 --> 00:18:02
If I make a picture of all the
points that satisfy -- all the
303
00:18:02 --> 00:18:05
x, y, z points that solve this
equation -- well,
304
00:18:05 --> 00:18:08
first of all,
the origin is not one of them.
305
00:18:08 --> 00:18:12
x, y, z -- it being 0,
0, 0 would not solve that
306
00:18:12 --> 00:18:14
equation.
307
00:18:14 --> 00:18:18
So what are some points that do
solve the equation?
308
00:18:18 --> 00:18:22
Let's see, maybe if x is one,
y and z could be zero.
309
00:18:22 --> 00:18:24
That would work,
right?
310
00:18:24 --> 00:18:26
So there's one point.
311
00:18:26 --> 00:18:30
I'm looking at this second
equation, here,
312
00:18:30 --> 00:18:32
just, to start with.
313
00:18:32 --> 00:18:34
Let's see.
314
00:18:34 --> 00:18:38
Also, I guess,
if z could be one,
315
00:18:38 --> 00:18:44
x and y could be zero,
so that would just go straight
316
00:18:44 --> 00:18:46.38
up that axis.
317
00:18:46.38 --> 00:18:51
And, probably I'd want a third
point here.
318
00:18:51 --> 00:18:56
Let me take x to be zero,
z to be zero,
319
00:18:56 --> 00:19:02
then y would be minus a half,
right?
320
00:19:02 --> 00:19:07
So there's a third point,
somewhere -- oh my -- okay.
321
00:19:07 --> 00:19:07
Let's see.
322
00:19:07 --> 00:19:13
I want to put in all the points
that satisfy that equation.
323
00:19:13 --> 00:19:17
Do you know what that bunch of
points will be?
324
00:19:17 --> 00:19:18
It's a plane.
325
00:19:18 --> 00:19:22
If we have a linear equation,
then, fortunately,
326
00:19:22 --> 00:19:28
the graph of the thing,
the plot of all the points that
327
00:19:28 --> 00:19:30
solve it are a plane.
328
00:19:30 --> 00:19:36
These three points determine a
plane, but your lecturer is not
329
00:19:36 --> 00:19:41
Rembrandt and the art is going
to be the weak point here.
330
00:19:41 --> 00:19:45
So I'm just going to draw a
plane, right?
331
00:19:45 --> 00:19:48
There's a plane somewhere.
332
00:19:48 --> 00:19:49
That's my plane.
333
00:19:49 --> 00:19:54
That plane is all the points
that solves this guy.
334
00:19:54 --> 00:19:56
Then, what about this one?
335
00:19:56 --> 00:19:59
Two x minus y plus zero z.
336
00:19:59 --> 00:20:01
So z actually can be anything.
337
00:20:01 --> 00:20:06
Again, it's going to be another
plane.
338
00:20:06 --> 00:20:11
Each row in a three by three
problem gives us a plane in
339
00:20:11 --> 00:20:12.75
three dimensions.
340
00:20:12.75 --> 00:20:18
So this one is going to be some
other plane -- maybe I'll try to
341
00:20:18 --> 00:20:20
draw it like this.
342
00:20:20 --> 00:20:23
And those two planes meet in a
line.
343
00:20:23 --> 00:20:30
So if I have two equations,
just the first two equations in
344
00:20:30 --> 00:20:34
three dimensions,
those give me a line.
345
00:20:34 --> 00:20:38.73
The line where those two planes
meet.
346
00:20:38.73 --> 00:20:43
And now, the third guy is a
third plane.
347
00:20:43 --> 00:20:45
And it goes somewhere.
348
00:20:45 --> 00:20:51
Okay, those three things meet
in a point.
349
00:20:51 --> 00:20:55
Now I don't know where that
point is, frankly.
350
00:20:55 --> 00:20:57
But -- linear algebra will find
it.
351
00:20:57 --> 00:21:00
The main point is that the
three planes,
352
00:21:00 --> 00:21:04
because they're not parallel,
they're not special.
353
00:21:04 --> 00:21:09.45
They do meet in one point and
that's the solution.
354
00:21:09.45 --> 00:21:14
But, maybe you can see that
this row picture is getting a
355
00:21:14 --> 00:21:16
little hard to see.
356
00:21:16 --> 00:21:21
The row picture was a cinch
when we looked at two lines
357
00:21:21 --> 00:21:21
meeting.
358
00:21:21 --> 00:21:26
When we look at three planes
meeting, it's not so clear and
359
00:21:26 --> 00:21:32
in four dimensions probably a
little less clear.
360
00:21:32 --> 00:21:35.2
So, can I quit on the row
picture?
361
00:21:35.2 --> 00:21:40
Or quit on the row picture
before I've successfully found
362
00:21:40 --> 00:21:43
the point where the three planes
meet?
363
00:21:43 --> 00:21:49
All I really want to see is
that the row picture consists of
364
00:21:49 --> 00:21:54
three planes and,
if everything works right,
365
00:21:54 --> 00:21:59
three planes meet in one point
and that's a solution.
366
00:21:59 --> 00:22:03
Now, you can tell I prefer the
column picture.
367
00:22:03 --> 00:22:06
Okay, so let me take the column
picture.
368
00:22:06 --> 00:22:12.07
That's x times -- so there were
two xs in the first equation
369
00:22:12.07 --> 00:22:16
minus one x is,
and no xs in the third.
370
00:22:16 --> 00:22:19
It's just the first column of
that.
371
00:22:19 --> 00:22:21
And how many ys are there?
372
00:22:21 --> 00:22:27
There's minus one in the first
equations, two in the second and
373
00:22:27 --> 00:22:30
maybe minus three in the third.
374
00:22:30 --> 00:22:33
Just the second column of my
matrix.
375
00:22:33 --> 00:22:37
And z times no zs minus one zs
and four zs.
376
00:22:37 --> 00:22:43
And it's those three columns,
right, that I have to combine
377
00:22:43 --> 00:22:48
to produce the right-hand side,
which is zero minus one four.
378
00:22:48 --> 00:22:49
Okay.
379
00:22:49 --> 00:22:52.87
So what have we got on this
left-hand side?
380
00:22:52.87 --> 00:22:54
A linear combination.
381
00:22:54 --> 00:22:58
It's a linear combination now
of three vectors,
382
00:22:58 --> 00:23:03
and they happen to be -- each
one is a three dimensional
383
00:23:03 --> 00:23:07
vector,
so we want to know what
384
00:23:07 --> 00:23:10
combination of those three
vectors produces that one.
385
00:23:10 --> 00:23:13.64
Shall I try to draw the column
picture, then?
386
00:23:13.64 --> 00:23:17
So, since these vectors have
three components -- so it's some
387
00:23:17 --> 00:23:22
multiple -- let me draw in the
first column as before --
388
00:23:22 --> 00:23:25
x is two and y is minus one.
389
00:23:25 --> 00:23:28
Maybe there is the first
column.
390
00:23:28 --> 00:23:35
y -- the second column has
maybe a minus one and a two and
391
00:23:35 --> 00:23:41
the y is a minus three,
somewhere, there possibly,
392
00:23:41 --> 00:23:42
column two.
393
00:23:42 --> 00:23:49
And the third column has --
no zero minus one four,
394
00:23:49 --> 00:23:51
so how shall I draw that?
395
00:23:51 --> 00:23:54
So this was the first
component.
396
00:23:54 --> 00:23:58.73
The second component was a
minus one.
397
00:23:58.73 --> 00:24:00
Maybe up here.
398
00:24:00 --> 00:24:05
That's column three,
that's the column zero minus
399
00:24:05 --> 00:24:07
one and four.
400
00:24:07 --> 00:24:08
This guy.
401
00:24:08 --> 00:24:11
So, again, what's my problem?
402
00:24:11 --> 00:24:18
What this equation is asking me
to do is to combine these three
403
00:24:18 --> 00:24:24
vectors with a right combination
to produce this one.
404
00:24:24 --> 00:24:29
Well, you can see what the
right combination is,
405
00:24:29 --> 00:24:33
because in this special
problem,
406
00:24:33 --> 00:24:38
specially chosen by the
lecturer, that right-hand side
407
00:24:38 --> 00:24:43.77
that I'm trying to get is
actually one of these columns.
408
00:24:43.77 --> 00:24:46
So I know how to get that one.
409
00:24:46 --> 00:24:48
So what's the solution?
410
00:24:48 --> 00:24:51
What combination will work?
411
00:24:51 --> 00:24:55
I just want one of these and
none of these.
412
00:24:55 --> 00:25:00
So x should be zero,
y should be zero and z should
413
00:25:00 --> 00:25:00
be one.
414
00:25:00 --> 00:25:02
That's the combination.
415
00:25:02 --> 00:25:06
One of those is obviously the
right one.
416
00:25:06 --> 00:25:10.95
Column three is actually the
same as b in this particular
417
00:25:10.95 --> 00:25:11.65
problem.
418
00:25:11.65 --> 00:25:17
I made it work that way just so
we would get an answer,
419
00:25:17 --> 00:25:23
(0,0,1), so somehow that's the
point where those three planes
420
00:25:23 --> 00:25:26
met and I couldn't see it
before.
421
00:25:26 --> 00:25:32
Of course, I won't always be
able to see it from the column
422
00:25:32 --> 00:25:34
picture, either.
423
00:25:34 --> 00:25:38
It's the next lecture,
actually,
424
00:25:38 --> 00:25:43
which is about elimination,
which is the systematic way
425
00:25:43 --> 00:25:49
that everybody -- every bit of
software, too -- production,
426
00:25:49 --> 00:25:53
large-scale software would
solve the equations.
427
00:25:53 --> 00:25:56
So the lecture that's coming
up.
428
00:25:56 --> 00:26:02
If I was to add that to the
syllabus, will be about how to
429
00:26:02 --> 00:26:05
find x, y, z in all cases.
430
00:26:05 --> 00:26:11
Can I just think again,
though, about the big picture?
431
00:26:11 --> 00:26:17
By the big picture I mean let's
keep this same matrix on the
432
00:26:17 --> 00:26:24.12
left but imagine that we have a
different right-hand side.
433
00:26:24.12 --> 00:26:29
Oh, let me take a different
right-hand side.
434
00:26:29 --> 00:26:33
So I'll change that right-hand
side to something that actually
435
00:26:33 --> 00:26:35
is also pretty special.
436
00:26:35 --> 00:26:38
Let me change it to -- if I add
those first two columns,
437
00:26:38 --> 00:26:42
that would give me a one and a
one and a minus three.
438
00:26:42 --> 00:26:44
There's a very special
right-hand side.
439
00:26:44 --> 00:26:48.88
I just cooked it up by adding
this one to this one.
440
00:26:48.88 --> 00:26:54.17
Now, what's the solution with
this new right-hand side?
441
00:26:54.17 --> 00:26:59
The solution with this new
right-hand side is clear.
442
00:26:59 --> 00:27:02
took one of these and none of
those.
443
00:27:02 --> 00:27:06
So actually,
it just changed around to this
444
00:27:06 --> 00:27:11
when I took this new right-hand
side.
445
00:27:11 --> 00:27:11
Okay.
446
00:27:11 --> 00:27:17
So in the row picture,
I have three different planes,
447
00:27:17 --> 00:27:21
three new planes meeting now at
this point.
448
00:27:21 --> 00:27:27
In the column picture,
I have the same three columns,
449
00:27:27 --> 00:27:32
but now I'm combining them to
produce this guy,
450
00:27:32 --> 00:27:38
and it turned out that column
one plus column two which would
451
00:27:38 --> 00:27:43
be somewhere -- there is the
right column -- one of this and
452
00:27:43 --> 00:27:46
one of this would give me the
new b.
453
00:27:46 --> 00:27:46
Okay.
454
00:27:46 --> 00:27:49
So we squeezed in an extra
example.
455
00:27:49 --> 00:27:54.75
But now think about all bs,
all right-hand sides.
456
00:27:54.75 --> 00:28:02.06
Can I solve these equations for
every right-hand side?
457
00:28:02.06 --> 00:28:05.37
Can I ask that question?
458
00:28:05.37 --> 00:28:09
So that's the algebra question.
459
00:28:09 --> 00:28:13
Can I solve A x=b for every b?
460
00:28:13 --> 00:28:16
Let me write that down.
461
00:28:16 --> 00:28:24
Can I solve A x =b for every
right-hand side b?
462
00:28:24 --> 00:28:26
I mean, is there a solution?
463
00:28:26 --> 00:28:30
And then, if there is,
elimination will give me a way
464
00:28:30 --> 00:28:31
to find it.
465
00:28:31 --> 00:28:35
I really wanted to ask,
is there a solution for every
466
00:28:35 --> 00:28:37
right-hand side?
467
00:28:37 --> 00:28:41
So now, can I put that in
different words -- in this
468
00:28:41 --> 00:28:43
linear combination words?
469
00:28:43 --> 00:28:54
So in linear combination words,
do the linear combinations of
470
00:28:54 --> 00:29:00
the columns fill three
dimensional space?
471
00:29:00 --> 00:29:09
Every b means all the bs in
three dimensional space.
472
00:29:09 --> 00:29:20
Do you see that I'm just asking
the same question in different
473
00:29:20 --> 00:29:22
words?
474
00:29:22 --> 00:29:27
Solving A x -- A x -- that's
very important.
475
00:29:27 --> 00:29:32
A times x -- when I multiply a
matrix by a vector,
476
00:29:32 --> 00:29:36
I get a combination of the
columns.
477
00:29:36 --> 00:29:39
I'll write that down in a
moment.
478
00:29:39 --> 00:29:46
But in my column picture,
that's really what I'm doing.
479
00:29:46 --> 00:29:55.29
I'm taking linear combinations
of these three columns and I'm
480
00:29:55.29 --> 00:29:57
trying to find b.
481
00:29:57 --> 00:30:04
And, actually,
the answer for this matrix will
482
00:30:04 --> 00:30:05
be yes.
483
00:30:05 --> 00:30:14
For this matrix A -- for these
columns, the answer is yes.
484
00:30:14 --> 00:30:19
This matrix -- that I chose for
an example is a good matrix.
485
00:30:19 --> 00:30:21
A non-singular matrix.
486
00:30:21 --> 00:30:23
An invertible matrix.
487
00:30:23 --> 00:30:27
Those will be the matrices that
we like best.
488
00:30:27 --> 00:30:33
There could be other -- and we
will see other matrices where
489
00:30:33 --> 00:30:37
the answer becomes,
no -- oh, actually,
490
00:30:37 --> 00:30:40
you can see when it would
become no.
491
00:30:40 --> 00:30:42
What could go wrong?
492
00:30:42 --> 00:30:48
How could it go wrong that out
of these -- out of three columns
493
00:30:48 --> 00:30:53
and all their combinations --
when would I not be able to
494
00:30:53 --> 00:30:55
produce some b off here?
495
00:30:55 --> 00:30:58
When could it go wrong?
496
00:30:58 --> 00:31:02
Do you see that the
combinations -- let me say when
497
00:31:02 --> 00:31:05
it goes wrong.
498
00:31:05 --> 00:31:10
If these three columns all lie
in the same plane,
499
00:31:10 --> 00:31:16
then their combinations will
lie in that same plane.
500
00:31:16 --> 00:31:18.76
So then we're in trouble.
501
00:31:18.76 --> 00:31:25
If the three columns of my
matrix -- if those three vectors
502
00:31:25 --> 00:31:31
happen to lie in the same plane
-- for example,
503
00:31:31 --> 00:31:36
if column three is just the sum
of column one and column two,
504
00:31:36 --> 00:31:38
I would be in trouble.
505
00:31:38 --> 00:31:42
That would be a matrix A where
the answer would be no,
506
00:31:42 --> 00:31:47
because the combinations -- if
column three is in the same
507
00:31:47 --> 00:31:52
plane as column one and two,
I don't get anything new from
508
00:31:52 --> 00:31:53
that.
509
00:31:53 --> 00:31:58
All the combinations are in the
plane and only right-hand sides
510
00:31:58 --> 00:32:01
b that I could get would be the
ones in that plane.
511
00:32:01 --> 00:32:05
So I could solve it for some
right-hand sides,
512
00:32:05 --> 00:32:09
when b is in the plane,
but most right-hand sides would
513
00:32:09 --> 00:32:11
be out of the plane and
unreachable.
514
00:32:11 --> 00:32:14
So that would be a singular
case.
515
00:32:14 --> 00:32:17
The matrix would be not
invertible.
516
00:32:17 --> 00:32:22.07
There would not be a solution
for every b.
517
00:32:22.07 --> 00:32:25
The answer would become no for
that.
518
00:32:25 --> 00:32:26
Okay.
519
00:32:26 --> 00:32:32
I don't know -- shall we take
just a little shot at thinking
520
00:32:32 --> 00:32:34
about nine dimensions?
521
00:32:34 --> 00:32:39
Imagine that we have vectors
with nine components.
522
00:32:39 --> 00:32:45
Well, it's going to be hard to
visualize those.
523
00:32:45 --> 00:32:48
I don't pretend to do it.
524
00:32:48 --> 00:32:50
But somehow,
pretend you do.
525
00:32:50 --> 00:32:55
Pretend we have -- if this was
nine equations and nine
526
00:32:55 --> 00:32:59
unknowns, then we would have
nine columns,
527
00:32:59 --> 00:33:04
and each one would be a vector
in nine-dimensional space and we
528
00:33:04 --> 00:33:09
would be looking at their linear
combinations.
529
00:33:09 --> 00:33:13
So we would be having the
linear combinations of nine
530
00:33:13 --> 00:33:16
vectors in nine-dimensional
space, and we would be trying to
531
00:33:16 --> 00:33:20
find the combination that hit
the correct right-hand side b.
532
00:33:20 --> 00:33:23
And we might also ask the
question can we always do it?
533
00:33:23 --> 00:33:26
Can we get every right-hand
side b?
534
00:33:26 --> 00:33:30
And certainly it will depend on
those nine columns.
535
00:33:30 --> 00:33:34
Sometimes the answer will be
yes -- if I picked a random
536
00:33:34 --> 00:33:36
matrix, it would be yes,
actually.
537
00:33:36 --> 00:33:40
If I used MatLab and just used
the random command,
538
00:33:40 --> 00:33:44
picked out a nine by nine
matrix, I guarantee it would be
539
00:33:44 --> 00:33:44
good.
540
00:33:44 --> 00:33:48
It would be non-singular,
it would be invertible,
541
00:33:48 --> 00:33:50.28
all beautiful.
542
00:33:50.28 --> 00:33:57
But if I choose those columns
so that they're not independent,
543
00:33:57 --> 00:34:04.97
so that the ninth column is the
same as the eighth column,
544
00:34:04.97 --> 00:34:12
then it contributes nothing new
and there would be right-hand
545
00:34:12 --> 00:34:16
sides b that I couldn't get.
546
00:34:16 --> 00:34:21
Can you sort of think about
nine vectors in nine-dimensional
547
00:34:21 --> 00:34:23
space an take their
combinations?
548
00:34:23 --> 00:34:28
That's really the central
thought -- that you get kind of
549
00:34:28 --> 00:34:30
used to in linear algebra.
550
00:34:30 --> 00:34:33.27
Even though you can't really
visualize it,
551
00:34:33.27 --> 00:34:37
you sort of think you can after
a while.
552
00:34:37 --> 00:34:42
Those nine columns and all
their combinations may very well
553
00:34:42 --> 00:34:45
fill out the whole
nine-dimensional space.
554
00:34:45 --> 00:34:50
But if the ninth column
happened to be the same as the
555
00:34:50 --> 00:34:56
eighth column and gave nothing
new, then probably what it would
556
00:34:56 --> 00:35:01
fill out would be -- I hesitate
even to say this --
557
00:35:01 --> 00:35:06
it would be a sort of a plane
-- an eight dimensional plane
558
00:35:06 --> 00:35:08
inside nine-dimensional space.
559
00:35:08 --> 00:35:12
And it's those eight
dimensional planes inside
560
00:35:12 --> 00:35:17
nine-dimensional space that we
have to work with eventually.
561
00:35:17 --> 00:35:22
For now, let's stay with a nice
case where the matrices work,
562
00:35:22 --> 00:35:27
we can get every right-hand
side b and here we see how to do
563
00:35:27 --> 00:35:29
it with columns.
564
00:35:29 --> 00:35:30.04
Okay.
565
00:35:30.04 --> 00:35:37
There was one step which I
realized I was saying in words
566
00:35:37 --> 00:35:41
that I now want to write in
letters.
567
00:35:41 --> 00:35:48
Because I'm coming back to the
matrix form of the equation,
568
00:35:48 --> 00:35:52
so let me write it here.
569
00:35:52 --> 00:35:58
The matrix form of my equation,
of my system is some matrix A
570
00:35:58 --> 00:36:02
times some vector x equals some
right-hand side b.
571
00:36:02 --> 00:36:03
Okay.
572
00:36:03 --> 00:36:05
So this is a multiplication.
573
00:36:05 --> 00:36:06
A times x.
574
00:36:06 --> 00:36:10
Matrix times vector,
and I just want to say how do
575
00:36:10 --> 00:36:13
you multiply a matrix by a
vector?
576
00:36:13 --> 00:36:18
Okay, so I'm just going to
create a matrix --
577
00:36:18 --> 00:36:25
let me take two five one three
-- and let me take a vector x to
578
00:36:25 --> 00:36:26
be, say, 1and 2.
579
00:36:26 --> 00:36:30
How do I multiply a matrix by a
vector?
580
00:36:30 --> 00:36:36
But just think a little bit
about matrix notation and how to
581
00:36:36 --> 00:36:39
do that in multiplication.
582
00:36:39 --> 00:36:45
So let me say how I multiply a
matrix by a vector.
583
00:36:45 --> 00:36:48
Actually, there are two ways to
do it.
584
00:36:48 --> 00:36:51
Let me tell you my favorite
way.
585
00:36:51 --> 00:36:53
It's columns again.
586
00:36:53 --> 00:36:55
It's a column at a time.
587
00:36:55 --> 00:36:59
For me, this matrix
multiplication says I take one
588
00:36:59 --> 00:37:04
of that column and two of that
column and add.
589
00:37:04 --> 00:37:09
So this is the way I would
think of it is one of the first
590
00:37:09 --> 00:37:13
column and two of the second
column and let's just see what
591
00:37:13 --> 00:37:14
we get.
592
00:37:14 --> 00:37:18
So in the first component I'm
getting a two and a ten.
593
00:37:18 --> 00:37:20
I'm getting a twelve there.
594
00:37:20 --> 00:37:24
In the second component I'm
getting a one and a six,
595
00:37:24 --> 00:37:26
I'm getting a seven.
596
00:37:26 --> 00:37:31
So that matrix times that
vector is twelve seven.
597
00:37:31 --> 00:37:35
Now, you could do that another
way.
598
00:37:35 --> 00:37:38
You could do it a row at a
time.
599
00:37:38 --> 00:37:44
And you would get this twelve
-- and actually I pretty much
600
00:37:44 --> 00:37:47
did it here -- this way.
601
00:37:47 --> 00:37:51
Two -- I could take that row
times my vector.
602
00:37:51 --> 00:37:53
This is the idea of a dot
product.
603
00:37:53 --> 00:37:57.91
This vector times this vector,
two times one plus five times
604
00:37:57.91 --> 00:37:59
two is the twelve.
605
00:37:59 --> 00:38:03
This vector times this vector
-- one times one plus three
606
00:38:03 --> 00:38:05
times two is the seven.
607
00:38:05 --> 00:38:11
So I can do it by rows,
and in each row times my x is
608
00:38:11 --> 00:38:14
what I'll later call a dot
product.
609
00:38:14 --> 00:38:18
But I also like to see it by
columns.
610
00:38:18 --> 00:38:23
I see this as a linear
combination of a column.
611
00:38:23 --> 00:38:25
So here's my point.
612
00:38:25 --> 00:38:31
A times x is a combination of
the columns of A.
613
00:38:31 --> 00:38:39
That's how I hope you will
think of A times x when we need
614
00:38:39 --> 00:38:39
it.
615
00:38:39 --> 00:38:46
Right now we've got -- with
small ones, we can always do it
616
00:38:46 --> 00:38:52
in different ways,
but later, think of it that
617
00:38:52 --> 00:38:53
way.
618
00:38:53 --> 00:38:53
Okay.
619
00:38:53 --> 00:39:01
So that's the picture for a two
by two system.
620
00:39:01 --> 00:39:07
And if the right-hand side B
happened to be twelve seven,
621
00:39:07 --> 00:39:14
then of course the correct
solution would be one two.
622
00:39:14 --> 00:39:14
Okay.
623
00:39:14 --> 00:39:20
So let me come back next time
to a systematic way,
624
00:39:20 --> 00:39:25.5
using elimination,
to find the solution,
625
00:39:25.5 --> 00:30:40
if there is one,
to a system of any size and
626
00:30:40 --> 00:17:37
find out -- because if
elimination fails,
627
00:17:37 --> 00:05:52
find out when there isn't a
solution.
628
00:05:52 --> 00:05:55
Okay, thanks.