WEBVTT

00:00:00.500 --> 00:00:01.600
PROFESSOR: OK.

00:00:01.600 --> 00:00:04.470
This video is a
different direction.

00:00:04.470 --> 00:00:08.680
It will be about linear
equations and not differential

00:00:08.680 --> 00:00:09.810
equations.

00:00:09.810 --> 00:00:13.040
A matrix is at the
center of this video

00:00:13.040 --> 00:00:15.720
and it's called the
incidence matrix.

00:00:15.720 --> 00:00:21.390
And that incidence matrix tells
me everything about a graph.

00:00:21.390 --> 00:00:23.790
Now, what do I mean
by the word graph?

00:00:23.790 --> 00:00:28.040
I don't mean a graph
of sine x or cosine x.

00:00:28.040 --> 00:00:30.200
The word graph is
used in another way

00:00:30.200 --> 00:00:35.300
completely for some
edges and some nodes.

00:00:35.300 --> 00:00:36.420
So I have some nodes.

00:00:36.420 --> 00:00:39.131
In this case 1, 2, 3, 4 nodes.

00:00:41.960 --> 00:00:44.000
That's my number n.

00:00:44.000 --> 00:00:49.850
The number m is the number of
edges that connect the nodes.

00:00:49.850 --> 00:00:56.140
So I have edge 1 connecting
those nodes, edge 2, edge 3, 4,

00:00:56.140 --> 00:00:57.180
and 5.

00:00:57.180 --> 00:01:01.170
And I didn't put in an edge 6.

00:01:01.170 --> 00:01:04.660
A complete graph would
have all possible edges,

00:01:04.660 --> 00:01:09.640
but a general graph
can have some edges.

00:01:09.640 --> 00:01:11.680
Some pairs of
nodes are connected

00:01:11.680 --> 00:01:14.730
others are not connected.

00:01:14.730 --> 00:01:20.520
So now I want to create the
matrix that shows me everything

00:01:20.520 --> 00:01:22.180
that's in that picture.

00:01:22.180 --> 00:01:27.340
Then I can work with
the matrix and graphs.

00:01:27.340 --> 00:01:32.950
And their matrices are the
number one application,

00:01:32.950 --> 00:01:37.880
number one model for
so many applications,

00:01:37.880 --> 00:01:40.470
like the world wide web.

00:01:40.470 --> 00:01:45.350
The web might have-- every
website would be a node

00:01:45.350 --> 00:01:48.320
and there would be an
edge between two nodes

00:01:48.320 --> 00:01:51.130
if those websites are linked.

00:01:51.130 --> 00:01:54.070
So the world wide
web is a giant graph.

00:01:54.070 --> 00:01:59.270
Or the telephone company
has a giant graph

00:01:59.270 --> 00:02:02.610
in which the nodes
are the telephones,

00:02:02.610 --> 00:02:07.910
and there is an edge when a
call is made from one phone

00:02:07.910 --> 00:02:10.690
to another, between two phones.

00:02:10.690 --> 00:02:13.550
So, nodes and edges.

00:02:13.550 --> 00:02:15.670
And our brain-- which
is the great problem

00:02:15.670 --> 00:02:21.220
of the 21st century is to
understand the graph that

00:02:21.220 --> 00:02:25.450
represents our brain, the
connections of neurons

00:02:25.450 --> 00:02:30.690
in our thinking-- well, that's
a tougher problem than we'll

00:02:30.690 --> 00:02:32.010
solve today.

00:02:32.010 --> 00:02:37.360
Let me work with that graph
and create the matrix.

00:02:37.360 --> 00:02:42.990
So the matrix has five rows
coming from the five edges.

00:02:42.990 --> 00:02:44.640
Let me take the first edge.

00:02:44.640 --> 00:02:49.340
So the first edge, there's
edge number 1, goes from node 1

00:02:49.340 --> 00:02:51.210
to node 2.

00:02:51.210 --> 00:02:54.070
The nodes correspond to columns.

00:02:54.070 --> 00:02:58.820
So if I want an edge
from node 1 to node 2,

00:02:58.820 --> 00:03:02.470
that edge 1 will go in row 1.

00:03:02.470 --> 00:03:05.910
So edge 1.

00:03:05.910 --> 00:03:09.520
First edge is
connected to row 1.

00:03:12.210 --> 00:03:19.206
So that edge goes from node 1
to node 2, so I put a minus 1

00:03:19.206 --> 00:03:20.770
and a 1.

