WEBVTT

00:00:00.390 --> 00:00:01.260
GILBERT STRANG: OK.

00:00:01.260 --> 00:00:04.550
I want to continue
the last video, which

00:00:04.550 --> 00:00:09.330
was about incidence matrices,
and graphs, and networks,

00:00:09.330 --> 00:00:13.390
and flows in the network.

00:00:13.390 --> 00:00:14.900
So that was 5.6.

00:00:14.900 --> 00:00:16.980
This is 5.6b.

00:00:16.980 --> 00:00:20.010
And I'll remember
the same graph.

00:00:20.010 --> 00:00:24.660
You remember a graph is
some nodes, four nodes here,

00:00:24.660 --> 00:00:28.980
and some edges, and in
this case five edges.

00:00:28.980 --> 00:00:34.830
So I have a 5 by 4 matrix,
and that's what it was.

00:00:34.830 --> 00:00:37.430
And I'll remember
how it was created.

00:00:37.430 --> 00:00:41.020
Every row corresponds
to an edge.

00:00:41.020 --> 00:00:46.300
So the first edge there
goes from node 1 to node 2,

00:00:46.300 --> 00:00:51.840
so I put a minus 1 and a
1 in columns one and two.

00:00:51.840 --> 00:00:56.380
That tells me what that
first edge is doing

00:00:56.380 --> 00:01:00.640
and it gives me one row
of the incidence matrix.

00:01:00.640 --> 00:01:03.350
Five edges give me five rows.

00:01:03.350 --> 00:01:05.160
There is the matrix.

00:01:05.160 --> 00:01:10.650
And here I'll multiply by
v, thinking of a vector v

00:01:10.650 --> 00:01:17.600
as voltages at the four
nodes, and I get that answer.

00:01:17.600 --> 00:01:22.720
The 1 and minus 1 produce
this kind of answer.

00:01:22.720 --> 00:01:23.840
OK.

00:01:23.840 --> 00:01:29.750
Now I'm ready for questions
about the matrix A, the 5

00:01:29.750 --> 00:01:31.440
by 4 matrix.

00:01:31.440 --> 00:01:34.280
These matrices, these
incidence matrices,

00:01:34.280 --> 00:01:38.070
are beautiful examples
of rectangular matrices

00:01:38.070 --> 00:01:43.110
where we can ask all the
key questions about a matrix

00:01:43.110 --> 00:01:45.030
and get a nice answer.

00:01:45.030 --> 00:01:48.320
And the key questions
that I have in mind are

00:01:48.320 --> 00:01:52.290
what are their solutions
to Av equals 0?

00:01:52.290 --> 00:01:54.000
Are there--

00:01:54.000 --> 00:01:58.300
That says, are there are
combinations of the columns

00:01:58.300 --> 00:02:00.950
that give the zero column?

00:02:00.950 --> 00:02:07.170
So it's asking, are
the columns dependent?

00:02:07.170 --> 00:02:10.699
If the columns were dependent,
then I'll find some solutions,

00:02:10.699 --> 00:02:12.400
and here I will.

00:02:12.400 --> 00:02:16.470
If the columns are independent,
the only solution I will find

00:02:16.470 --> 00:02:18.820
will be v equals 0.

00:02:18.820 --> 00:02:22.450
But those columns are dependent.

00:02:22.450 --> 00:02:24.730
Now, how can we see that?

00:02:24.730 --> 00:02:28.180
Well, in this case,
we can find a solution

00:02:28.180 --> 00:02:31.020
to Av equals 0,
because I can see

00:02:31.020 --> 00:02:34.860
how do I get all those
differences to be 0?

00:02:34.860 --> 00:02:36.640
Well, not hard.

00:02:36.640 --> 00:02:40.160
v could be the
vector of all 1's.

00:02:42.830 --> 00:02:48.840
Then the differences would all
be 1 minus 1, would all be 0.

00:02:48.840 --> 00:02:51.290
I would be solving Av equals 0.

00:02:51.290 --> 00:02:55.230
And of course, I can
multiply by any constant.

00:02:55.230 --> 00:02:57.740
The voltage is--
So all I'm saying

00:02:57.740 --> 00:03:03.220
is if all the voltages are
equal, there won't be any flow.

00:03:03.220 --> 00:03:05.510
If all the voltages
are equal and I

