WEBVTT
00:00:06.150 --> 00:00:07.720
NIKOLA KAMBUROV: Hi, guys.
00:00:07.720 --> 00:00:10.320
Today we're going
to see how one can
00:00:10.320 --> 00:00:14.620
use linear algebra to
describe graphs and networks.
00:00:14.620 --> 00:00:17.260
In particular, we'll do
the following problem.
00:00:17.260 --> 00:00:20.550
We're given this very
simple graph here
00:00:20.550 --> 00:00:23.270
with five nodes and six edges.
00:00:23.270 --> 00:00:25.410
We've already labeled
them, and we've
00:00:25.410 --> 00:00:27.620
put directions on the edges.
00:00:27.620 --> 00:00:31.840
And we are asked to write
down the incidence matrix A,
00:00:31.840 --> 00:00:36.340
and then to compute its kernel
and the kernel of A transpose.
00:00:36.340 --> 00:00:38.010
And finally, we're
asked to compute
00:00:38.010 --> 00:00:39.860
the trace of A transpose A.
00:00:39.860 --> 00:00:44.700
I'll give you a few moments to
try the problem on your own.
00:00:44.700 --> 00:00:46.550
And then you'll
see my take on it.
00:00:53.740 --> 00:00:55.060
Hello again.
00:00:55.060 --> 00:00:59.520
OK, so let's first recall
what an incidence matrix is.
00:00:59.520 --> 00:01:00.975
So an incidence
matrix is supposed
00:01:00.975 --> 00:01:05.580
to encode how the nodes
connect to the edges.
00:01:05.580 --> 00:01:08.710
In particular, it
has as many rows
00:01:08.710 --> 00:01:13.030
as there are edges and as many
columns as there are nodes.
00:01:13.030 --> 00:01:19.120
And we're going to
fill in the rows.
00:01:19.120 --> 00:01:22.270
And we'll fill them
out as follows.
00:01:22.270 --> 00:01:27.340
So we're going to use
only negative 1, 1, and 0.
00:01:27.340 --> 00:01:34.070
And we're going to put a
negative 1 in entry i and 1
00:01:34.070 --> 00:01:42.420
in entry j if the corresponding
edge connects node i to node j.
00:01:42.420 --> 00:01:44.440
OK, let me just
do it concretely.
00:01:44.440 --> 00:01:48.160
So let's look at edge number 1.
00:01:48.160 --> 00:01:50.850
So it corresponds
to the first row.
00:01:50.850 --> 00:01:52.560
It connects 1 to 2.
00:01:52.560 --> 00:01:58.040
So we have a negative 1 and a 1.
00:01:58.040 --> 00:02:06.910
Then edge number 2, it connects
node 2 to 3, so negative 1, 1.
00:02:06.910 --> 00:02:13.150
Edge number 3 connects node
1 to 3, so negative 1, 1.
00:02:13.150 --> 00:02:15.350
And I believe you get
the picture, right?
00:02:15.350 --> 00:02:19.104
So I'm just going to fill
out the rest of the entries.
00:02:19.104 --> 00:02:27.450
All right, 4 is:
negative 1, to 1.
00:02:27.450 --> 00:02:35.980
5 is: well, 4, well,
negative 1, 1 here.
00:02:35.980 --> 00:02:45.240
And 6 is: negative 1 and 1.
00:02:45.240 --> 00:02:46.090
OK.
00:02:46.090 --> 00:02:50.660
So we've constructed
the matrix A. Now,
00:02:50.660 --> 00:02:53.700
we'll compute its null space.
00:02:53.700 --> 00:02:56.750
And we're going to do it
without performing any row
00:02:56.750 --> 00:02:59.260
operations whatsoever.
00:02:59.260 --> 00:03:04.620
So in order to do this,
it's helpful to look
00:03:04.620 --> 00:03:07.670
at the graph as an
electric circuit
00:03:07.670 --> 00:03:14.310
and to assign to each of the
nodes an electric potential.
00:03:14.310 --> 00:03:18.380
If we collect all the
electric potentials
00:03:18.380 --> 00:03:28.660
in a vector x, then A times x
is a vector with as many entries
00:03:28.660 --> 00:03:33.170
as there are edges
and gives precisely
00:03:33.170 --> 00:03:39.080
the potential differences
across the edges of the graph.
00:03:39.080 --> 00:03:45.930
OK, so then if A*x is to be
0, this means that across
00:03:45.930 --> 00:03:49.920
the graph, across all
the edges of the graph,
00:03:49.920 --> 00:03:53.740
all potential differences are 0.
00:03:53.740 --> 00:04:02.700
Therefore, all the
potentials at all the nodes
00:04:02.700 --> 00:04:05.000
need to be equal to
a constant number.
00:04:05.000 --> 00:04:14.690
So therefore, we conclude
that the null space of A
00:04:14.690 --> 00:04:22.980
is spanned by constant 1.
00:04:22.980 --> 00:04:24.260
OK?
00:04:24.260 --> 00:04:27.320
There are five 1's
here, corresponding
00:04:27.320 --> 00:04:29.820
to the five nodes.
00:04:29.820 --> 00:04:33.405
Now what about the null
space of A transpose?
00:04:36.120 --> 00:04:40.250
Adopt this analogy
with electric circuits.
00:04:40.250 --> 00:04:44.930
But this time, we're going
to look at currents flowing
00:04:44.930 --> 00:04:46.705
across the edges of the graph.
00:04:49.830 --> 00:04:52.320
Oh, and we are going to adopt
the following convention
00:04:52.320 --> 00:04:53.270
for the currents.
00:04:53.270 --> 00:04:59.330
So a current is
going to be positive
00:04:59.330 --> 00:05:03.295
if it flows in the direction
of the edge and negative
00:05:03.295 --> 00:05:05.950
if it flows in the
opposite direction.
00:05:05.950 --> 00:05:06.620
Right.
00:05:06.620 --> 00:05:13.820
So then, what is A
transpose y, where
00:05:13.820 --> 00:05:24.460
y is a vector, each of
whose entries is a current
00:05:24.460 --> 00:05:25.690
on the edge?
00:05:25.690 --> 00:05:30.945
Well, the entries
of A transpose y
00:05:30.945 --> 00:05:36.530
are precisely equal to the total
current flowing through each
00:05:36.530 --> 00:05:38.270
of the nodes of the graph.
00:05:38.270 --> 00:05:41.690
So A transpose y
being equal to 0
00:05:41.690 --> 00:05:45.020
means that there is a
balance in the circuit,
00:05:45.020 --> 00:05:49.560
that the currents that
flow into each node
00:05:49.560 --> 00:05:54.210
equal the currents
that flow out of it.
00:05:54.210 --> 00:05:56.190
Right.
00:05:56.190 --> 00:06:00.520
And it's fairly easy to
find such a configuration
00:06:00.520 --> 00:06:08.340
of currents that satisfies
this balance equation.
00:06:08.340 --> 00:06:12.370
We do it by flowing
around loops of the graph.
00:06:12.370 --> 00:06:19.830
So you see, this
graph has three loops.
00:06:19.830 --> 00:06:26.800
The first one is this
triangle up there.
00:06:26.800 --> 00:06:29.720
The second one is this square.
00:06:29.720 --> 00:06:35.330
And I'm just, by this
curled direction,
00:06:35.330 --> 00:06:42.050
I'm signifying in which way
I'm going to trace the loop.
00:06:42.050 --> 00:06:46.350
And there is third
loop, is along
00:06:46.350 --> 00:06:49.340
the outer contour of the graph.
00:06:49.340 --> 00:06:53.780
But in fact, the
third one can be
00:06:53.780 --> 00:06:57.850
thought of as a
superposition of these two,
00:06:57.850 --> 00:07:02.630
and I'll explain
why in a second.
00:07:02.630 --> 00:07:08.580
So let's figure out the
configuration of currents
00:07:08.580 --> 00:07:10.990
that balances these loops.
00:07:10.990 --> 00:07:18.120
So if we flow a
current 1 from 1 to 2
00:07:18.120 --> 00:07:24.940
and then flow a current of
1 along edge 2, from 2 to 3,
00:07:24.940 --> 00:07:28.580
and then we flow a
current of negative 1,
00:07:28.580 --> 00:07:30.160
mind that the
direction is opposite
00:07:30.160 --> 00:07:32.280
to the direction
of the loop, then
00:07:32.280 --> 00:07:36.400
we're going to have a balanced
configuration of currents.
00:07:36.400 --> 00:07:42.060
So let me write this down.
00:07:42.060 --> 00:07:52.430
The following configuration, so
1 along edge 1, 1 along edge 2,
00:07:52.430 --> 00:07:59.160
and negative 1 along
edge 3, and the rest 0,
00:07:59.160 --> 00:08:01.060
is a solution to A transpose y.
00:08:03.770 --> 00:08:11.170
Let's see what solution
we get by flowing around
00:08:11.170 --> 00:08:13.080
the loop in the square.
00:08:13.080 --> 00:08:23.170
Well, we flow a current
of 1 along edge 4,
00:08:23.170 --> 00:08:27.820
current of 1 along edge 5,
current of 1 along edge 6,
00:08:27.820 --> 00:08:30.980
and current of negative
1 along edge 2.
00:08:30.980 --> 00:08:33.929
So let's be careful.
00:08:33.929 --> 00:08:40.496
So it was 0, then along
edge 2 was negative 1.
00:08:40.496 --> 00:08:46.920
Along 3: 0; along 4: 1;
along 5: 1; along 6: 1.
00:08:49.610 --> 00:08:54.260
Now we can do the same
thing with the big loop
00:08:54.260 --> 00:08:58.330
and produce a vector
corresponding to it.
00:08:58.330 --> 00:09:01.770
And I prompt you to do it.
00:09:01.770 --> 00:09:06.110
But what you'll see is that
the vector that you get
00:09:06.110 --> 00:09:10.350
is precisely a sum
of these two vectors.
00:09:10.350 --> 00:09:12.880
In a way, the big loop
is a superposition
00:09:12.880 --> 00:09:15.380
of the small loops.
00:09:15.380 --> 00:09:21.740
OK, so we figured out what the
null space of A transpose is.
00:09:21.740 --> 00:09:24.680
And now, let's
concentrate our attention
00:09:24.680 --> 00:09:28.950
on finding the trace
of A transpose A. We're
00:09:28.950 --> 00:09:32.480
going to do it right here.
00:09:32.480 --> 00:09:38.240
So the trace of a matrix is the
sum of its diagonal entries.
00:09:38.240 --> 00:09:44.690
And we've seen this
many times already,
00:09:44.690 --> 00:09:50.550
that the diagonal
entries of A transpose A
00:09:50.550 --> 00:09:56.730
are precisely the magnitudes
squared of the columns of A.
00:09:56.730 --> 00:09:59.090
OK?
00:09:59.090 --> 00:10:03.870
So the (1, 1) entry
is the magnitude
00:10:03.870 --> 00:10:05.490
squared of the first column.
00:10:05.490 --> 00:10:07.520
The (2, 2) entry
is the magnitude
00:10:07.520 --> 00:10:10.460
squared of the second
column, and so on.
00:10:10.460 --> 00:10:13.860
Now what is the
magnitude squared
00:10:13.860 --> 00:10:17.040
of a column of an
incidence matrix?
00:10:17.040 --> 00:10:26.940
Well, each entry in a column
of an incidence matrix
00:10:26.940 --> 00:10:30.970
is either 1, negative 1, or 0.
00:10:30.970 --> 00:10:35.630
So when we square these
entries, we get 1's or 0's.
00:10:35.630 --> 00:10:39.580
And when we add them up,
we get precisely a number
00:10:39.580 --> 00:10:44.430
which is the nontrivial
entries in that column.
00:10:44.430 --> 00:10:45.450
OK?
00:10:45.450 --> 00:10:47.770
So the magnitude
squared of the column
00:10:47.770 --> 00:10:49.970
is the number of
nontrivial entries in it.
00:10:49.970 --> 00:10:53.210
But if we go back
to the matrix A,
00:10:53.210 --> 00:11:01.230
and we count the number
of non-zero entries,
00:11:01.230 --> 00:11:07.220
this is precisely the number of
edges that connect with a node.
00:11:07.220 --> 00:11:11.440
OK, so the number of edges
that connects with each node
00:11:11.440 --> 00:11:14.580
is called the
degree of the node.
00:11:14.580 --> 00:11:20.440
In this way, trace
of A transpose A
00:11:20.440 --> 00:11:25.440
will be just the
sum of the degrees
00:11:25.440 --> 00:11:28.600
of the graph in the picture.
00:11:28.600 --> 00:11:37.410
So we have there are 2
edges connecting to 1, so 2,
00:11:37.410 --> 00:11:48.940
plus 3 edges connecting to
2, 3 edges connecting to 3.
00:11:48.940 --> 00:11:54.560
And we've got a 2 for the
number of edges connecting to 4,
00:11:54.560 --> 00:11:57.040
and 2 for the number of
edges connecting to 5.
00:11:57.040 --> 00:12:01.625
So altogether, we get 12.
00:12:04.600 --> 00:12:12.440
So you see, in this problem, we
computed certain linear algebra
00:12:12.440 --> 00:12:17.980
objects without performing the
usual algebraic operations,
00:12:17.980 --> 00:12:22.360
but just by looking at
the graph and seeing
00:12:22.360 --> 00:12:25.520
how the linear algebra
is encoded in it.
00:12:25.520 --> 00:12:28.260
I hope it was most illuminating.
00:12:28.260 --> 00:12:30.092
I'll see you next time.