00:03:20.770 --> 00:03:24.810
And it doesn't
touch nodes 3 and 4.

00:03:24.810 --> 00:03:26.070
That's edge 1.

00:03:26.070 --> 00:03:28.430
That's row 1.

00:03:28.430 --> 00:03:33.180
Now that tells me everything
I see about edge 1.

00:03:33.180 --> 00:03:35.880
Edge 2 goes from 1 to 3.

00:03:35.880 --> 00:03:41.530
So I'll put a minus 1,
a 0, and a 1 in row 2

00:03:41.530 --> 00:03:48.150
because row 2 comes from edge
2 and it goes from 1 to 3.

00:03:48.150 --> 00:03:53.370
Edge 3 will give me
row 3, from 2 to 3.

00:03:53.370 --> 00:03:59.820
So edge 3 giving
me row 3, 2 to 3.

00:03:59.820 --> 00:04:02.700
Edge 4 went from 1 to 4.

00:04:02.700 --> 00:04:06.860
So minus 1, nothing, nothing, 1.

00:04:06.860 --> 00:04:12.420
That tells me that edge 4 is
going from node 1 to node 4.

00:04:12.420 --> 00:04:17.705
And finally, from node 2
to node 4 is the final row.

00:04:20.709 --> 00:04:23.500
Do you see there the graph?

00:04:23.500 --> 00:04:28.520
Everything, all the
information in this picture

00:04:28.520 --> 00:04:31.440
is now captured in that matrix.

00:04:31.440 --> 00:04:33.790
So we can work with the matrix.

00:04:33.790 --> 00:04:35.850
And what does a matrix do?

00:04:35.850 --> 00:04:37.430
It multiplies vectors.

00:04:37.430 --> 00:04:40.320
That's what a matrix
does, it acts on vectors.

00:04:40.320 --> 00:04:46.910
So what happens if I multiply
that matrix by a vector?

00:04:46.910 --> 00:04:53.430
So now let me take
out these edge numbers

00:04:53.430 --> 00:04:56.040
and do a multiplication.

00:04:56.040 --> 00:05:01.770
That matrix has four columns,
it's a 5 by 4 matrix, m by n.

00:05:01.770 --> 00:05:04.040
5 by 4.

00:05:04.040 --> 00:05:10.590
So it multiplies a vector with
four components and those four

00:05:10.590 --> 00:05:15.080
components will come
from the four nodes.

00:05:15.080 --> 00:05:19.440
And maybe they represent
voltages at the nodes.

00:05:19.440 --> 00:05:23.940
Let me think like an electrical
engineer for a moment.

00:05:23.940 --> 00:05:27.140
So if there's my
matrix, I imagine

00:05:27.140 --> 00:05:34.890
I have voltages, v1, v2,
v3, v4, at the nodes.

00:05:34.890 --> 00:05:40.220
So there's a v1 voltage
here, v2, a v3, and a v4,

00:05:40.220 --> 00:05:45.340
and where those voltages'
currents will flow.

00:05:45.340 --> 00:05:49.400
So my unknowns are the
voltages, the four voltages,

00:05:49.400 --> 00:05:50.950
and the five currents.

00:05:50.950 --> 00:05:55.130
That's what the
engineer needs to know.

00:05:55.130 --> 00:06:01.280
So first of all, when I multiply
A times v, what do I get?

00:06:01.280 --> 00:06:04.370
Let me just do that
multiplication.

00:06:04.370 --> 00:06:12.270
So that first row times that
gives me v2 minus v1, right?

00:06:12.270 --> 00:06:15.980
The dot product of the
row with the vector.

00:06:15.980 --> 00:06:20.560
The next one is v3 minus v1.

00:06:20.560 --> 00:06:22.400
Then I have a minus 1 there.

00:06:22.400 --> 00:06:25.850
It's a v3 minus a v2.

00:06:25.850 --> 00:06:28.040
Then I have a minus 1 and a 1.

00:06:28.040 --> 00:06:31.830
I think that's v4 minus v1.

00:06:31.830 --> 00:06:34.800
And finally, this
dot product of that

00:06:34.800 --> 00:06:39.450
will give me a v4 minus v2.

00:06:39.450 --> 00:06:41.830
So what am I seeing here?

00:06:41.830 --> 00:06:47.670
This is now A times v.
I've done a multiplication

00:06:47.670 --> 00:06:50.930
by a vector of voltages.