00:03:05.510 --> 00:03:11.610
don't have any batteries or
other sources in the network,

00:03:11.610 --> 00:03:13.290
there will be no flow.

00:03:13.290 --> 00:03:18.260
And those are all the solutions.

00:03:18.260 --> 00:03:22.780
But the only way I
could make all those 0

00:03:22.780 --> 00:03:25.890
would be for all the
v's to be the same.

00:03:25.890 --> 00:03:28.350
So all the v's have
to be the same.

00:03:28.350 --> 00:03:30.770
v is C, C, C, C.

00:03:30.770 --> 00:03:35.300
And I learn something important.

00:03:35.300 --> 00:03:38.230
Av equals 0 has some solutions.

00:03:38.230 --> 00:03:44.040
And I'll just jump ahead
one electrical moment.

00:03:44.040 --> 00:03:48.930
That's not good if we
want an invertible matrix.

00:03:48.930 --> 00:03:51.320
In the end we would
have A transpose A

00:03:51.320 --> 00:03:56.300
and it won't be invertible
unless we do something.

00:03:56.300 --> 00:03:57.410
And what do we do?

00:03:57.410 --> 00:04:00.400
We want to get rid
of that last column.

00:04:00.400 --> 00:04:02.040
We can have three columns.

00:04:02.040 --> 00:04:05.150
Those will be independent,
but that fourth column

00:04:05.150 --> 00:04:07.450
is a combination of the others.

00:04:07.450 --> 00:04:10.480
And what we do,
in reality, is we

00:04:10.480 --> 00:04:17.649
ground a node, which means we
set one of the v's, maybe v4,

00:04:17.649 --> 00:04:23.790
if we set that to 0, it's like
we're fixing the temperature,

00:04:23.790 --> 00:04:25.740
we're fixing the
voltage, we often

00:04:25.740 --> 00:04:28.500
have to do this on
a sliding scale.

00:04:28.500 --> 00:04:31.150
If we only know
differences in temperature,

00:04:31.150 --> 00:04:33.340
we have to say, where is 0?

00:04:33.340 --> 00:04:37.130
And if we make that
point 0, then we

00:04:37.130 --> 00:04:41.340
have only three unknown
voltages and a 5

00:04:41.340 --> 00:04:44.040
by 3 matrix and all well.

00:04:44.040 --> 00:04:45.180
OK.

00:04:45.180 --> 00:04:48.630
So that's the discussion
of Av equals 0.

00:04:48.630 --> 00:04:51.940
Now, what about A
transpose w equals 0?

00:04:51.940 --> 00:04:55.930
So now I'm asking about the
transpose of that matrix.

00:04:55.930 --> 00:05:00.240
Now, this is a 4 by 5 matrix.

00:05:03.970 --> 00:05:07.530
Again, a beautiful
example, 4 by 5 matrix.

00:05:07.530 --> 00:05:09.490
w, of course.

00:05:09.490 --> 00:05:16.150
It's a 4 by 5 matrix
multiplying w, which is 5 by 1.

00:05:16.150 --> 00:05:20.230
So 4 by 5 times 5 by 1.

00:05:20.230 --> 00:05:27.860
And I want to get all
zeros, four zeros this time.

00:05:27.860 --> 00:05:30.220
Right.

00:05:30.220 --> 00:05:34.820
So first of all, if I
have a 4 by 5 matrix,

00:05:34.820 --> 00:05:41.930
so when I transpose this is
you could say short and wide,

00:05:41.930 --> 00:05:45.310
I think there are
automatically solutions.

00:05:45.310 --> 00:05:49.250
There will be solutions
in a 4 by 5 matrix.

00:05:49.250 --> 00:05:53.480
With five unknowns and
only four equations,

00:05:53.480 --> 00:05:56.810
I'm going to have some
solutions to that system.

00:05:56.810 --> 00:05:58.810
So there will be some solutions.

00:05:58.810 --> 00:06:02.090
Well, the question is how
many different w's could I

00:06:02.090 --> 00:06:04.410
find, how many
different solutions,

00:06:04.410 --> 00:06:06.550
and what do they mean.

00:06:06.550 --> 00:06:09.030
And that's the beauty
of this example,

00:06:09.030 --> 00:06:13.120
that it's not just a bunch
of 20 numbers in the matrix.

