1
00:00:10 --> 00:00:13
Are we ready?
2
00:00:13 --> 00:00:19
Okay, ready for me to start.
3
00:00:19 --> 00:00:28
Ready for the taping to start
in a minute.
4
00:00:28 --> 00:00:39
He's going to raise his hand
and signal when I'm on.
5
00:00:39 --> 00:00:50
Just a minute,
though, let them settle.0
6
00:00:50 --> 00:00:51
Okay, guys.
7
00:00:51 --> 00:00:57
Okay, give me the signal,
then, when you want me to
8
00:00:57 --> 00:00:57
start.
9
00:00:57 --> 00:01:02
Okay, this is linear algebra,
lecture four.
10
00:01:02 --> 00:01:09
And, the first thing I have to
do is something that was on the
11
00:01:09 --> 00:01:14
list for last time,
but here it is now.
12
00:01:14 --> 00:01:19
What's the inverse of a
product?
13
00:01:19 --> 00:01:24
If I multiply two matrices
together and I know their
14
00:01:24 --> 00:01:29
inverses, how do I get the
inverse of A times B?
15
00:01:29 --> 00:01:35
So I know what inverses mean
for a single matrix A and for a
16
00:01:35 --> 00:01:36
matrix B.
17
00:01:36 --> 00:01:42
What matrix do I multiply by to
get the identity if I have A B?
18
00:01:42 --> 00:01:47.19
Okay, that'll be simple but so
basic.
19
00:01:47.19 --> 00:01:51.87
Then I'm going to use that to
-- I will have a product of
20
00:01:51.87 --> 00:01:56
matrices and the product that
we'll meet will be these
21
00:01:56 --> 00:02:01
elimination matrices and the net
result of today's lectures is
22
00:02:01 --> 00:02:06
the big formula for elimination,
so the net result of today's
23
00:02:06 --> 00:02:12
lecture is this great way to
look at Gaussian elimination.
24
00:02:12 --> 00:02:16
We know that we get from A to U
by elimination.
25
00:02:16 --> 00:02:23
We know the steps -- but now we
get the right way to look at it,
26
00:02:23 --> 00:02:24
A equals L U.
27
00:02:24 --> 00:02:27
So that's the high point for
today.
28
00:02:27 --> 00:02:28
Okay.
29
00:02:28 --> 00:02:34
Can I take the easy part,
the first step first?
30
00:02:34 --> 00:02:39
So, suppose A is invertible --
and of course it's going to be a
31
00:02:39 --> 00:02:43
big question,
when is the matrix invertible?
32
00:02:43 --> 00:02:48
But let's say A is invertible
and B is invertible,
33
00:02:48 --> 00:02:52
then what matrix gives me the
inverse of A B?
34
00:02:52 --> 00:02:56
So that's the direct question.
35
00:02:56 --> 00:02:58
What's the inverse of A B?
36
00:02:58 --> 00:03:01
Do I multiply those separate
inverses?
37
00:03:01 --> 00:03:01
Yes.
38
00:03:01 --> 00:03:06
I multiply the two matrices A
inverse and B inverse,
39
00:03:06 --> 00:03:08
but what order do I multiply?
40
00:03:08 --> 00:03:10
In reverse order.
41
00:03:10 --> 00:03:11
And you see why.
42
00:03:11 --> 00:03:16
So the right thing to put here
is B inverse A inverse.
43
00:03:16 --> 00:03:19
That's the inverse I'm after.
44
00:03:19 --> 00:03:24
We can just check that A B
times that matrix gives the
45
00:03:24 --> 00:03:25
identity.
46
00:03:25 --> 00:03:26
Okay.
47
00:03:26 --> 00:03:30
So why -- once again,
it's this fact that I can move
48
00:03:30 --> 00:03:32
parentheses around.
49
00:03:32 --> 00:03:38
I can just erase them all and
do the multiplications any way I
50
00:03:38 --> 00:03:40
want to.
51
00:03:40 --> 00:03:44.49
So what's the right
multiplication to do first?
52
00:03:44.49 --> 00:03:46.1
B times B inverse.
53
00:03:46.1 --> 00:03:49
This product here I is the
identity.
54
00:03:49 --> 00:03:54.51
Then A times the identity is
the identity and then finally A
55
00:03:54.51 --> 00:03:57
times A inverse gives the
identity.
56
00:03:57 --> 00:04:02
So forgive the dumb example in
the book.
57
00:04:02 --> 00:04:08.01
Why do you, do the inverse
things in reverse order?
58
00:04:08.01 --> 00:04:15
It's just like -- you take off
your shoes, you take off your
59
00:04:15 --> 00:04:21
socks, then the good way to
invert that process is socks
60
00:04:21 --> 00:04:24
back on first,
then shoes.
61
00:04:24 --> 00:04:27
Sorry, okay.
62
00:04:27 --> 00:04:28
I'm sorry that's on the tape.
63
00:04:28 --> 00:04:31
And, of course,
on the other side we should
64
00:04:31 --> 00:04:35
really just check -- on the
other side I have B inverse,
65
00:04:35 --> 00:04:35
A inverse.
66
00:04:35 --> 00:04:38
That does multiply A B,
and this time it's these guys
67
00:04:38 --> 00:04:41
that give the identity,
squeeze down,
68
00:04:41 --> 00:04:44
they give the identity,
we're in shape.
69
00:04:44 --> 00:04:44
Okay.
70
00:04:44 --> 00:04:47
So there's the inverse.
71
00:04:47 --> 00:04:47
Good.
72
00:04:47 --> 00:04:52
While we're at it,
let me do a transpose,
73
00:04:52 --> 00:04:57
because the next lecture has
got a lot to -- involves
74
00:04:57 --> 00:04:59
transposes.
75
00:04:59 --> 00:05:04
So how do I -- if I transpose a
matrix,
76
00:05:04 --> 00:05:10
I'm talking about square,
invertible matrices right now.
77
00:05:10 --> 00:05:14
If I transpose one,
what's its inverse?
78
00:05:14 --> 00:05:18
Well, the nice formula is --
let's see.
79
00:05:18 --> 00:05:24
Let me start from A,
A inverse equal the identity.
80
00:05:24 --> 00:05:28
And let me transpose both
sides.
81
00:05:28 --> 00:05:32
That will bring a transpose
into the picture.
82
00:05:32 --> 00:05:38
So if I transpose the identity
matrix, what do I have?
83
00:05:38 --> 00:05:39
The identity,
right?
84
00:05:39 --> 00:05:45.47
If I exchange rows and columns,
the identity is a symmetric
85
00:05:45.47 --> 00:05:46
matrix.
86
00:05:46 --> 00:05:50
It doesn't know the difference.
87
00:05:50 --> 00:05:53
If I transpose these guys,
that product,
88
00:05:53 --> 00:05:58
then again it turns out that I
have to reverse the order.
89
00:05:58 --> 00:06:03
I can transpose them
separately, but when I multiply,
90
00:06:03 --> 00:06:07
those transposes come in the
opposite order.
91
00:06:07 --> 00:06:11
So it's A inverse transpose
times A transpose giving the
92
00:06:11 --> 00:06:13.68
identity.
93
00:06:13.68 --> 00:06:18
So that's -- this equation is
-- just comes directly from that
94
00:06:18 --> 00:06:18
one.
95
00:06:18 --> 00:06:22
But this equation tells me what
I wanted to know,
96
00:06:22 --> 00:06:25
namely what is the inverse of
this guy A transpose?
97
00:06:25 --> 00:06:29.73
What's the inverse of that --
if I transpose a matrix,
98
00:06:29.73 --> 00:06:33
what'ss the inverse of the
result?
99
00:06:33 --> 00:06:38
And this equation tells me that
here it is.
100
00:06:38 --> 00:06:42
This is the inverse of A
transpose.
101
00:06:42 --> 00:06:45
Inverse of A transpose.
102
00:06:45 --> 00:06:47
Of A transpose.
103
00:06:47 --> 00:06:55
So I'll put a big circle around
that, because that's the answer,
104
00:06:55 --> 00:07:01
that's the best answer we could
hope for.
105
00:07:01 --> 00:07:07
That if you want to know the
inverse of A transpose and you
106
00:07:07 --> 00:07:13
know the inverse of A,
then you just transpose that.
107
00:07:13 --> 00:07:19
So in a -- to put it another
way, transposing and inversing
108
00:07:19 --> 00:07:25
you can do in either order for a
single matrix.
109
00:07:25 --> 00:07:25
Okay.
110
00:07:25 --> 00:07:30
So these are like basic facts
that we can now use,
111
00:07:30 --> 00:07:33.54
all right -- so now I put it to
use.
112
00:07:33.54 --> 00:07:38.47
I put it to use by thinking --
we're really completing,
113
00:07:38.47 --> 00:07:40
the subject of elimination.
114
00:07:40 --> 00:07:46.14
Actually, -- the thing about
elimination is it's the right
115
00:07:46.14 --> 00:07:50
way to understand what the
matrix has got.
116
00:07:50 --> 00:08:00
This A equal L U is the most
basic factorization of a matrix.
117
00:08:00 --> 00:08:09
I always worry that you will
think this course is all
118
00:08:09 --> 00:08:11
elimination.
119
00:08:11 --> 00:08:15
It's just row operations.
120
00:08:15 --> 00:08:19
And please don't.
121
00:08:19 --> 00:08:23
We'll be beyond that,
but it's the right algebra to
122
00:08:23 --> 00:08:24
do first.
123
00:08:24 --> 00:08:24
Okay.
124
00:08:24 --> 00:08:30
So, now I'm coming near the end
of it, but I want to get it in a
125
00:08:30 --> 00:08:31
decent form.
126
00:08:31 --> 00:08:34.6
So my decent form is matrix
form.
127
00:08:34.6 --> 00:08:38
I have a matrix A,
let's suppose it's a good
128
00:08:38 --> 00:08:44
matrix, I can do elimination,
no row exchanges --
129
00:08:44 --> 00:08:47
So no row exchanges for now.
130
00:08:47 --> 00:08:52
Pivots all fine,
nothing zero in the pivot
131
00:08:52 --> 00:08:53.25
position.
132
00:08:53.25 --> 00:08:57
I get to the very end,
which is U.
133
00:08:57 --> 00:08:59
So I get from A to U.
134
00:08:59 --> 00:09:05.35
And I want to know what's the
connection?
135
00:09:05.35 --> 00:09:07
How is A related to U?
136
00:09:07 --> 00:09:13.64
And this is going to tell me
that there's a matrix L that
137
00:09:13.64 --> 00:09:15
connects them.
138
00:09:15 --> 00:09:15.66
Okay.
139
00:09:15.66 --> 00:09:19
Can I do it for a two by two
first?
140
00:09:19 --> 00:09:19
Okay.
141
00:09:19 --> 00:09:22
Two by two, elimination.
142
00:09:22 --> 00:09:25
Okay, so I'll do it under here.
143
00:09:25 --> 00:09:26
Okay.
144
00:09:26 --> 00:09:31
So let my matrix A be --
We'll keep it simple,
145
00:09:31 --> 00:09:35
say two and an eight,
so we know that the first pivot
146
00:09:35 --> 00:09:39
is a two, and the multiplier's
going to be a four and then let
147
00:09:39 --> 00:09:43
me put a one here and what
number do I not want to put
148
00:09:43 --> 00:09:44
there?
149
00:09:44 --> 00:09:44
Four.
150
00:09:44 --> 00:09:48.14
I don't want a four there,
because in that case,
151
00:09:48.14 --> 00:09:54
the second pivot would not --
we wouldn't have a second
152
00:09:54 --> 00:09:54.89
pivot.
153
00:09:54.89 --> 00:10:00
The matrix would be singular,
general screw-up.
154
00:10:00 --> 00:10:01
Okay.
155
00:10:01 --> 00:10:06
So let me put some other number
here like seven.
156
00:10:06 --> 00:10:07
Okay.
157
00:10:07 --> 00:10:07
Okay.
158
00:10:07 --> 00:10:15
Now I want to operate on that
with my elementary matrix.
159
00:10:15 --> 00:10:18
So what's the elementary
matrix?
160
00:10:18 --> 00:10:22
Strictly speaking,
it's E21, because it's the guy
161
00:10:22 --> 00:10:25
that's going to produce a zero
in that position.
162
00:10:25 --> 00:10:30
And it's going to produce U in
one shot, because it's just a
163
00:10:30 --> 00:10:32
two by two matrix.
164
00:10:32 --> 00:10:37.46
So two one and I'm going to
take four of those away from
165
00:10:37.46 --> 00:10:41.39
those, produce that zero and
leave a three there.
166
00:10:41.39 --> 00:10:42
And that's U.
167
00:10:42 --> 00:10:45
And what's the matrix that did
it?
168
00:10:45 --> 00:10:46
Quick review,
then.
169
00:10:46 --> 00:10:50
What's the elimination
elementary matrix E21 -- it's
170
00:10:50 --> 00:10:52
one zero, thanks.
171
00:10:52 --> 00:10:55
And --
negative four one,
172
00:10:55 --> 00:10:55
right.
173
00:10:55 --> 00:10:56
Good.
174
00:10:56 --> 00:10:56
Okay.
175
00:10:56 --> 00:11:01.71
So that -- you see the
difference between this and what
176
00:11:01.71 --> 00:11:03
I'm shooting for.
177
00:11:03 --> 00:11:08
I'm shooting for A on one side
and the other matrices on the
178
00:11:08 --> 00:11:11
other side of the equation.
179
00:11:11 --> 00:11:12
Okay.
180
00:11:12 --> 00:11:15
So I can do that right away.
181
00:11:15 --> 00:11:19
Now here's going to be my A
equals L U.
182
00:11:19 --> 00:11:26
And you won't have any trouble
telling me what -- so A is still
183
00:11:26 --> 00:11:28
two one eight seven.
184
00:11:28 --> 00:11:34
L is what you're going to tell
me and U is still two one zero
185
00:11:34 --> 00:11:35
three.
186
00:11:35 --> 00:11:35
Okay.
187
00:11:35 --> 00:11:39.7
So what's L in this case?
188
00:11:39.7 --> 00:11:43
Well, first -- so how is L
related to this E guy?
189
00:11:43 --> 00:11:47
It's the inverse,
because I want to multiply
190
00:11:47 --> 00:11:52
through by the inverse of this,
which will put the identity
191
00:11:52 --> 00:11:58
here, and the inverse will show
up there and I'll call it L.
192
00:11:58 --> 00:12:01
So what is the inverse of this?
193
00:12:01 --> 00:12:10
Remember those elimination
matrices are easy to invert.
194
00:12:10 --> 00:12:20
The inverse matrix for this one
is 1 0 4 1, it's actually flip
195
00:12:20 --> 00:12:22
sign.
196
00:12:22 --> 00:12:22
Okay.
197
00:12:22 --> 00:12:25.93
Do you want -- if we did the
numbers right,
198
00:12:25.93 --> 00:12:28
we must -- this should be
correct.
199
00:12:28 --> 00:12:28
Okay.
200
00:12:28 --> 00:12:30
And of course it is.
201
00:12:30 --> 00:12:34
That says the first row's
right, four times the first row
202
00:12:34 --> 00:12:37
plus the second row is eight
seven.
203
00:12:37 --> 00:12:38.04
Good.
204
00:12:38.04 --> 00:12:38
Okay.
205
00:12:38 --> 00:12:41
That's simple,
two by two.
206
00:12:41 --> 00:12:45
But it already shows the form
that we're headed for.
207
00:12:45 --> 00:12:48.45
It shows -- so what's the L
stand for?
208
00:12:48.45 --> 00:12:49
Why the letter L?
209
00:12:49 --> 00:12:53
If U stood for upper
triangular, then of course L
210
00:12:53 --> 00:12:55
stands for lower triangular.
211
00:12:55 --> 00:12:58
And actually,
it has ones on the diagonal,
212
00:12:58 --> 00:13:03
where this thing has the pivots
on the diagonal.
213
00:13:03 --> 00:13:08
Oh, sometimes we may want to
separate out the pivots,
214
00:13:08 --> 00:13:14
so can I just mention that
sometimes we could also write
215
00:13:14 --> 00:13:20
this as -- we could have this
one zero four one -- I'll just
216
00:13:20 --> 00:13:27
show you how I would divide out
this matrix of pivots -- two
217
00:13:27 --> 00:13:28
three.
218
00:13:28 --> 00:13:31
There's a diagonal matrix.
219
00:13:31 --> 00:13:34
And I just -- whatever is left
is here.
220
00:13:34 --> 00:13:36
Now what's left?
221
00:13:36 --> 00:13:40
If I divide this first row by
two to pull out the two,
222
00:13:40 --> 00:13:43
then I have a one and a one
half.
223
00:13:43 --> 00:13:49
And if I divide the second row
by three to pull out the three,
224
00:13:49 --> 00:13:52
then I have a one.
225
00:13:52 --> 00:13:57
So if this is L U,
this is maybe called L D or
226
00:13:57 --> 00:13:58.05
pivot U.
227
00:13:58.05 --> 00:14:04
And now it's a little more
balanced, because we have ones
228
00:14:04 --> 00:14:07
on the diagonal here and here.
229
00:14:07 --> 00:14:12.09
And the diagonal matrix in the
middle.
230
00:14:12.09 --> 00:14:14
So both of those...
231
00:14:14 --> 00:14:19
Matlab would produce either
one.
232
00:14:19 --> 00:14:21
I'll basically stay with L U.
233
00:14:21 --> 00:14:22
Okay.
234
00:14:22 --> 00:14:26
Now I have to think about
bigger than two by two.
235
00:14:26 --> 00:14:30
But right now,
this was just like easy
236
00:14:30 --> 00:14:31
exercise.
237
00:14:31 --> 00:14:36
And, to tell the truth,
this one was a minus sign and
238
00:14:36 --> 00:14:38
this one was a plus sign.
239
00:14:38 --> 00:14:42
I mean, that's the only
difference.
240
00:14:42 --> 00:14:49
But, with three by three,
there's a more significant
241
00:14:49 --> 00:14:50
difference.
242
00:14:50 --> 00:14:54
Let me show you how that works.
243
00:14:54 --> 00:15:02
Let me move up to a three by
three, let's say some matrix A,
244
00:15:02 --> 00:15:03.03
okay?
245
00:15:03.03 --> 00:15:08
Let's imagine it's three by
three.
246
00:15:08 --> 00:15:11
I won't write numbers down for
now.
247
00:15:11 --> 00:15:15
So what's the first elimination
step that I do,
248
00:15:15 --> 00:15:21
the first matrix I multiply it
by, what letter will I use for
249
00:15:21 --> 00:15:21
that?
250
00:15:21 --> 00:15:25
It'll be E two one,
because it's --
251
00:15:25 --> 00:15:30
the first step will be to get a
zero in that two one position.
252
00:15:30 --> 00:15:34.99
And then the next step will be
to get a zero in the three one
253
00:15:34.99 --> 00:15:35
position.
254
00:15:35 --> 00:15:40.17
And the final step will be to
get a zero in the three two
255
00:15:40.17 --> 00:15:40
position.
256
00:15:40 --> 00:15:45
That's what elimination is,
and it produced U.
257
00:15:45 --> 00:15:48.04
And again, no row exchanges.
258
00:15:48.04 --> 00:15:52.69
I'm taking the nice case,
now, the typical case,
259
00:15:52.69 --> 00:15:57
too -- when I don't have to do
any row exchange,
260
00:15:57 --> 00:16:00
all I do is these elimination
steps.
261
00:16:00 --> 00:16:01
Okay.
262
00:16:01 --> 00:16:07
Now, suppose I want that stuff
over on the right-hand side,
263
00:16:07 --> 00:16:09.61
as I really do.
264
00:16:09.61 --> 00:16:12
That's, like,
my point here.
265
00:16:12 --> 00:16:16.7
I can multiply these together
to get a matrix E,
266
00:16:16.7 --> 00:16:19
but I want it over on the
right.
267
00:16:19 --> 00:16:22
I want its inverse over there.
268
00:16:22 --> 00:16:26
So what's the right expression
now?
269
00:16:26 --> 00:16:30.38
If I write A and U,
what goes there?
270
00:16:30.38 --> 00:16:30
Okay.
271
00:16:30 --> 00:16:37
So I've got the inverse of
this, I've got three matrices in
272
00:16:37 --> 00:16:38
a row now.
273
00:16:38 --> 00:16:43
And it's their inverses that
are going to show up,
274
00:16:43 --> 00:16:48
because each one is easy to
invert.
275
00:16:48 --> 00:16:50
Question is,
what about the whole bunch?
276
00:16:50 --> 00:16:53
How easy is it to invert the
whole bunch?
277
00:16:53 --> 00:16:56
So, that's what we know how to
do.
278
00:16:56 --> 00:17:00
We know how to invert,
we should take the separate
279
00:17:00 --> 00:17:03
inverses, but they go in the
opposite order.
280
00:17:03 --> 00:17:05.5
So what goes here?
281
00:17:05.5 --> 00:17:09
E three two inverse,
right, because I'll multiply
282
00:17:09 --> 00:17:14
from the left by E three two
inverse, then I'll pop it up
283
00:17:14 --> 00:17:15.7
next to U.
284
00:17:15.7 --> 00:17:19.1
And then will come E three one
inverse.
285
00:17:19.1 --> 00:17:24.11
And then this'll be the only
guy left standing and that's
286
00:17:24.11 --> 00:17:28
gone when Ido an E two one
inverse.
287
00:17:28 --> 00:17:29
So there is L.
288
00:17:29 --> 00:17:31
That's L U.
289
00:17:31 --> 00:17:34
L is product of inverses.
290
00:17:34 --> 00:17:41
Now you still can ask why is
this guy preferring inverses?
291
00:17:41 --> 00:17:43
And let me explain why.
292
00:17:43 --> 00:17:50
Let me explain why is this
product nicer than this one?
293
00:17:50 --> 00:17:57.38
This product turns out to be
better than this one.
294
00:17:57.38 --> 00:18:00
Let me take a typical case
here.
295
00:18:00 --> 00:18:03
Let me take a typical case.
296
00:18:03 --> 00:18:10
So let me -- I have to do three
by three for you to see the
297
00:18:10 --> 00:18:11.89
improvement.
298
00:18:11.89 --> 00:18:17
Two by two, it was just one E,
no problem.
299
00:18:17 --> 00:18:21
But let me go up to this case.
300
00:18:21 --> 00:18:29
Suppose my matrices E21 --
suppose E21 has a minus two in
301
00:18:29 --> 00:18:30
there.
302
00:18:30 --> 00:18:39
Suppose that -- and now suppose
-- oh, I'll even suppose E31 is
303
00:18:39 --> 00:18:41
the identity.
304
00:18:41 --> 00:18:46
I'm going to make the point
with just a couple of these.
305
00:18:46 --> 00:18:47
Okay.
306
00:18:47 --> 00:18:52
Now this guy will have -- do
something -- now let's suppose
307
00:18:52 --> 00:18:53
minus five one.
308
00:18:53 --> 00:18:53
Okay.
309
00:18:53 --> 00:18:55
There's typical.
310
00:18:55 --> 00:18:59.77
That's a typical case in which
we didn't need an E31.
311
00:18:59.77 --> 00:19:04
Maybe we already had a zero in
that three one position.
312
00:19:04 --> 00:19:06
Okay.
313
00:19:06 --> 00:19:09
Let me see -- is that going to
be enough to,
314
00:19:09 --> 00:19:10
show my point?
315
00:19:10 --> 00:19:13.18
Let me do that multiplication.
316
00:19:13.18 --> 00:19:13
Okay.
317
00:19:13 --> 00:19:18
So if I do that multiplication
it's like good practice to
318
00:19:18 --> 00:19:20
multiply these matrices.
319
00:19:20 --> 00:19:24
Tell me what's above the
diagonal when I do this
320
00:19:24 --> 00:19:26.22
multiplication?
321
00:19:26.22 --> 00:19:27
All zeroes.
322
00:19:27 --> 00:19:33
When I do this multiplication,
I'm going to get ones on the
323
00:19:33 --> 00:19:35
diagonal and zeroes above.
324
00:19:35 --> 00:19:38
Because -- what does that say?
325
00:19:38 --> 00:19:44
That says that I'm subtracting
rows from lower rows.
326
00:19:44 --> 00:19:48
So nothing is moving upwards as
it did last time in
327
00:19:48 --> 00:19:49
Gauss-Jordan.
328
00:19:49 --> 00:19:50
Okay.
329
00:19:50 --> 00:19:54
Now -- so really,
what I have to do is check this
330
00:19:54 --> 00:19:57
minus two one zero,
now this is -- what's that
331
00:19:57 --> 00:19:58.49
number?
332
00:19:58.49 --> 00:20:03
This is the number that I'm
really have in mind.
333
00:20:03 --> 00:20:05
That number is ten.
334
00:20:05 --> 00:20:09
And this one is -- what goes
here?
335
00:20:09 --> 00:20:16
Row three against column two,
it looks like the minus five.
336
00:20:16 --> 00:20:17
It's that ten.
337
00:20:17 --> 00:20:21
How did that ten get in there?
338
00:20:21 --> 00:20:23
I don't like that ten.
339
00:20:23 --> 00:20:28
I mean -- of course,
I don't want to erase it,
340
00:20:28 --> 00:20:32
because it's right.
341
00:20:32 --> 00:20:34
But I don't want it there.
342
00:20:34 --> 00:20:40
It's because -- the ten got in
there because I subtracted two
343
00:20:40 --> 00:20:46
of row one from row two,
and then I subtracted five of
344
00:20:46 --> 00:20:49.56
that new row two from row three.
345
00:20:49.56 --> 00:20:54
So doing it in that order,
how did row one effect row
346
00:20:54 --> 00:20:56
three?
347
00:20:56 --> 00:20:59
Well, it did,
because two of it got removed
348
00:20:59 --> 00:21:04
from row two and then five of
those got removed from row
349
00:21:04 --> 00:21:04.77
three.
350
00:21:04.77 --> 00:21:09
So altogether ten of row one
got thrown into row three.
351
00:21:09 --> 00:21:14
Now my point is in the reverse
direction -- so now I can do it
352
00:21:14 --> 00:21:17
-- below it I'll do the
inverses.
353
00:21:17 --> 00:21:18
Okay.
354
00:21:18 --> 00:21:21
And, of course,
opposite order.
355
00:21:21 --> 00:21:22
Reverse order.
356
00:21:22 --> 00:21:24
Reverse order.
357
00:21:24 --> 00:21:24
Okay.
358
00:21:24 --> 00:21:30
So now this is going to -- this
is the E that goes on the left
359
00:21:30 --> 00:21:31
side.
360
00:21:31 --> 00:21:32
Left of A.
361
00:21:32 --> 00:21:38
Now I'm going to do the
inverses in the opposite order,
362
00:21:38 --> 00:21:43
so what's the --
So the opposite order means I
363
00:21:43 --> 00:21:45
put this inverse first.
364
00:21:45 --> 00:21:47
And what is its inverse?
365
00:21:47 --> 00:21:50
What's the inverse of E21?
366
00:21:50 --> 00:21:53.17
Same thing with a plus sign,
right?
367
00:21:53.17 --> 00:21:58
For the individual matrices,
instead of taking away two I
368
00:21:58 --> 00:22:03
add back two of row one to row
two, so no problem.
369
00:22:03 --> 00:22:09
And now, in reverse order,
I want to invert that.
370
00:22:09 --> 00:22:11
Just right?
371
00:22:11 --> 00:22:14
I'm doing just this,
this.
372
00:22:14 --> 00:22:23
So now the inverse is again the
same thing, but add in the five.
373
00:22:23 --> 00:22:29
And now I'll do that
multiplication and I'll get a
374
00:22:29 --> 00:22:31
happy result.
375
00:22:31 --> 00:22:32
I hope.
376
00:22:32 --> 00:22:37
Did I do it right so far?
377
00:22:37 --> 00:22:38
Yes, okay.
378
00:22:38 --> 00:22:40
Let me do the multiplication.
379
00:22:40 --> 00:22:42
I believe this comes out.
380
00:22:42 --> 00:22:46.53
So row one of the answer is one
zero zero.
381
00:22:46.53 --> 00:22:50
Oh, I know that all this is
going to be left,
382
00:22:50 --> 00:22:50
right?
383
00:22:50 --> 00:22:53
Then I have two one zero.
384
00:22:53 --> 00:22:57
So I get two one zero there,
right?
385
00:22:57 --> 00:23:02
And what's the third row?
386
00:23:02 --> 00:23:10
What's the third row in this
product?
387
00:23:10 --> 00:23:19
Just read it out to me,
the third row?
388
00:23:19 --> 00:23:22
And this is my matrix L.
389
00:23:22 --> 00:23:28
And it's the one that goes on
the left of U.
390
00:23:28 --> 00:23:32
It goes into -- what do I mean
here?
391
00:23:32 --> 00:23:39
Maybe rather than saying left
of A, left of U,
392
00:23:39 --> 00:23:43
let me right down again what I
mean.
393
00:23:43 --> 00:23:48
E A is U, whereas A is L U.
394
00:23:48 --> 00:23:49
Okay.
395
00:23:49 --> 00:23:53
Let me make the point now in
words.
396
00:23:53 --> 00:24:01
The order that the matrices
come for L is the right order.
397
00:24:01 --> 00:24:09
The two and the five don't sort
of interfere to produce this ten
398
00:24:09 --> 00:24:16
in the right order,
the multipliers just sit in the
399
00:24:16 --> 00:24:18
matrix L.
400
00:24:18 --> 00:24:24
That's the point -- that if I
want to know L,
401
00:24:24 --> 00:24:27
I have no work to do.
402
00:24:27 --> 00:24:34
I just keep a record of what
those multipliers were,
403
00:24:34 --> 00:24:37
and that gives me L.
404
00:24:37 --> 00:24:42
So I'll draw the -- let me say
it.
405
00:24:42 --> 00:24:45
So this is the A=L U.
406
00:24:45 --> 00:24:53
So if no row exchanges,
the multipliers that those
407
00:24:53 --> 00:25:01
numbers that we multiplied rows
by and subtracted,
408
00:25:01 --> 00:25:11
when we did an elimination step
-- the multipliers go directly
409
00:25:11 --> 00:25:13
into L.
410
00:25:13 --> 00:25:14.65
Okay.
411
00:25:14.65 --> 00:25:22
So L is -- this is the way,
to look at elimination.
412
00:25:22 --> 00:25:31
You go through the elimination
steps, and actually if you do it
413
00:25:31 --> 00:25:39
right, you can throw away A as
you create L U.
414
00:25:39 --> 00:25:46
If you think about it,
those steps of elimination,
415
00:25:46 --> 00:25:51.22
as when you've finished with
row two of A,
416
00:25:51.22 --> 00:25:58
you've created a new row two of
U, which you have to save,
417
00:25:58 --> 00:26:05
and you've created the
multipliers that you used --
418
00:26:05 --> 00:26:11
which you have to save,
and then you can forget A.
419
00:26:11 --> 00:26:15
So because it's all there in L
and U.
420
00:26:15 --> 00:26:21
So that's -- this moment is
maybe the new insight in
421
00:26:21 --> 00:26:27
elimination that comes from
matrix --
422
00:26:27 --> 00:26:29
doing it in matrix form.
423
00:26:29 --> 00:26:36.42
So it was -- the product of Es
is -- we can't see what that
424
00:26:36.42 --> 00:26:38.32
product of Es is.
425
00:26:38.32 --> 00:26:43
The matrix E is not a
particularly attractive one.
426
00:26:43 --> 00:26:50.5
What's great is when we put
them on the other side --
427
00:26:50.5 --> 00:26:56
their inverses in the opposite
order, there the L comes out
428
00:26:56 --> 00:26:58.04
just right.
429
00:26:58.04 --> 00:26:58
Okay.
430
00:26:58 --> 00:27:02.52
Now -- oh gosh,
so today's a sort of,
431
00:27:02.52 --> 00:27:04
like, practical day.
432
00:27:04 --> 00:27:10.17
Can we think together how
expensive is elimination?
433
00:27:10.17 --> 00:27:14
How many operations do we do?
434
00:27:14 --> 00:27:25
So this is now a kind of new
topic which I didn't list as --
435
00:27:25 --> 00:27:31
on the program,
but here it came.
436
00:27:31 --> 00:27:39
How many operations on an n by
n matrix A.
437
00:27:39 --> 00:27:47
I mean, it's a very practical
question.
438
00:27:47 --> 00:27:54
Can we solve systems of order a
thousand, in a second or a
439
00:27:54 --> 00:27:56
minute or a week?
440
00:27:56 --> 00:28:03
Can we solve systems of order a
million in a second or an hour
441
00:28:03 --> 00:28:04
or a week?
442
00:28:04 --> 00:28:10
I mean, what's the -- if it's n
by n, we often want to take n
443
00:28:10 --> 00:28:12
bigger.
444
00:28:12 --> 00:28:16
I mean, we've put in more
information.
445
00:28:16 --> 00:28:21
We make the whole thing is more
accurate for the bigger matrix.
446
00:28:21 --> 00:28:26.82
But it's more expensive,
too, and the question is how
447
00:28:26.82 --> 00:28:29
much more expensive?
448
00:28:29 --> 00:28:32
If I have matrices of order a
hundred.
449
00:28:32 --> 00:28:35
Let's say a hundred by a
hundred.
450
00:28:35 --> 00:28:38
Let me take n to be a hundred.
451
00:28:38 --> 00:28:40
Say n equal a hundred.
452
00:28:40 --> 00:28:42
How many steps are we doing?
453
00:28:42 --> 00:28:48
How many operations are we
actually doing that we --
454
00:28:48 --> 00:28:54
And let's suppose there aren't
any zeroes, because of course if
455
00:28:54 --> 00:28:59.1
a matrix has got a lot of zeroes
in good places,
456
00:28:59.1 --> 00:29:03
we don't have to do those
operations, and,
457
00:29:03 --> 00:29:05
it'll be much faster.
458
00:29:05 --> 00:29:11
But -- so just think for a
moment about the first step.
459
00:29:11 --> 00:29:17
So here's our matrix A,
hundred by a hundred.
460
00:29:17 --> 00:29:25
And the first step will be --
that column, is got zeroes down
461
00:29:25 --> 00:29:25
here.
462
00:29:25 --> 00:29:29
So it's down to 99 by 99,
right?
463
00:29:29 --> 00:29:37
That's really like the first
stage of elimination,
464
00:29:37 --> 00:29:41
to get from this hundred by
hundred non-zero matrix to this
465
00:29:41 --> 00:29:46
stage where the first pivot is
sitting up here and the first
466
00:29:46 --> 00:29:49
row's okay the first column is
okay.
467
00:29:49 --> 00:29:53
So, eventually -- how many
steps did that take?
468
00:29:53 --> 00:29:57
You see, I'm trying to get an
idea.
469
00:29:57 --> 00:29:59
Is the answer proportional to
n?
470
00:29:59 --> 00:30:03
Is the total number of steps in
elimination, the total number,
471
00:30:03 --> 00:30:07
is it proportional to n -- in
which case if I double n from a
472
00:30:07 --> 00:30:11
hundred to two hundred -- does
it take me twice as long?
473
00:30:11 --> 00:30:14
Does it square,
so it would take me four times
474
00:30:14 --> 00:30:16
as long?
475
00:30:16 --> 00:30:20
Does it cube so it would take
me eight times as long?
476
00:30:20 --> 00:30:24
Or is it n factorial,
so it would take me a hundred
477
00:30:24 --> 00:30:25
times as long?
478
00:30:25 --> 00:30:29
I think, you know,
from a practical point of view,
479
00:30:29 --> 00:30:33
we have to have some idea of
the cost, here.
480
00:30:33 --> 00:30:38
So these are the questions that
I'm -- let me ask those
481
00:30:38 --> 00:30:40
questions again.
482
00:30:40 --> 00:30:45
Is it proportional -- does it
go like N, like N squared,
483
00:30:45 --> 00:30:50
like N cubed -- or some higher
power of N?
484
00:30:50 --> 00:30:55
Like N factorial where every
step up multiplies by a hundred
485
00:30:55 --> 00:31:00
and then by a hundred and one
and then by a hundred and two --
486
00:31:00 --> 00:31:01
which is it?
487
00:31:01 --> 00:31:06
Okay, so that's the only way I
know to answer that is to think
488
00:31:06 --> 00:31:08
through what we actually had to
do.
489
00:31:08 --> 00:31:09
Okay.
490
00:31:09 --> 00:31:11
So what was the cost here?
491
00:31:11 --> 00:31:13
Well, let's see.
492
00:31:13 --> 00:31:16
What do I mean by an operation?
493
00:31:16 --> 00:31:20
I guess I mean,
well an addition or -- yeah.
494
00:31:20 --> 00:31:21
No big deal.
495
00:31:21 --> 00:31:26
I guess I mean an addition or a
subtraction or a multiplication
496
00:31:26 --> 00:31:27
or a division.
497
00:31:27 --> 00:31:28
Okay.
498
00:31:28 --> 00:31:32
And actually,
what operation I doing all the
499
00:31:32 --> 00:31:33
time?
500
00:31:33 --> 00:31:40
When I multiply row one by
multiplier L and I subtract from
501
00:31:40 --> 00:31:41.68
row six.
502
00:31:41.68 --> 00:31:45
What's happening there
individually?
503
00:31:45 --> 00:31:47
What's going on?
504
00:31:47 --> 00:31:54
If I multiply -- I do a
multiplication by L and then a
505
00:31:54 --> 00:31:56
subtraction.
506
00:31:56 --> 00:32:02
So I guess operation -- Can I
count that for the moment as,
507
00:32:02 --> 00:32:03
like, one operation?
508
00:32:03 --> 00:32:07
Or you may want to count them
separately.
509
00:32:07 --> 00:32:11
The typical operation is
multiply plus a subtract.
510
00:32:11 --> 00:32:16
So if I count those together,
my answer's going to come out
511
00:32:16 --> 00:32:21
half as many as if --
I mean, if I count them
512
00:32:21 --> 00:32:27
separately, I'd have a certain
number of multiplies,
513
00:32:27 --> 00:32:29
certain number of subtracts.
514
00:32:29 --> 00:32:32.44
That's really want to do.
515
00:32:32.44 --> 00:32:32
Okay.
516
00:32:32 --> 00:32:35
How many have I got here?
517
00:32:35 --> 00:32:38
So, I think -- let's see.
518
00:32:38 --> 00:32:42.07
It's about -- well,
how many, roughly?
519
00:32:42.07 --> 00:32:45
How many operations to get from
here to here?
520
00:32:45 --> 00:32:51
Well, maybe one way to look at
it is all these numbers had to
521
00:32:51 --> 00:32:52
get changed.
522
00:32:52 --> 00:32:57
The first row didn't get
changed, but all the other rows
523
00:32:57 --> 00:33:00
got changed at this step.
524
00:33:00 --> 00:33:06
So this step -- well,
I guess maybe -- shall I say it
525
00:33:06 --> 00:33:09
cost about a hundred squared.
526
00:33:09 --> 00:33:16
I mean, if I had changed the
first row, then it would have
527
00:33:16 --> 00:33:21
been exactly hundred squared,
because --
528
00:33:21 --> 00:33:24
because that's how many numbers
are here.
529
00:33:24 --> 00:33:29
A hundred squared numbers is
the total count of the entry,
530
00:33:29 --> 00:33:33
and all but this insignificant
first row got changed.
531
00:33:33 --> 00:33:36
So I would say about a hundred
squared.
532
00:33:36 --> 00:33:37
Okay.
533
00:33:37 --> 00:33:40
Now, what about the next step?
534
00:33:40 --> 00:33:43
So now the first row is fine.
535
00:33:43 --> 00:33:46
The second row is fine.
536
00:33:46 --> 00:33:51
And I'm changing these zeroes
are all fine,
537
00:33:51 --> 00:33:55.83
so what's up with the second
step?
538
00:33:55.83 --> 00:33:58
And then you're with me.
539
00:33:58 --> 00:34:02
Roughly, what's the cost?
540
00:34:02 --> 00:34:06
If this first step cost a
hundred squared,
541
00:34:06 --> 00:34:12
about, operations then this
one, which is really working on
542
00:34:12 --> 00:34:16
this guy to produce this,
costs about what?
543
00:34:16 --> 00:34:19
How many operations to fix?
544
00:34:19 --> 00:34:23
About ninety-nine squared,
or ninety-nine times
545
00:34:23 --> 00:34:25
ninety-eight.
546
00:34:25 --> 00:34:26
But less, right?
547
00:34:26 --> 00:34:29
Less, because our problem's
getting smaller.
548
00:34:29 --> 00:34:30
About ninety-nine squared.
549
00:34:30 --> 00:34:33
And then I go down and down and
the next one will be
550
00:34:33 --> 00:34:36
ninety-eight squared,
the next ninety-seven squared
551
00:34:36 --> 00:34:40
and finally I'm down around one
squared or --
552
00:34:40 --> 00:34:43
where it's just like the little
numbers.
553
00:34:43 --> 00:34:45
The big numbers are here.
554
00:34:45 --> 00:34:50.31
So the number of operations is
about n squared plus that was n,
555
00:34:50.31 --> 00:34:52
right?
n was a hundred?
556
00:34:52 --> 00:34:56
n squared for the first step,
then n minus one squared,
557
00:34:56 --> 00:35:00
then n minus two squared,
finally down to three squared
558
00:35:00 --> 00:35:04
and two squared and even one
squared.
559
00:35:04 --> 00:35:13
No way I should have written
that -- squeezed that in.
560
00:35:13 --> 00:35:22
Let me try it so the count is N
squared plus N minus one squared
561
00:35:22 --> 00:35:28.87
plus -- all the way down to one
squared.
562
00:35:28.87 --> 00:35:34
That's a pretty decent count.
563
00:35:34 --> 00:35:41.29
Admittedly, we didn't catch
every single tiny operation,
564
00:35:41.29 --> 00:35:46
but we got the right leading
term here.
565
00:35:46 --> 00:35:49.52
And what do those add up to?
566
00:35:49.52 --> 00:35:55
Okay, so now we're coming to
the punch of this,
567
00:35:55 --> 00:36:00
question, this operation count.
568
00:36:00 --> 00:36:06
So the operations on the left
side, on the matrix A to finally
569
00:36:06 --> 00:36:07
get to U.
570
00:36:07 --> 00:36:12
And anybody -- so which of
these quantities is the right
571
00:36:12 --> 00:36:15
ballpark for that count?
572
00:36:15 --> 00:36:20.98
If I add a hundred squared to
ninety nine squared to ninety
573
00:36:20.98 --> 00:36:25
eight squared --
ninety seven squared,
574
00:36:25 --> 00:36:30
all the way down to two squared
then one squared,
575
00:36:30 --> 00:36:33
what have I got,
about?
576
00:36:33 --> 00:36:38
It's just one of these -- let's
identify it first.
577
00:36:38 --> 00:36:39
Is it N?
578
00:36:39 --> 00:36:42
Certainly not.
579
00:36:42 --> 00:36:43
Is it n factorial?
580
00:36:43 --> 00:36:44.11
No.
581
00:36:44.11 --> 00:36:49
If it was n factorial,
we would -- with determinants,
582
00:36:49 --> 00:36:51
it is n factorial.
583
00:36:51 --> 00:36:55
I'll put in a bad mark against
determinants,
584
00:36:55 --> 00:36:58
because that -- okay,
so what is it?
585
00:36:58 --> 00:37:03.51
It's n -- well,
this is the answer.
586
00:37:03.51 --> 00:37:06
It's this order -- n cubed.
587
00:37:06 --> 00:37:10
It's like I have n terms,
right?
588
00:37:10 --> 00:37:13
I've got n terms in this sum.
589
00:37:13 --> 00:37:16
And the biggest one is N
squared.
590
00:37:16 --> 00:37:23
So the worst it could be would
be n cubed, but it's not as bad
591
00:37:23 --> 00:37:30
as -- it's N cubed times --
it's about one third of n
592
00:37:30 --> 00:37:31.11
cubed.
593
00:37:31.11 --> 00:37:34
That's the magic operation
count.
594
00:37:34 --> 00:37:40
Somehow that one third takes
account of the fact that the
595
00:37:40 --> 00:37:43
numbers are getting smaller.
596
00:37:43 --> 00:37:48
If they weren't getting
smaller, we would have n terms
597
00:37:48 --> 00:37:53
times n squared,
but it would be exactly n
598
00:37:53 --> 00:37:54
cubed.
599
00:37:54 --> 00:37:58
But our numbers are getting
smaller -- actually,
600
00:37:58 --> 00:38:02
do you remember where does one
third come in this -- I'll even
601
00:38:02 --> 00:38:05
allow a mention of calculus.
602
00:38:05 --> 00:38:09
So calculus can be mentioned,
integration can be mentioned
603
00:38:09 --> 00:38:13
now in the next minute and not
again for weeks.
604
00:38:13 --> 00:38:21
It's not that I don't like
18.01, but18.06 is better.
605
00:38:21 --> 00:38:21
Okay.
606
00:38:21 --> 00:38:30
So, -- so what's -- what's the
calculus formula that looks
607
00:38:30 --> 00:38:32
like?
608
00:38:32 --> 00:38:37.31
It looks like -- if we were in
calculus instead of summing
609
00:38:37.31 --> 00:38:39
stuff, we would integrate.
610
00:38:39 --> 00:38:45
So I would integrate x squared
and I would get one third x
611
00:38:45 --> 00:38:45
cubed.
612
00:38:45 --> 00:38:49
So if that was like an integral
from one to N,
613
00:38:49 --> 00:38:53
of x squared b x,
if the answer would be one
614
00:38:53 --> 00:38:58
third n cubed --
and it's correct for the sum
615
00:38:58 --> 00:39:01
also, because that's,
like, the whole point of
616
00:39:01 --> 00:39:02
calculus.
617
00:39:02 --> 00:39:06
The whole point of calculus is
-- oh, I don't want to tell you
618
00:39:06 --> 00:39:10
the whole -- I mean,
you know the whole point of
619
00:39:10 --> 00:39:11
calculus.
620
00:39:11 --> 00:39:15
Calculus is like sums except
it's continuous.
621
00:39:15 --> 00:39:15
Okay.
622
00:39:15 --> 00:39:17
And algebra is discreet.
623
00:39:17 --> 00:39:18
Okay.
624
00:39:18 --> 00:39:21
So the answer is one third n
cubed.
625
00:39:21 --> 00:39:27
Now I'll just -- let me say one
more thing about operations.
626
00:39:27 --> 00:39:30
What about the right-hand side?
627
00:39:30 --> 00:39:34
This was what it cost on the
left side.
628
00:39:34 --> 00:39:35
This is on A.
629
00:39:35 --> 00:39:40
Because this is A that we're
working with.
630
00:39:40 --> 00:39:46
But what's the cost on the
extra column vector b that we're
631
00:39:46 --> 00:39:48
hanging around here?
632
00:39:48 --> 00:39:53
So b costs a lot less,
obviously, because it's just
633
00:39:53 --> 00:39:55
one column.
634
00:39:55 --> 00:40:01
We carry it through elimination
and then actually we do back
635
00:40:01 --> 00:40:03
substitution.
636
00:40:03 --> 00:40:07
Let me just tell you the answer
there.
637
00:40:07 --> 00:40:08
It's n squared.
638
00:40:08 --> 00:40:14
So the cost for every right
hand side is n squared.
639
00:40:14 --> 00:40:19.69
So let me -- I'll just fit that
in here --
640
00:40:19.69 --> 00:40:24
for the the cost of b turns out
to be n squared.
641
00:40:24 --> 00:40:27
So you see if we have,
as we often have,
642
00:40:27 --> 00:40:31
a a matrix A and several
right-hand sides,
643
00:40:31 --> 00:40:37.42
then we pay the price on A,
the higher price on A to get it
644
00:40:37.42 --> 00:40:41
split up into L and U to do
elimination on A,
645
00:40:41 --> 00:40:48.25
but then we can process every
right-hand side at low cost.
646
00:40:48.25 --> 00:40:49
Okay.
647
00:40:49 --> 00:41:00
So the -- We really have
discussed the most fundamental
648
00:41:00 --> 00:41:08
algorithm for a system of
equations.
649
00:41:08 --> 00:41:09
Okay.
650
00:41:09 --> 00:41:18
So, I'm ready to allow row
exchanges.
651
00:41:18 --> 00:41:23.47
I'm ready to allow -- now what
happens to this whole -- today's
652
00:41:23.47 --> 00:41:26
lecture if there are row
exchanges?
653
00:41:26 --> 00:41:28.53
When would there be row
exchanges?
654
00:41:28.53 --> 00:41:33
There are row -- we need to do
row exchanges if a zero shows up
655
00:41:33 --> 00:41:34
in the pivot position.
656
00:41:34 --> 00:41:38
So moving then into the final
section of this chapter,
657
00:41:38 --> 00:41:46
which is about transposes --
well, we've already seen some
658
00:41:46 --> 00:41:53
transposes, and -- the title of
this section is,
659
00:41:53 --> 00:41:58
"Transposes and Permutations."
660
00:41:58 --> 00:41:58
Okay.
661
00:41:58 --> 00:42:05
So can I say,
now, where does a permutation
662
00:42:05 --> 00:42:07
come in?
663
00:42:07 --> 00:42:11
Let me talk a little about
permutations.
664
00:42:11 --> 00:42:15
So that'll be up here,
permutations.
665
00:42:15 --> 00:42:21
So these are the matrices that
I need to do row exchanges.
666
00:42:21 --> 00:42:26
And I may have to do two row
exchanges.
667
00:42:26 --> 00:42:32
Can you invent a matrix where I
would have to do two row
668
00:42:32 --> 00:42:37
exchanges and then would come
out fine?
669
00:42:37 --> 00:42:44
Yeah let's just,
for the heck of it -- so I'll
670
00:42:44 --> 00:42:45
put it here.
671
00:42:45 --> 00:42:49
Let me do three by threes.
672
00:42:49 --> 00:42:56
Actually, why don't I just
plain list all the three by
673
00:42:56 --> 00:43:01
three permutation matrices.
674
00:43:01 --> 00:43:05
There're a nice little group of
them.
675
00:43:05 --> 00:43:10
What are all the matrices that
exchange no rows at all?
676
00:43:10 --> 00:43:14
Well, I'll include the
identity.
677
00:43:14 --> 00:43:19
So that's a permutation matrix
that doesn't do anything.
678
00:43:19 --> 00:43:25
Now what's the permutation
matrix that exchanges -- what is
679
00:43:25 --> 00:43:27
P12?
680
00:43:27 --> 00:43:33
The permutation matrix that
exchanges rows one and two would
681
00:43:33 --> 00:43:36
be -- 0 1 0 -- 1 0 0,
right.
682
00:43:36 --> 00:43:42
I just exchanged those rows of
the identity and I've got it.
683
00:43:42 --> 00:43:42
Okay.
684
00:43:42 --> 00:43:45
Actually, I'll -- yes.
685
00:43:45 --> 00:43:48
Let me clutter this up.
686
00:43:48 --> 00:43:48
Okay.
687
00:43:48 --> 00:43:53
Give me a complete list of all
the row exchange matrices.
688
00:43:53 --> 00:43:55
So what are they?
689
00:43:55 --> 00:44:00
They're all the ways I can take
the identity matrix and
690
00:44:00 --> 00:44:01
rearrange its rows.
691
00:44:01 --> 00:44:04
How many will there be?
692
00:44:04 --> 00:44:08
How many three by three
permutation matrices?
693
00:44:08 --> 00:44:13
Shall we keep going and get the
answer?
694
00:44:13 --> 00:44:16
So tell me some more.
695
00:44:16 --> 00:44:20
What one are you going to do
now?
696
00:44:20 --> 00:44:26
I'm going to switch rows one
and --
697
00:44:26 --> 00:44:28
One and three,
okay.
698
00:44:28 --> 00:44:31.31
One and three,
leaving two alone.
699
00:44:31.31 --> 00:44:31
Okay.
700
00:44:31 --> 00:44:33
Now what else?
701
00:44:33 --> 00:44:38
Switch -- what would be the
next easy one -- is switch two
702
00:44:38 --> 00:44:40.53
and three, good.
703
00:44:40.53 --> 00:44:46
So I'll leave one zero zero
alone and I'll switch --
704
00:44:46 --> 00:44:50
I'll move number three up and
number two down.
705
00:44:50 --> 00:44:50
Okay.
706
00:44:50 --> 00:44:55
Those are the ones that just
exchange single -- a pair of
707
00:44:55 --> 00:44:55
rows.
708
00:44:55 --> 00:45:00
This guy, this guy and this guy
exchanges a pair of rows,
709
00:45:00 --> 00:45:04.25
but now there are more
possibilities.
710
00:45:04.25 --> 00:41:52
What's left?
711
00:41:52 --> 00:32:15
So tell -- there is another one
here.
712
00:32:15 --> 00:29:03
What's that?
713
00:29:03 --> 00:15:26
It's going to move -- it's
going to change all rows,
714
00:15:26 --> 00:13:50
right?
715
00:13:50 --> 00:05:18
Where shall we put them?4
716
00:05:18 --> 00:09:01.4
So -- give me a first row.
717
00:09:01.4 --> 00:12:19
STUDENT: Zero one zero?
718
00:12:19 --> 00:15:28
STRANG: Zero one zero.
719
00:15:28 --> 00:24:03
Okay, now a second row -- say
zero zero one and the third guy
720
00:24:03 --> 00:26:03
one zero zero.
721
00:26:03 --> 00:29:30
So that is like a cycle.
722
00:29:30 --> 00:37:57
That puts row two moves up to
row one, row three moves up to
723
00:37:57 --> 00:45:41
row two and row one moves down
to row three.
724
00:45:41 --> 00:45:45
And there's one more,
which is -- let's see.
725
00:45:45 --> 00:45:47
What's left?
726
00:45:47 --> 00:45:48
I'm lost.
727
00:45:48 --> 00:45:51
STUDENT: Is it zero zero one?
728
00:45:51 --> 00:45:52
STRANG: Okay.
729
00:45:52 --> 00:45:55
STUDENT: One zero zero.
730
00:45:55 --> 00:45:59
STRANG: One zero zero,
okay.
731
00:45:59 --> 00:46:00.95
Zero one zero.
732
00:46:00.95 --> 00:46:01
Okay.
733
00:46:01 --> 00:46:02
Great.
734
00:46:02 --> 00:46:02
Six.
735
00:46:02 --> 00:46:04
Six of them.
736
00:46:04 --> 00:46:04
Six P.
737
00:46:04 --> 00:46:11
And they're sort of nice,
because what happens if I
738
00:46:11 --> 00:46:15
write, multiply two of them
together?
739
00:46:15 --> 00:46:20
If I multiply two of these
matrices together,
740
00:46:20 --> 00:46:27
what can you tell me about the
answer?
741
00:46:27 --> 00:46:28
It's on the list.
742
00:46:28 --> 00:46:34
If I do some row exchanges and
then I do some more row
743
00:46:34 --> 00:46:39.94
exchanges, then all together
I've done row exchanges.
744
00:46:39.94 --> 00:46:44.57
So if I multiply -- but,
I don't know.
745
00:46:44.57 --> 00:46:47
And if I invert,
then I'm just doing row
746
00:46:47 --> 00:46:50
exchanges to get back again.
747
00:46:50 --> 00:46:52.9
So the inverses are all there.
748
00:46:52.9 --> 00:46:57
It's a little family of
matrices that -- they've got
749
00:46:57 --> 00:47:02
their own -- if I multiply,
I'm still inside this group.
750
00:47:02 --> 00:47:05
If I invert I'm inside this
group --
751
00:47:05 --> 00:47:09
actually, group is the right
name for this subject.
752
00:47:09 --> 00:47:14
It's a group of six matrices,
and what about the inverses?
753
00:47:14 --> 00:47:17
What's the inverse of this guy,
for example?
754
00:47:17 --> 00:47:21
What's the inverse -- if I
exchange rows one and two,
755
00:47:21 --> 00:47:24
what's the inverse matrix?
756
00:47:24 --> 00:47:26
Just tell me fast.
757
00:47:26 --> 00:47:31
The inverse of that matrix is
-- if I exchange rows one and
758
00:47:31 --> 00:47:37
two, then what I should do to
get back to where I started is
759
00:47:37 --> 00:47:38
the same thing.
760
00:47:38 --> 00:47:41
So this thing is its own
inverse.
761
00:47:41 --> 00:47:44
That's probably its own
inverse.
762
00:47:44 --> 00:47:50
This is probably not --
actually, I think these are
763
00:47:50 --> 00:47:52
inverses of each other.
764
00:47:52 --> 00:47:56
Oh, yeah, actually -- the
inverse is the transpose.
765
00:47:56 --> 00:48:01
There's a curious fact about
permutations matrices,
766
00:48:01 --> 00:48:04
that the inverses are the
transposes.
767
00:48:04 --> 00:48:09
And final moment -- how many
are there if I --
768
00:48:09 --> 00:48:12
how many four by four
permutations?
769
00:48:12 --> 00:48:16.68
So let me take four by four --
how many Ps?
770
00:48:16.68 --> 00:48:17
Well, okay.
771
00:48:17 --> 00:48:19
Make a good guess.
772
00:48:19 --> 00:48:21
Twenty four,
right.
773
00:48:21 --> 00:48:22
Twenty four Ps.
774
00:48:22 --> 00:48:22
Okay.
775
00:48:22 --> 00:48:28
So, we've got these permutation
matrices, and in the next
776
00:48:28 --> 00:48:31
lecture, we'll use them.