00:06:50.930 --> 00:06:52.460
And what have I found?

00:06:52.460 --> 00:06:54.840
I found the differences
in voltages,

00:06:54.840 --> 00:06:59.005
the voltage difference
between one end

00:06:59.005 --> 00:07:02.270
of the edge and the other one.

00:07:02.270 --> 00:07:05.960
I have five edges and
now I have five results

00:07:05.960 --> 00:07:07.680
and those are the
voltage differences.

00:07:07.680 --> 00:07:10.020
And what does a
difference in voltage

00:07:10.020 --> 00:07:15.670
do if these are at different
voltages, different potentials?

00:07:15.670 --> 00:07:17.270
Current flows.

00:07:17.270 --> 00:07:21.120
If they're at the same
potential, no current flows,

00:07:21.120 --> 00:07:22.242
right?

00:07:22.242 --> 00:07:25.840
That's the fundamental
driving equation

00:07:25.840 --> 00:07:32.690
of currents from voltages is
the difference in the voltage.

00:07:32.690 --> 00:07:35.830
The difference in the
potential drives the flow.

00:07:35.830 --> 00:07:37.468
And now, how much flow?

00:07:41.260 --> 00:07:43.960
So now I'm looking
for the flows.

00:07:43.960 --> 00:07:48.640
So can I call those
w, for the flows.

00:07:48.640 --> 00:07:52.170
So I have a w2 is the
flow on that edge.

00:07:52.170 --> 00:07:54.520
A w1 is a flow there.

00:07:54.520 --> 00:07:57.465
A w5, a w3, and a w4.

00:08:01.320 --> 00:08:05.360
My pair of unknowns-- and that's
the beauty of this picture--

00:08:05.360 --> 00:08:11.900
is the voltages v1 to v4 four
at the nodes, and the currents,

00:08:11.900 --> 00:08:17.970
the flows, w1 to w5
on the five edges.

00:08:17.970 --> 00:08:23.560
And I've seen that Av gives
me the voltage differences.

00:08:23.560 --> 00:08:29.930
I'm going to briefly,
briefly approach

00:08:29.930 --> 00:08:34.370
the fundamental laws of
flow, of current flow,

00:08:34.370 --> 00:08:37.640
of flow in any network.

00:08:37.640 --> 00:08:41.970
We're talking about the
most basic equation,

00:08:41.970 --> 00:08:44.540
I would almost say, of
applied mathematics.

00:08:44.540 --> 00:08:49.050
Maybe I should say of
discrete applied mathematics.

00:08:49.050 --> 00:08:53.980
By discrete I mean a
graph without derivatives.

00:08:53.980 --> 00:08:56.600
I'm not seeing
derivatives here, I'm just

00:08:56.600 --> 00:08:58.470
seeing matrices and vectors.

00:09:05.100 --> 00:09:08.720
So I have to remember
that incidence matrix,

00:09:08.720 --> 00:09:11.300
A-- let me write it down again.

00:09:11.300 --> 00:09:15.920
Av gave the voltage differences.

00:09:25.900 --> 00:09:30.670
And that's one
part of my picture.

00:09:30.670 --> 00:09:36.100
Another part is what is the
equation that finally brings it

00:09:36.100 --> 00:09:36.940
together?

00:09:36.940 --> 00:09:42.410
That if I have the currents--
so the v's were the voltages.

00:09:42.410 --> 00:09:45.000
Now, there's going to
be an equation involving

00:09:45.000 --> 00:09:46.420
w, the currents.

00:09:50.980 --> 00:09:53.360
This, what I'm
going to write here,

00:09:53.360 --> 00:09:55.840
is going to be really important.

00:09:55.840 --> 00:10:07.516
It's going to be Kirchhoff's
Current Law, KCL.

00:10:10.850 --> 00:10:15.760
And I just emphasized that there
are two Hs in Kirchhoff's name.

00:10:15.760 --> 00:10:18.570
So Kirchhoff's
Current Law says--

00:10:18.570 --> 00:10:28.220
and pay attention-- it says
that the total flow into a node

00:10:28.220 --> 00:10:30.700
equals the flow out.

00:10:30.700 --> 00:10:33.760
We're talking about
equilibrium here.

00:10:33.760 --> 00:10:39.620
So if current is traveling
around my graph, my network,

00:10:39.620 --> 00:10:48.280
and it's a stable equilibrium
here so that flow into node 1

00:10:48.280 --> 00:10:50.680
equals flow out of node 1.