00:06:13.120 --> 00:06:15.600
The matrix has a meaning.

00:06:15.600 --> 00:06:21.080
The incidence matrix
takes differences A to Av

00:06:21.080 --> 00:06:26.310
is differences in v, but what's
the meaning of A transpose?

00:06:26.310 --> 00:06:28.400
That's the key question here.

00:06:28.400 --> 00:06:32.071
Why is this equation
very important?

00:06:32.071 --> 00:06:32.570
OK.

00:06:32.570 --> 00:06:35.220
So I have to tell you the
meaning of A transpose.

00:06:35.220 --> 00:06:38.890
And maybe I have to copy
down what A transpose is.

00:06:38.890 --> 00:06:45.840
So let me go to the next board
and copy down A transpose.

00:06:45.840 --> 00:06:49.580
So I'm looking now
at A transpose w.

00:06:49.580 --> 00:06:52.310
So now it will be 4 by 5.

00:06:52.310 --> 00:06:56.670
So that first row
becomes a column.

00:06:56.670 --> 00:07:01.630
The second row becomes another
column in the transpose.

00:07:01.630 --> 00:07:10.120
The third row, another column,
the fourth row, is that column.

00:07:10.120 --> 00:07:14.460
And the fifth row is that one.

00:07:14.460 --> 00:07:27.880
And that will multiply w1, 2,
3, 4, and 5 to give 0, 0, 0, 0.

00:07:27.880 --> 00:07:37.320
And that's called the current
law, Kirchhoff's current law.

00:07:37.320 --> 00:07:40.190
And what is that law?

00:07:40.190 --> 00:07:41.790
What does it mean?

00:07:41.790 --> 00:07:48.130
It means that in the network at
a typical node, so at node 1,

00:07:48.130 --> 00:07:50.640
you remember, there
was an edge out.

00:07:50.640 --> 00:07:53.490
Edge 1 went out.

00:07:53.490 --> 00:07:57.320
Three edges went out actually.

00:07:57.320 --> 00:07:59.110
This was to node 2.

00:07:59.110 --> 00:08:01.950
This was to node 3,
and that was to node 4.

00:08:01.950 --> 00:08:06.360
At node 1, three
edges are going out.

00:08:06.360 --> 00:08:09.690
And what does the
current law tell me?

00:08:09.690 --> 00:08:14.240
It tells me that the
total flow out is 0.

00:08:14.240 --> 00:08:21.580
The net flow, any flow in, which
would be negative w's, and any

00:08:21.580 --> 00:08:25.250
flows out, which would
be positive w's-- w,

00:08:25.250 --> 00:08:27.380
that came from the first edge.

00:08:27.380 --> 00:08:29.920
This was maybe the second edge.

00:08:29.920 --> 00:08:34.929
And I think that happened
to be the fourth edge--

00:08:34.929 --> 00:08:38.450
flows out of w.

00:08:38.450 --> 00:08:40.510
And that's what I see here.

00:08:40.510 --> 00:08:44.610
A 1, a 2, and a
4 are multiplying

00:08:44.610 --> 00:08:51.030
w1, w2, and w4 are the-- The
first equation there is minus.

00:08:51.030 --> 00:08:56.940
w1 plus w2 plus w4 equals 0.

00:08:56.940 --> 00:09:07.070
So that came from the first
row of A transpose w equals 0.

00:09:07.070 --> 00:09:07.570
Right?

00:09:07.570 --> 00:09:10.240
I just took those numbers
from the first row.

00:09:10.240 --> 00:09:12.780
I wrote down that
first equation.

00:09:12.780 --> 00:09:17.700
And you see it says exactly
the sum of those three flows

00:09:17.700 --> 00:09:19.390
has to be 0.

00:09:19.390 --> 00:09:22.650
So if there's some
positive flows going out,

00:09:22.650 --> 00:09:28.020
there must be some negative
w's coming in to balance.

00:09:28.020 --> 00:09:28.520
OK.

00:09:28.520 --> 00:09:33.460
And that was at node 1, and
similarly at nodes 2, and 3,

00:09:33.460 --> 00:09:36.160
and 4, currents balance.

00:09:36.160 --> 00:09:37.840
It's the balance equation.

00:09:37.840 --> 00:09:40.360
Kirchhoff's law, it's
the balance equation.