00:10:50.680 --> 00:10:55.610
And let me tell you
what that equation is

00:10:55.610 --> 00:10:58.290
in terms of the matrix A.

00:10:58.290 --> 00:11:01.560
This voltage difference
is involved A

00:11:01.560 --> 00:11:06.290
and, beautifully, the
Kirchhoff's Current Law

00:11:06.290 --> 00:11:08.410
involves A transpose.

00:11:08.410 --> 00:11:11.865
So A transpose now is 4 by 5.

00:11:14.770 --> 00:11:19.880
These are the flows, a
vector with five components

00:11:19.880 --> 00:11:21.520
because I have five edges.

00:11:21.520 --> 00:11:27.410
And Kirchhoff's Current
Law would say that's 0.

00:11:27.410 --> 00:11:34.310
So between A and A transpose,
the incidence matrix

00:11:34.310 --> 00:11:39.870
is leading me to the fundamental
equilibrium condition

00:11:39.870 --> 00:11:41.830
for flow in a network.

00:11:41.830 --> 00:11:47.180
Now, one more law is needed.

00:11:47.180 --> 00:11:51.520
It has to connect voltage
differences to flows,

00:11:51.520 --> 00:11:55.210
potentials to currents.

00:11:55.210 --> 00:12:03.780
Do you know who created that
law in electrical engineering?

00:12:03.780 --> 00:12:05.030
It was Ohm.

00:12:05.030 --> 00:12:17.640
So Ohm's Law, finally,
Ohm's Law is edge by edge

00:12:17.640 --> 00:12:24.386
that the potential difference,
the drop in potential,

00:12:24.386 --> 00:12:29.590
the potential forcing current
is proportional to the current.

00:12:33.346 --> 00:12:38.270
So voltage difference--
let me write it in words.

00:12:38.270 --> 00:12:44.530
Voltage difference--
voltage drop

00:12:44.530 --> 00:12:56.670
I could say-- between the
ends or across a resistor

00:12:56.670 --> 00:13:02.520
is proportional to, and
there is some resistance,

00:13:02.520 --> 00:13:04.490
some physical number
comes in here.

00:13:04.490 --> 00:13:10.150
This is where the material
we're working with comes in.

00:13:10.150 --> 00:13:13.690
In Kirchhoff's Laws, those
laws hold for a network

00:13:13.690 --> 00:13:16.810
before we even say what
the network is made of.

00:13:16.810 --> 00:13:21.180
But now if our network is
made of resistors or pipes

00:13:21.180 --> 00:13:26.697
or whatever we have, then
this will be some conductance.

00:13:30.280 --> 00:13:43.100
So E equal IR, some resistance,
times the flow, times

00:13:43.100 --> 00:13:53.260
the current flow, w.

00:13:53.260 --> 00:13:56.330
So a difference in
v's is some number,

00:13:56.330 --> 00:13:58.730
this is the physical
constant that we

00:13:58.730 --> 00:14:09.140
have to measure in a lab to know
how many ohms our resistor is.

00:14:09.140 --> 00:14:11.910
That equation is on each edge.

00:14:11.910 --> 00:14:16.290
So we have a bunch of
equations and together they

00:14:16.290 --> 00:14:22.910
tell us the four voltages
and the five currents.

00:14:22.910 --> 00:14:28.700
And maybe I'll just make
the main point here.

00:14:28.700 --> 00:14:32.930
The main point is that
this matrix is crucial.

00:14:32.930 --> 00:14:34.160
A is crucial.

00:14:34.160 --> 00:14:36.180
A transpose is crucial.

00:14:36.180 --> 00:14:39.640
A gives voltage differences,
it makes something happen.

00:14:39.640 --> 00:14:47.352
A transpose is the balance law,
the balance or current balance

00:14:47.352 --> 00:14:48.641
at each node.

00:14:52.440 --> 00:14:56.210
And you won't be surprised
that when the whole thing is

00:14:56.210 --> 00:15:01.370
put together and we have
a final equation to solve,

00:15:01.370 --> 00:15:04.845
we end up with A
transpose and A.

00:15:04.845 --> 00:15:08.660
And that magic
combination, A transpose A,

00:15:08.660 --> 00:15:13.510
is central to graph theory.

00:15:13.510 --> 00:15:16.870
It's called the graph
Laplacian and has

00:15:16.870 --> 00:15:19.950
a name and a fame of its own.

00:15:19.950 --> 00:15:21.820
Thank you.