00:09:46.230 --> 00:09:48.130
It's conservation.

00:09:48.130 --> 00:09:52.400
A fundamental
equation in modeling

00:09:52.400 --> 00:09:57.040
applied mathematics is if
a body is sitting there

00:09:57.040 --> 00:10:00.740
in equilibrium, then the
forces on it are in balance.

00:10:00.740 --> 00:10:04.370
If I have steady flow
around the network,

00:10:04.370 --> 00:10:06.490
the currents are in balance.

00:10:06.490 --> 00:10:08.370
Always there's a
balance equation,

00:10:08.370 --> 00:10:11.990
so that things are not
collecting up at a node.

00:10:11.990 --> 00:10:14.200
It's stable.

00:10:14.200 --> 00:10:15.100
OK.

00:10:15.100 --> 00:10:19.410
So that's the meaning of
Kirchhoff's current law.

00:10:19.410 --> 00:10:23.600
That's the meaning of
A transpose w equals 0.

00:10:23.600 --> 00:10:26.060
And what about solutions?

00:10:26.060 --> 00:10:27.370
Solutions w.

00:10:27.370 --> 00:10:31.560
Now, so now we're getting
down into the details.

00:10:31.560 --> 00:10:34.540
Can we actually find the w's?

00:10:34.540 --> 00:10:36.690
Well, there will be some.

00:10:36.690 --> 00:10:37.570
There will be some.

00:10:37.570 --> 00:10:40.780
As I said, we've got five
unknowns here and only

00:10:40.780 --> 00:10:42.330
four equations.

00:10:42.330 --> 00:10:45.260
So we're certainly going
to find a solution.

00:10:45.260 --> 00:10:48.790
And let me suggest one
good way to look for it.

00:10:48.790 --> 00:10:55.850
Suppose the flow-- Let me
put in the other two edges--

00:10:55.850 --> 00:11:00.910
suppose the flow
goes around a loop.

00:11:00.910 --> 00:11:02.710
Loops are the key here.

00:11:02.710 --> 00:11:05.220
The key to the
solution is a loop.

00:11:05.220 --> 00:11:10.620
So that's a flow that sends
a flow of 1 along that edge,

00:11:10.620 --> 00:11:14.880
a flow of 1 going that way
along that edge, which I think

00:11:14.880 --> 00:11:24.110
was w5, and a flow
of 1 going that way.

00:11:24.110 --> 00:11:25.530
Pay attention.

00:11:25.530 --> 00:11:33.500
It's going to send 1
Amp around the loop.

00:11:33.500 --> 00:11:36.970
I go with the arrow, with the
flow, this way and this way,

00:11:36.970 --> 00:11:39.400
but this one is
against the arrow.

00:11:39.400 --> 00:11:45.180
So I'm thinking that a
solution is w1 equals 1.

00:11:45.180 --> 00:11:47.030
You see I'm writing
down a solution

00:11:47.030 --> 00:11:51.300
without doing any elimination
or other linear algebra.

00:11:51.300 --> 00:11:53.600
I'm just understanding
the picture.

00:11:53.600 --> 00:11:55.390
w1 is 1.

00:11:55.390 --> 00:11:58.350
w5 is 1.

00:11:58.350 --> 00:12:00.330
w5 is 1.

00:12:00.330 --> 00:12:02.870
And what is w4?

00:12:02.870 --> 00:12:09.340
Negative 1, because it's
going against the arrow.

00:12:09.340 --> 00:12:14.994
And the other two
w's are 0, w2 and w3.

00:12:14.994 --> 00:12:17.210
This was w3 here.

00:12:17.210 --> 00:12:20.110
Those are not
involved in this loop.

00:12:20.110 --> 00:12:25.850
So there is a solution
with w2 and w3 equal to 0.

00:12:25.850 --> 00:12:32.420
And I think that
how could it fail

00:12:32.420 --> 00:12:34.220
on Kirchhoff's current law?

00:12:34.220 --> 00:12:36.510
Nothing is piling up at a node.

00:12:36.510 --> 00:12:38.550
We're just sending
it around a loop.

00:12:38.550 --> 00:12:42.170
And of course, I
put in that's a 1.

00:12:42.170 --> 00:12:44.000
w2 is a 0.

00:12:44.000 --> 00:12:45.670
w4 is a minus 1.

00:12:45.670 --> 00:12:47.110
I have a 1 and a minus 1.

00:12:47.110 --> 00:12:49.030
I get 0, just right.

00:12:49.030 --> 00:12:52.590
And all the equations
would be solved.

00:12:52.590 --> 00:13:02.590
In other words,
conclusion, the solutions w

00:13:02.590 --> 00:13:10.960
come from loops in the network.

00:13:10.960 --> 00:13:13.640
Every loop in the
network gives me a w.

00:13:13.640 --> 00:13:15.000
Here's another loop.

00:13:15.000 --> 00:13:17.050
I could send flow down there.

00:13:17.050 --> 00:13:20.100
Now that would be a w4 plus 1.

00:13:20.100 --> 00:13:20.930
This way.

00:13:20.930 --> 00:13:21.860
This way.

00:13:21.860 --> 00:13:24.430
Do you see that second loop?

00:13:24.430 --> 00:13:29.480
Let me draw my
little loopy symbol.

00:13:29.480 --> 00:13:31.420
Flow going around that loop.

00:13:31.420 --> 00:13:34.650
That loop happens to
have four edges on it.

00:13:34.650 --> 00:13:36.710
So I'd have four w's.

00:13:36.710 --> 00:13:44.520
1 minus 1, 1, and minus 1,
and no flow on edge 1, and I

00:13:44.520 --> 00:13:46.130
would have another solution.

00:13:46.130 --> 00:13:48.150
And it would be a
different solution.

00:13:48.150 --> 00:13:54.060
So I'm going from-- Can
I insert here two loops?

00:13:54.060 --> 00:13:58.540
In that graph I see two
loops, two small loops.

00:13:58.540 --> 00:14:03.370
And each of those small
loops gives me a flow, a w,

00:14:03.370 --> 00:14:07.380
that solves the current law,
because it's just continuously

00:14:07.380 --> 00:14:10.210
running around and around.

00:14:10.210 --> 00:14:13.810
Now, there's another
question to ask you,

00:14:13.810 --> 00:14:21.072
and that is what about
the big loop, w1, w3--

00:14:21.072 --> 00:14:24.370
I think that is-- and minus w2?

00:14:24.370 --> 00:14:27.660
What if I send flow
around the big loop?

00:14:27.660 --> 00:14:29.280
No problem.

00:14:29.280 --> 00:14:32.390
That gives me
another set of w's .

00:14:32.390 --> 00:14:35.280
Those satisfy
Kirchhoff's current law.

00:14:35.280 --> 00:14:37.300
They satisfy these equations.

00:14:37.300 --> 00:14:40.750
They satisfy A
transpose w equals 0.

00:14:40.750 --> 00:14:48.120
But I don't want that big loop.

00:14:48.120 --> 00:14:53.670
I don't want to include that in
my list of w's, because I was

00:14:53.670 --> 00:14:55.910
only looking for two w's.

00:14:55.910 --> 00:14:58.370
I was only looking for two w's.

00:14:58.370 --> 00:15:03.500
And linear algebra told me that
was the number to look for.

00:15:03.500 --> 00:15:07.770
And here you're suggesting--
I'll blame you--

00:15:07.770 --> 00:15:10.370
a third around the big loop.

00:15:10.370 --> 00:15:12.410
So what's up?

00:15:12.410 --> 00:15:14.350
Well, do you see it?

00:15:14.350 --> 00:15:19.520
The flow around that big
loop does solve A transpose w

00:15:19.520 --> 00:15:23.250
equals 0, but it's not new.

00:15:23.250 --> 00:15:26.870
It's the sum of a
flow around that loop

00:15:26.870 --> 00:15:28.290
plus a flow around that.

00:15:28.290 --> 00:15:28.790
Do you see?

00:15:28.790 --> 00:15:36.840
If I add together the flow
vector, the loop vector for w

00:15:36.840 --> 00:15:39.810
for that loop and
for that loop, they

00:15:39.810 --> 00:15:45.510
will cancel on the edges
that are in both loops,

00:15:45.510 --> 00:15:48.490
and I'll just be left with the
flow there, the flow there,

00:15:48.490 --> 00:15:50.550
and the flow there, and
that's the big loop.

00:15:50.550 --> 00:15:55.030
In other words, that
big loop doesn't give me

00:15:55.030 --> 00:15:57.170
a new vec-- It doesn't
give me-- It gives me

00:15:57.170 --> 00:16:01.400
a vector w that's a combination
of what I already have.

00:16:01.400 --> 00:16:05.100
And in linear algebra,
that's always the question.

00:16:05.100 --> 00:16:10.330
You want the number
of independent w's,

00:16:10.330 --> 00:16:14.280
and this big loop
is a dependent w,

00:16:14.280 --> 00:16:17.390
because it's a combination
of the other two.

00:16:17.390 --> 00:16:18.030
OK.

00:16:18.030 --> 00:16:22.800
So that's the picture for
one particular example.

00:16:22.800 --> 00:16:31.270
I'll just end with linear
algebra facts, linear algebra

00:16:31.270 --> 00:16:31.890
facts.

00:16:31.890 --> 00:16:32.640
OK.

00:16:32.640 --> 00:16:40.410
So how many-- So if I
have an m by n matrix,

00:16:40.410 --> 00:16:47.730
and suppose Av equals 0 has
how many independent solutions

00:16:47.730 --> 00:16:49.170
shall I say?

00:16:49.170 --> 00:16:51.565
k independent solutions.

00:16:56.940 --> 00:17:01.770
And in my example,
the incidence matrix,

00:17:01.770 --> 00:17:13.550
the answer was, for A equal
incidence matrix, k was 1.

00:17:13.550 --> 00:17:17.030
So if I know the number of
solutions to that equation,

00:17:17.030 --> 00:17:20.310
then how many
solutions do I expect

00:17:20.310 --> 00:17:32.690
to-- This has-- So how many
solutions do I expect there?

00:17:32.690 --> 00:17:39.940
The difference between m and n
comes in it, and then plus k.

00:17:39.940 --> 00:17:41.090
So independent solutions.

00:17:48.180 --> 00:17:50.190
That's a basic fact
of linear algebra

00:17:50.190 --> 00:17:52.120
that I never wrote down before.

00:17:52.120 --> 00:17:55.400
I never wrote it
in this notation.

00:17:55.400 --> 00:18:00.480
I'll make that a question on
a future linear algebra exam.

00:18:00.480 --> 00:18:10.370
What I'm saying is that if I
know how many solutions Av has,

00:18:10.370 --> 00:18:12.640
how many combinations,
these are combinations

00:18:12.640 --> 00:18:15.560
of the columns of
A that give 0, then

00:18:15.560 --> 00:18:19.330
I know how many combinations
of the rows of A.

00:18:19.330 --> 00:18:26.450
Let's just check that this
counting theorem was correct.

00:18:26.450 --> 00:18:28.970
This was k equals 1, right?

00:18:28.970 --> 00:18:34.610
The only solution to Av equals
0 was the constants, 1, 1, 1, 1.

00:18:34.610 --> 00:18:37.040
Then m was 5.

00:18:37.040 --> 00:18:38.400
n was 4.

00:18:38.400 --> 00:18:39.720
k was 1.

00:18:39.720 --> 00:18:42.680
5 minus 4 plus 1 is 2.

00:18:42.680 --> 00:18:52.020
And that's the number
of loop solutions

00:18:52.020 --> 00:18:55.950
to Kirchhoff's current law.

00:18:55.950 --> 00:18:56.610
OK.

00:18:56.610 --> 00:18:58.750
We have voltages.

00:18:58.750 --> 00:18:59.740
We have currents.

00:18:59.740 --> 00:19:07.510
And there's a lot of beautiful
linear algebra involved

00:19:07.510 --> 00:19:09.950
with these matrices.

00:19:09.950 --> 00:19:16.760
I'll also include a video about
RLC circuits, which are totally

00:19:16.760 --> 00:19:18.490
an application of this.

00:19:18.490 --> 00:19:24.560
And there I'll begin with
just one loop, one RLC loop.

00:19:24.560 --> 00:19:31.420
But the reality of
modern electronics

00:19:31.420 --> 00:19:37.560
is thousands of nodes,
thousands of edges,

00:19:37.560 --> 00:19:43.490
maybe tens of thousands of
edges, and many, many loops.

00:19:43.490 --> 00:19:44.390
Good.

00:19:44.390 --> 00:19:45.940
Thank you.