A more formal understanding of functions

WEBVTT
Kind: captions
Language: en

00:00:00.600 --> 00:00:04.340
I think you've been exposed to
the idea of a function at some

00:00:04.340 --> 00:00:06.500
point in your mathematical
career.

00:00:06.500 --> 00:00:08.840
But what I want to do in this
video is explain it a little

00:00:08.840 --> 00:00:11.550
bit more formerly than you might
be used to, and then

00:00:11.550 --> 00:00:14.420
relate it to some of the
concepts of vectors and linear

00:00:14.420 --> 00:00:15.945
algebra that we've
seen so far.

00:00:19.585 --> 00:00:23.340
A function really is just a
relation between the members

00:00:23.340 --> 00:00:25.590
of one set and the members
of the other set.

00:00:25.590 --> 00:00:34.070
So let's have some set x, and
for every member of that set x

00:00:34.070 --> 00:00:37.740
I'm going to relate that member,
or associate that

00:00:37.740 --> 00:00:41.075
member, with another
member of a set y.

00:00:43.850 --> 00:00:53.490
So if I imagine that is my set
x, and that this is my set y--

00:00:53.490 --> 00:00:55.830
and y doesn't have to be
smaller, that's just the way I

00:00:55.830 --> 00:00:58.110
drew it-- the function
is just a relation.

00:00:58.110 --> 00:01:03.290
That if I just take a member of
my set x, let's see that's

00:01:03.290 --> 00:01:04.640
the member that I'm
taking, we're

00:01:04.640 --> 00:01:06.640
visualizing it as a point.

00:01:06.640 --> 00:01:10.420
This function will say, OK you
gave me a member of x, then I

00:01:10.420 --> 00:01:12.930
will give you a member
of y associated with

00:01:12.930 --> 00:01:14.660
that member of x.

00:01:14.660 --> 00:01:18.470
So the function will say, you
give me that, then I will map

00:01:18.470 --> 00:01:24.330
it to that member right there.

00:01:24.330 --> 00:01:27.430
And that really just means
relating it to, or associating

00:01:27.430 --> 00:01:29.200
with another member of y.

00:01:29.200 --> 00:01:33.780
And if you'd give me some other
point right here, I'll

00:01:33.780 --> 00:01:36.000
relate it to another
member of y.

00:01:40.170 --> 00:01:43.240
I might even relate it to
the same member of y.

00:01:43.240 --> 00:01:46.220
And so this notation just says
this is a mapping from one set

00:01:46.220 --> 00:01:48.940
x, and I'm speaking in
very general terms,

00:01:48.940 --> 00:01:50.990
to another set y.

00:01:50.990 --> 00:01:53.840
And so you're probably saying,
Hey Sal, this is very

00:01:53.840 --> 00:01:56.260
abstract, how does this relate
to the functions that I've

00:01:56.260 --> 00:01:58.320
seen in the past?

00:01:58.320 --> 00:02:01.180
Well let me just write down a
function you've probably seen

00:02:01.180 --> 00:02:05.520
a lot in the past. You've
dealt with f of x

00:02:05.520 --> 00:02:08.330
is equal to x squared.

00:02:08.330 --> 00:02:10.520
How would we write this
in this notation?

00:02:10.520 --> 00:02:13.260
Well this is a function,
assuming that it's kind of the

00:02:13.260 --> 00:02:14.940
traditional way that
you see it.

00:02:17.700 --> 00:02:20.520
Let me just write with the f,
I was going to write it with

00:02:20.520 --> 00:02:22.880
the g of x, just so this doesn't
always have to be an

00:02:22.880 --> 00:02:25.320
f, but I think you
get that idea.

00:02:25.320 --> 00:02:31.400
In this case f is a mapping from
real numbers-- the real

00:02:31.400 --> 00:02:33.810
numbers are everything that I
can put in here-- actually

00:02:33.810 --> 00:02:35.720
this is part of the function
definition.

00:02:35.720 --> 00:02:39.050
I could constrain this to just
be integers, or just be even

00:02:39.050 --> 00:02:41.160
numbers, or just be
even integers.

00:02:41.160 --> 00:02:43.790
But this is part of the function
definition, I'm

00:02:43.790 --> 00:02:48.000
defining the function to be a
mapping from real numbers.

00:02:48.000 --> 00:02:50.290
I'm saying you can put any real
number here, and it's

00:02:50.290 --> 00:02:56.860
going to map to real numbers.

00:02:56.860 --> 00:03:00.000
So in this case, if x is real
numbers, it's going to map to

00:03:00.000 --> 00:03:04.230
itself, which is completely
legitimate.

00:03:04.230 --> 00:03:06.420
So if this is the real numbers--
and obviously the

00:03:06.420 --> 00:03:08.660
real numbers would go off in
every direction forever-- but

00:03:08.660 --> 00:03:11.790
if this for real numbers, this
function mapping is just

00:03:11.790 --> 00:03:16.800
taking every point in
R and mapping it to

00:03:16.800 --> 00:03:17.690
another point in R.

00:03:17.690 --> 00:03:20.580
It's taking every point and
associating with it its

00:03:20.580 --> 00:03:21.780
perfect square.

00:03:21.780 --> 00:03:24.240
And I want to make a very subtle
notation-- or at least

00:03:24.240 --> 00:03:26.880
in my mind the first time that
I got exposed to functions I

00:03:26.880 --> 00:03:29.680
was thinking, you give me an
x and I square it, and I'm

00:03:29.680 --> 00:03:31.060
giving you the square of x.

00:03:31.060 --> 00:03:32.550
And that's true, you
are doing that.

00:03:32.550 --> 00:03:34.690
But at least the way my brain
worked, I kind of thought of

00:03:34.690 --> 00:03:37.730
it as I was changing my
x into another number.

00:03:37.730 --> 00:03:39.770
And you can maybe view it that
way, and that might actually

00:03:39.770 --> 00:03:41.150
be the best way to view it.

00:03:41.150 --> 00:03:45.400
But the mathematical definition
I'm introducing

00:03:45.400 --> 00:03:55.190
here is more that I'm
associating x with x squared.

00:03:55.190 --> 00:03:58.990
This is another function
notation of writing this exact

00:03:58.990 --> 00:03:59.630
same thing.

00:03:59.630 --> 00:04:03.010
These two statements right here,
this statement and this

00:04:03.010 --> 00:04:04.530
statement are identical.

00:04:04.530 --> 00:04:07.860
This statement you've probably
never seen before, but I like

00:04:07.860 --> 00:04:11.160
it because it shows the mapping
or the association

00:04:11.160 --> 00:04:16.660
more, while this association I
think that you're putting an x

00:04:16.660 --> 00:04:20.660
into a little meat grinder or
some machine that's going to

00:04:20.660 --> 00:04:23.480
ground up the x or square the x,
or do whatever it needs to

00:04:23.480 --> 00:04:24.410
do to the x.

00:04:24.410 --> 00:04:27.620
This notation to me implies
the actual mapping.

00:04:27.620 --> 00:04:30.070
You give me an x, and I'm going
to associate another

00:04:30.070 --> 00:04:32.860
number in real numbers
called x squared.

00:04:32.860 --> 00:04:34.510
So it's going to be just
another point.

00:04:34.510 --> 00:04:38.260
And just as a little bit of
terminology, and I think

00:04:38.260 --> 00:04:42.910
you've seen this terminology
before, the set that you are

00:04:42.910 --> 00:04:46.610
mapping from is called the
domain and it's part of the

00:04:46.610 --> 00:04:47.660
function definition.

00:04:47.660 --> 00:04:51.620
I, as the function creator, have
to tell you that every

00:04:51.620 --> 00:04:55.010
valid input here has to be
a set of real numbers.

00:04:55.010 --> 00:05:02.920
Now the set that I'm mapping
to is called the codomain.

00:05:08.620 --> 00:05:10.810
The obvious question that you're
probably asking is, hey

00:05:10.810 --> 00:05:15.660
Sal, when I learned all of this
function stuff in algebra

00:05:15.660 --> 00:05:18.630
II or whenever you first learned
it, we never used this

00:05:18.630 --> 00:05:19.880
codomain word.

00:05:22.770 --> 00:05:27.100
We have this idea of range, I
learned the word range when I

00:05:27.100 --> 00:05:28.840
was in 9th or 10th grade.

00:05:28.840 --> 00:05:33.290
How does this codomain
relate to range?

00:05:33.290 --> 00:05:35.610
And it's a very subtle
notation.

00:05:35.610 --> 00:05:38.670
So the codomain is a set that
you're mapping to, and in this

00:05:38.670 --> 00:05:42.035
example this is the codomain.

00:05:42.035 --> 00:05:44.390
In this example, the real
numbers are the

00:05:44.390 --> 00:05:46.480
domain and the codomain.

00:05:46.480 --> 00:05:49.080
So the question is how does
the range relate to this?

00:05:49.080 --> 00:05:52.060
So the codomain is the
set that can be

00:05:52.060 --> 00:05:53.640
possibly mapped to.

00:05:53.640 --> 00:05:55.530
You're not necessarily
mapping to every

00:05:55.530 --> 00:05:56.700
point in the codomain.

00:05:56.700 --> 00:05:59.240
I'm just saying that this
function is generally mapping

00:05:59.240 --> 00:06:02.150
from members of this
set to that set.

00:06:02.150 --> 00:06:07.920
The range is the subset --
let me write it this way.

00:06:07.920 --> 00:06:10.080
It could be equal
to the codomain.

00:06:10.080 --> 00:06:12.210
It's some subset.

00:06:12.210 --> 00:06:15.440
A set is a subset of itself,
every member of a set is also

00:06:15.440 --> 00:06:19.320
a member of itself, so it's
a subset of itself.

00:06:19.320 --> 00:06:29.830
So range is a subset of the
codomain which the function

00:06:29.830 --> 00:06:31.150
actually maps to.

00:06:43.585 --> 00:06:45.350
So let me give you an example.

00:06:45.350 --> 00:06:52.380
Let's say I define the function
g, and it is a

00:06:52.380 --> 00:06:56.890
mapping from the set
of real numbers.

00:06:56.890 --> 00:07:03.450
Let me say it's a mapping
from R2 to R.

00:07:03.450 --> 00:07:06.270
So I'm essentially taking
2-tuples and I'm

00:07:06.270 --> 00:07:07.360
mapping it to R.

00:07:07.360 --> 00:07:11.650
And I will define g, I'll
write it a couple

00:07:11.650 --> 00:07:13.670
of different ways.

00:07:13.670 --> 00:07:19.170
So now I'm going to take g of
two values, I could say xy or

00:07:19.170 --> 00:07:20.380
I could say x1, x2.

00:07:20.380 --> 00:07:21.580
Let me do it that way.

00:07:21.580 --> 00:07:32.870
g of x1, x2 is always
equal to 2.

00:07:32.870 --> 00:07:38.680
It's a mapping from R2 to R,
but this always equals 2.

00:07:38.680 --> 00:07:41.050
And let me actually write the
other notation just because

00:07:41.050 --> 00:07:42.365
you probably haven't
seen this much.

00:07:46.450 --> 00:07:53.630
g maps any points x1 and
x2 to the point 2.

00:07:53.630 --> 00:07:55.670
This makes the mapping
a little bit clearer.

00:07:55.670 --> 00:07:59.183
But just to get the notation
right, what is our domain?

00:08:02.560 --> 00:08:03.600
What's the real number?

00:08:03.600 --> 00:08:05.760
That was part of my function
definition, I said we're

00:08:05.760 --> 00:08:09.980
mapping from R2, so
my domain is R2.

00:08:13.310 --> 00:08:14.760
Now what is my codomain?

00:08:20.110 --> 00:08:23.230
My codomain is the set that I'm
potentially mapping to,

00:08:23.230 --> 00:08:25.480
and is part of the function
definition.

00:08:25.480 --> 00:08:27.750
This by definition
is the codomain.

00:08:27.750 --> 00:08:30.030
So my codomain is R.

00:08:30.030 --> 00:08:33.190
Now what is the range
of my function?

00:08:36.390 --> 00:08:40.159
The range is the set of values
that the function

00:08:40.159 --> 00:08:41.770
actually maps to.

00:08:41.770 --> 00:08:45.710
In this case, we always map to
the value 2, so the range is

00:08:45.710 --> 00:08:47.480
actually just the value 2.

00:08:47.480 --> 00:08:50.650
And if we were to visualize
this-- R2 is actually-- I

00:08:50.650 --> 00:08:53.300
wouldn't draw it as a blurb, I
would draw it as the entire

00:08:53.300 --> 00:08:57.130
Cartesian space, but I'm just
giving you an abstract notion.

00:08:57.130 --> 00:08:57.950
That's R2.

00:08:57.950 --> 00:09:00.270
If I really have to draw R, I'd
draw it as some type of a

00:09:00.270 --> 00:09:01.840
number line.

00:09:01.840 --> 00:09:03.740
Actually let me do it that way
just for fun, you don't

00:09:03.740 --> 00:09:05.260
normally see it written
that way.

00:09:05.260 --> 00:09:09.220
But I could just draw R like
that's R2, and I could just

00:09:09.220 --> 00:09:11.620
draw R as some straight line.

00:09:11.620 --> 00:09:14.350
So this is the set R.

00:09:14.350 --> 00:09:16.150
I could draw it like that
as well, but let's just

00:09:16.150 --> 00:09:17.270
say this is set R.

00:09:17.270 --> 00:09:23.780
And my function g essentially
maps any point over here to

00:09:23.780 --> 00:09:27.080
exactly the point 2.

00:09:27.080 --> 00:09:29.050
2 is just one little
point in R.

00:09:29.050 --> 00:09:36.200
My function g takes any point in
R2, any coordinate, this is

00:09:36.200 --> 00:09:40.630
the point 3, minus 5,
whatever it is.

00:09:40.630 --> 00:09:43.080
It always maps it to
the point 2 in R.

00:09:43.080 --> 00:09:45.830
So if I think that point it
maps it to the point 2.

00:09:45.830 --> 00:09:48.720
That's what g always does.

00:09:48.720 --> 00:09:52.980
So g's codomain-- you could
say it's all of the real

00:09:52.980 --> 00:09:55.205
numbers, but it's range
is really just 2.

00:10:00.040 --> 00:10:02.690
Let me do another example that
might be interesting.

00:10:02.690 --> 00:10:12.920
If I just write h is a function
that goes from R2 to

00:10:12.920 --> 00:10:18.610
R3, and I'll be a little
careful here, h

00:10:18.610 --> 00:10:20.480
goes from R2 to R3.

00:10:20.480 --> 00:10:30.385
And I'll write here that h of
x1, x2 is equal to -- so now

00:10:30.385 --> 00:10:33.140
I'm mapping a higher dimension
space, so I'm going to say

00:10:33.140 --> 00:10:37.070
that that is going to be equal
to, let's say my first

00:10:37.070 --> 00:10:43.400
coordinate or my first component
at R3 is x1 plus x2.

00:10:43.400 --> 00:10:47.440
Let's say my second coordinate
is x2 minus x1.

00:10:47.440 --> 00:10:52.550
And let's say my third
coordinate is x2 times x1.

00:10:52.550 --> 00:11:00.150
Now what is my domain and my
range and my codomain?

00:11:00.150 --> 00:11:05.140
So my domain by definition
is this right there.

00:11:05.140 --> 00:11:08.230
My codomain by definition
is R3.

00:11:08.230 --> 00:11:11.870
And notice I'm going from a
space that has two dimensions

00:11:11.870 --> 00:11:14.080
to a space it has three
dimensions, or three

00:11:14.080 --> 00:11:14.590
components.

00:11:14.590 --> 00:11:18.070
But I can always associate some
point with x1, x2 with

00:11:18.070 --> 00:11:20.840
some point in my R3 there.

00:11:20.840 --> 00:11:25.840
A slightly trickier question
here is, what is the range?

00:11:25.840 --> 00:11:30.410
Can I always associate every
point-- maybe this wasn't the

00:11:30.410 --> 00:11:32.940
best example because it's not
simple enough -- but can I

00:11:32.940 --> 00:11:42.190
associate every point in R3--
so this is my codomain, my

00:11:42.190 --> 00:11:47.870
domain was R2, and my function
goes from R2 to

00:11:47.870 --> 00:11:49.690
R3, so that's h.

00:11:49.690 --> 00:11:53.410
And so my range, as you could
see, it's not like every

00:11:53.410 --> 00:11:59.710
coordinate you can express
in this way in some way.

00:11:59.710 --> 00:12:00.960
Let me give you an example.

00:12:03.510 --> 00:12:07.110
I could put some x1's and x2's
here and figure it out.

00:12:07.110 --> 00:12:07.660
Let's do that.

00:12:07.660 --> 00:12:15.120
Let's take our h of-- let me use
my other notation-- let's

00:12:15.120 --> 00:12:19.070
say that I said h, and I wanted
to find the mapping

00:12:19.070 --> 00:12:25.130
from the point in R2, let's
say the point 2 comma 3.

00:12:25.130 --> 00:12:28.780
And then my function tells me
that this will map to the

00:12:28.780 --> 00:12:31.880
point in R3.

00:12:31.880 --> 00:12:35.450
I add the two terms, the
2 plus 3, so it's 5.

00:12:35.450 --> 00:12:39.100
I'd find the difference between
x2 and x1-- so 3 minus

00:12:39.100 --> 00:12:43.150
2 is 1-- and then I multiply
the two, 6.

00:12:43.150 --> 00:12:46.370
So clearly this will be in
the range, this is a

00:12:46.370 --> 00:12:48.250
member of the range.

00:12:54.350 --> 00:12:59.330
So for example the point 2, 3,
which might be right there,

00:12:59.330 --> 00:13:02.180
will be mapped to the three
dimensional point, it's kind

00:13:02.180 --> 00:13:04.520
of just drawn as a two
dimensional blurb right there,

00:13:04.520 --> 00:13:07.050
but I think you get the idea,
would be mapped to the three

00:13:07.050 --> 00:13:09.670
dimensional point 5, 1, 6.

00:13:09.670 --> 00:13:12.860
So this is definitely a
member of the range.

00:13:12.860 --> 00:13:22.260
Now my question to you, if I
have some point in R3, let's

00:13:22.260 --> 00:13:33.050
say that this is the
point 5, 1, 0.

00:13:33.050 --> 00:13:36.200
Is this point a member
of the range?

00:13:36.200 --> 00:13:38.790
It's definitely a member of
the codomain, it's in R3.

00:13:38.790 --> 00:13:40.110
It's definitely in
here, and this by

00:13:40.110 --> 00:13:41.900
definition is the codomain.

00:13:41.900 --> 00:13:43.910
But is this in our range?

00:13:46.770 --> 00:13:50.570
5 has to be the sum of two
numbers, the 1 has to be the

00:13:50.570 --> 00:13:53.270
difference of two numbers, and
then the 0 would have to be

00:13:53.270 --> 00:13:55.350
the product of two numbers.

00:13:55.350 --> 00:13:57.790
And clearly we know 5 is the
sum, and 1 is the difference,

00:13:57.790 --> 00:14:00.240
we're dealing with 2 and 3, and
there's no way you can get

00:14:00.240 --> 00:14:02.750
the product of those numbers
to be equal to 0.

00:14:02.750 --> 00:14:08.520
So this guy is not
in the range.

00:14:08.520 --> 00:14:11.210
So the range would be the subset
of all of these points

00:14:11.210 --> 00:14:13.660
in R3, so there'd be a ton of
points that aren't in the

00:14:13.660 --> 00:14:17.250
range, and there'll be a smaller
subset of R3 that is

00:14:17.250 --> 00:14:18.140
in the range.

00:14:18.140 --> 00:14:22.970
Now I want to introduce you to
one more piece of terminology

00:14:22.970 --> 00:14:24.870
when it comes to functions.

00:14:24.870 --> 00:14:28.760
These functions up here, this
function that mapped from

00:14:28.760 --> 00:14:33.690
points in R2 to R, so
its codomain was R.

00:14:33.690 --> 00:14:36.390
This function up here is
probably the most common

00:14:36.390 --> 00:14:38.940
function you see in mathematics,
this is also

00:14:38.940 --> 00:14:40.980
mapping to R.

00:14:40.980 --> 00:14:44.560
These functions that map to R
are called scalar value or

00:14:44.560 --> 00:14:47.300
real value, depending on how
you want to think about it.

00:14:47.300 --> 00:14:51.230
But if they map to a one
dimensional space, we call

00:14:51.230 --> 00:14:54.290
them a scalar valued function,
or a real valued function.

00:15:01.990 --> 00:15:05.000
Which is pretty much all of
the functions that you've

00:15:05.000 --> 00:15:08.270
probably dealt with up to this
point in your mathematical

00:15:08.270 --> 00:15:11.750
career, unless you've taken
some vector calculus.

00:15:11.750 --> 00:15:19.940
Now the functions that map to
spaces or subspaces that have

00:15:19.940 --> 00:15:23.440
more than one dimension-- so if
you map to R or any subset

00:15:23.440 --> 00:15:25.850
of R, you have a real valued
function, or a

00:15:25.850 --> 00:15:27.190
scalar valued function.

00:15:27.190 --> 00:15:32.480
If you map to Rn, where n is
greater than 1, so if you map

00:15:32.480 --> 00:15:37.670
to R2, R3, R4, R100, you're
then dealing with a vector

00:15:37.670 --> 00:15:38.620
valued function.

00:15:38.620 --> 00:15:43.340
So this last function that I
defined over here, h is a

00:15:43.340 --> 00:15:50.270
vector valued function.

00:15:50.270 --> 00:15:54.260
Anyway I think you now have
at least the mathematical

00:15:54.260 --> 00:15:56.870
notational tools to understand
what I'm going to do in the

00:15:56.870 --> 00:15:59.640
rest of this playlist, and
hopefully you found this

00:15:59.640 --> 00:16:01.740
reasonably useful.


Showing that the candidate basis does span C(A)

WEBVTT
Kind: captions
Language: en

00:00:00.640 --> 00:00:03.790
Two videos ago we asked
ourselves if we could find the

00:00:03.790 --> 00:00:06.150
basis for the columns
space of A.

00:00:06.150 --> 00:00:08.440
And I showed you a method
of how to do it.

00:00:08.440 --> 00:00:12.580
You literally put A in reduced
row echelon form, so this

00:00:12.580 --> 00:00:17.230
matrix R is just a reduced
row echelon form of A.

00:00:17.230 --> 00:00:19.040
And you look at its
pivot columns, so

00:00:19.040 --> 00:00:20.290
this is a pivot column.

00:00:20.290 --> 00:00:23.880
It has a 1 and all 0's, this is
a pivot column, 1 and all

00:00:23.880 --> 00:00:27.200
0's, and the 1 is the leading
non-zero term in its row.

00:00:27.200 --> 00:00:29.920
And this is a pivot column, let
me circle them, these guys

00:00:29.920 --> 00:00:31.530
are pivot columns, and
this guy's a pivot

00:00:31.530 --> 00:00:32.890
column right there.

00:00:32.890 --> 00:00:35.200
You look at those in the reduced
row echelon form of

00:00:35.200 --> 00:00:37.140
the matrix, and the
corresponding columns in the

00:00:37.140 --> 00:00:40.870
original matrix will
be your basis.

00:00:40.870 --> 00:00:44.700
So this guy, this guy,
so the first,

00:00:44.700 --> 00:00:47.420
second, and forth columns.

00:00:47.420 --> 00:00:52.730
So if we call this a1, this is
a2, and let's call this a4,

00:00:52.730 --> 00:00:54.980
this would be a3,
and this is a5.

00:00:54.980 --> 00:01:07.410
So we could say that a1, a2,
and a4 are a basis for the

00:01:07.410 --> 00:01:10.020
column span of A.

00:01:10.020 --> 00:01:12.500
And I didn't show you
why two videos ago.

00:01:12.500 --> 00:01:13.960
I just said this is
how you do it.

00:01:13.960 --> 00:01:16.640
You have to take it as a bit
of an article of faith.

00:01:16.640 --> 00:01:18.970
Now in order for these
to be a basis, two

00:01:18.970 --> 00:01:21.030
things have to be true.

00:01:21.030 --> 00:01:24.770
They have to be linearly
independent, and I showed you

00:01:24.770 --> 00:01:29.130
in the very last video, the
second in our series dealing

00:01:29.130 --> 00:01:29.830
with this vector.

00:01:29.830 --> 00:01:34.320
I showed you that by the fact
that this guy is r1, this guy

00:01:34.320 --> 00:01:39.620
is r2, and this guy is r4, it's
clear that these guys are

00:01:39.620 --> 00:01:40.630
linearly independent.

00:01:40.630 --> 00:01:44.290
They each have a 1 in a unique
entry, and the rest of their

00:01:44.290 --> 00:01:45.540
entries are 0.

00:01:48.420 --> 00:01:50.510
We're looking at three pivot
columns right now, but it's

00:01:50.510 --> 00:01:53.030
true if we had n
pivot columns.

00:01:53.030 --> 00:01:55.970
That each pivot column would
have a 1 in a unique place,

00:01:55.970 --> 00:01:57.400
and all the other pivot
columns would

00:01:57.400 --> 00:01:58.790
have 0 in that entry.

00:01:58.790 --> 00:02:01.760
So there's no way that the
other pivot columns, any

00:02:01.760 --> 00:02:04.150
linear combination of the other
ones, could never add up

00:02:04.150 --> 00:02:05.200
to each of them.

00:02:05.200 --> 00:02:08.580
So these are definitely
linearly independent.

00:02:08.580 --> 00:02:11.120
And I showed you in the last
video that if we know that

00:02:11.120 --> 00:02:12.690
these are linearly independent,
we do know that

00:02:12.690 --> 00:02:18.250
they are, given that R has the
same null space as A, we know

00:02:18.250 --> 00:02:20.540
that these guys have to be
linearly independant, I did

00:02:20.540 --> 00:02:22.230
that in the very last video.

00:02:22.230 --> 00:02:25.060
Now the next requirement for a
basis, we checked this one

00:02:25.060 --> 00:02:41.810
off, is to show that a1 a2 and
an, that their span equals the

00:02:41.810 --> 00:02:43.750
column space of A.

00:02:43.750 --> 00:02:46.680
Now the column space of A is
a span of all five of these

00:02:46.680 --> 00:02:50.960
vectors, so I had to throw
a3 in there and a5.

00:02:50.960 --> 00:02:54.060
So to show that just these three
vectors by themselves

00:02:54.060 --> 00:02:58.130
span our column space, we just
have to show that I can

00:02:58.130 --> 00:03:02.210
represent a3 and a5 as
linear combinations

00:03:02.210 --> 00:03:04.950
of a1, a2, and a4.

00:03:04.950 --> 00:03:08.160
If I can do that, then
I can say then

00:03:08.160 --> 00:03:10.890
these guys are redundant.

00:03:10.890 --> 00:03:25.140
Then the span of a1, a2, a3, a4,
and a5 doesn't need the a3

00:03:25.140 --> 00:03:27.500
and the a5 terms, that we can
just reduce it to this.

00:03:27.500 --> 00:03:31.790
Because these guys can be
represented as linear

00:03:31.790 --> 00:03:33.630
combinations of the
other three.

00:03:33.630 --> 00:03:35.340
These guys are redundant.

00:03:35.340 --> 00:03:39.860
And if we can get rid of them
we can show that these guys

00:03:39.860 --> 00:03:41.850
can be represented as linear
combinations of the other,

00:03:41.850 --> 00:03:42.910
then we can get rid of them.

00:03:42.910 --> 00:03:45.620
And then the span of these three
guys would be the same

00:03:45.620 --> 00:03:48.160
as the span of these five guys,
which is of course the

00:03:48.160 --> 00:03:51.350
definition of the column
space of A.

00:03:51.350 --> 00:03:53.430
So let's see if we
can do that.

00:03:57.380 --> 00:04:00.680
Let me fill in each of these
column vectors a1 through a5,

00:04:00.680 --> 00:04:03.380
and then each of these column
vectors let me label them r1,

00:04:03.380 --> 00:04:07.580
r2, r3, r4, and r5.

00:04:07.580 --> 00:04:11.790
Now let's explore the
null spaces again.

00:04:11.790 --> 00:04:14.600
Or not even the null spaces,
let's just explore the

00:04:14.600 --> 00:04:20.610
equations Ax is equal to -- let
me write it this way --

00:04:20.610 --> 00:04:28.390
instead of x let me write x1,
x2, x3, x4, x5 is equal to 0.

00:04:31.050 --> 00:04:33.650
This is how we define the
solution set of this.

00:04:33.650 --> 00:04:37.870
All the potential x1's through
x5's or all the potential

00:04:37.870 --> 00:04:41.480
vectors X right here, that
represents our null space.

00:04:41.480 --> 00:04:50.490
And then also let's explore all
of the R times x1, x2, x3,

00:04:50.490 --> 00:04:53.190
x4, x5's is equal to 0.

00:04:53.190 --> 00:04:56.690
This is the 0 vector, in which
case you would have four

00:04:56.690 --> 00:04:58.210
entries in this particular
case.

00:04:58.210 --> 00:05:00.260
It would be a member of Rm.

00:05:00.260 --> 00:05:02.690
So these equations
can be rewritten.

00:05:02.690 --> 00:05:06.370
I can rewrite this as -- what
were the column vectors of A?

00:05:06.370 --> 00:05:08.480
They were a1, a2 through a5.

00:05:08.480 --> 00:05:18.090
So I can rewrite this as x1
times a1 plus x2 times a2 plus

00:05:18.090 --> 00:05:25.750
x3 times a3 plus x4 times
a4 plus x5 times

00:05:25.750 --> 00:05:34.070
a5 is equal to 0.

00:05:34.070 --> 00:05:36.270
That was from our definition
of matrix vector

00:05:36.270 --> 00:05:40.790
multiplication, this is just a
bunch of column vectors a1

00:05:40.790 --> 00:05:44.250
through a5, I drew it up here.

00:05:44.250 --> 00:05:46.870
I can just rewrite this
equation like this.

00:05:46.870 --> 00:05:51.810
Similiarly, I can rewrite this
equation as the vector r1

00:05:51.810 --> 00:06:02.800
times x1 or x1 times r1 plus x2
times r2 plus x3 times r3

00:06:02.800 --> 00:06:11.820
plus x4 times r4 plus x5
times r5 is equal to 0.

00:06:11.820 --> 00:06:14.690
Now we know that when we put
this into reduced row echelon

00:06:14.690 --> 00:06:20.000
form the x variables that are
associated with the pivot

00:06:20.000 --> 00:06:23.000
columns are -- so what are the
x variables associated with

00:06:23.000 --> 00:06:23.720
the pivot columns?

00:06:23.720 --> 00:06:26.450
Well, the pivot columns
are r1, r2, and r4.

00:06:31.410 --> 00:06:35.070
The x variables associated with
them, we can call them

00:06:35.070 --> 00:06:39.850
pivot variables, and the ones
that are not associated with

00:06:39.850 --> 00:06:42.710
our pivot columns are
free variables.

00:06:42.710 --> 00:06:47.290
So the free variables
in this case, x3 and

00:06:47.290 --> 00:06:49.145
x5, are free variables.

00:06:54.170 --> 00:06:57.610
And that applies to A.

00:06:57.610 --> 00:07:01.410
All of the vectors x that
satisfy this equation also

00:07:01.410 --> 00:07:03.150
satisfy this equation,
and vice versa.

00:07:03.150 --> 00:07:05.910
They're the exact same
null space, the exact

00:07:05.910 --> 00:07:07.160
same solution set.

00:07:09.880 --> 00:07:16.260
We can also call this x3 and
this x5 as free variables.

00:07:16.260 --> 00:07:17.130
Now what does that mean?

00:07:17.130 --> 00:07:19.710
We've done multiple
examples of this.

00:07:19.710 --> 00:07:22.740
The free variables, you can set
them to anything you want.

00:07:22.740 --> 00:07:31.270
So x3 in this case and x5 you
can set it to any real number.

00:07:31.270 --> 00:07:33.010
You can set to anything
you want.

00:07:36.290 --> 00:07:40.200
And then from this reduced row
echelon form we express the

00:07:40.200 --> 00:07:43.340
other pivot variables as
functions of these guys.

00:07:43.340 --> 00:07:51.340
Maybe x1 is equal
to Ax3 plus Bx5.

00:07:51.340 --> 00:07:57.420
Maybe x2 is equal
to Cx3 plus Dx5.

00:07:57.420 --> 00:08:03.750
And maybe x4 is equal
to Ex3 plus Fx5.

00:08:07.220 --> 00:08:11.530
That comes directly out of
literally multiplying this guy

00:08:11.530 --> 00:08:15.010
times this equals 0, you'd get a
system of equations that you

00:08:15.010 --> 00:08:18.740
could solve for your pivot
variables in terms of your

00:08:18.740 --> 00:08:20.980
free variables.

00:08:20.980 --> 00:08:26.390
Now given this, I want to show
you that you can always

00:08:26.390 --> 00:08:31.450
construct one of your -- in
your original matrix.

00:08:31.450 --> 00:08:34.220
So if we go to our original
matrix, you can always

00:08:34.220 --> 00:08:38.059
construct one of the vectors
that are associated with the

00:08:38.059 --> 00:08:39.260
free columns.

00:08:39.260 --> 00:08:42.880
You can always construct one of
the free vectors using the

00:08:42.880 --> 00:08:45.930
linear combination of the ones
that were associated with the

00:08:45.930 --> 00:08:47.100
pivot columns before.

00:08:47.100 --> 00:08:48.710
And how do I do that?

00:08:48.710 --> 00:08:51.570
Well, let's say that I want to
find some linear combination

00:08:51.570 --> 00:08:54.880
that gets me to this free
column, that gets me to a3.

00:08:54.880 --> 00:08:55.810
So how could I do that?

00:08:55.810 --> 00:08:58.330
Let me rearrange this
equation up here.

00:08:58.330 --> 00:08:59.580
So what do I get?

00:09:07.970 --> 00:09:08.210
I'm sorry.

00:09:08.210 --> 00:09:09.360
That's x3 a3.

00:09:09.360 --> 00:09:13.800
If I subtract x3 a3 from both
sides of the equation, I get

00:09:13.800 --> 00:09:23.900
minus x3 a3 is equal to x1 a1
plus x2 a2 plus -- I don't

00:09:23.900 --> 00:09:33.220
have the 3 there -- plus x4 a4
plus x5 -- sorry, x isn't a

00:09:33.220 --> 00:09:34.720
vector-- x5 a5.

00:09:37.380 --> 00:09:39.650
This, I guess salmon colored
statement here, is just

00:09:39.650 --> 00:09:42.800
another rewriting of this
equation right here.

00:09:42.800 --> 00:09:47.620
And all I did is I subtracted
this term right here, x3 a3,

00:09:47.620 --> 00:09:49.900
from both sides of
the equation.

00:09:49.900 --> 00:09:53.410
Now x3 is a free variable.

00:09:53.410 --> 00:09:57.020
We can set it to anything
we want, and so is x5.

00:09:57.020 --> 00:10:00.220
So let's set x3 is
equal to minus 1.

00:10:03.340 --> 00:10:06.795
Then this term right here
becomes a 1, because that was

00:10:06.795 --> 00:10:08.170
a minus x3.

00:10:08.170 --> 00:10:10.060
And let's set x5 equal to 0.

00:10:13.990 --> 00:10:16.750
So if x5 is equal 0, this term
disappears, and I did that

00:10:16.750 --> 00:10:18.150
because x5 is a free variable.

00:10:18.150 --> 00:10:20.300
I can set them to
anything I want.

00:10:20.300 --> 00:10:24.960
Now I've written a3 as a linear
combination of, I guess

00:10:24.960 --> 00:10:28.660
you could call it my potential
basis vectors right now, or

00:10:28.660 --> 00:10:33.810
the vectors a1, a2, and a4.

00:10:33.810 --> 00:10:36.130
They're the vectors in the
original matrix that were

00:10:36.130 --> 00:10:38.850
associated with the
pivot columns.

00:10:38.850 --> 00:10:42.070
Now in order to show that I can
always do this, we have to

00:10:42.070 --> 00:10:49.790
show that for this combination
there's always some x1, x2,

00:10:49.790 --> 00:10:51.660
and x4 that satisfy this.

00:10:51.660 --> 00:10:54.260
Well, of course there's always
some x1, x2 that satisfy this,

00:10:54.260 --> 00:10:57.400
we just have to substitute our
free variables, x3 is equal to

00:10:57.400 --> 00:11:02.900
minus 3 and x5 is equal to 0,
into these equations that we

00:11:02.900 --> 00:11:05.210
get from our system when we did
it with the reduced row

00:11:05.210 --> 00:11:06.460
echelon form.

00:11:10.150 --> 00:11:13.926
In this case you have x1 is
equal to minus A plus 0, x2 is

00:11:13.926 --> 00:11:16.190
equal to minus C, so
on and so forth.

00:11:16.190 --> 00:11:19.600
So you can always do that.

00:11:19.600 --> 00:11:25.390
You can always express the
vectors that are associated

00:11:25.390 --> 00:11:29.170
with the non-pivot columns as
linear combinations of the

00:11:29.170 --> 00:11:31.230
vectors that are associated
with the pivot columns.

00:11:31.230 --> 00:11:35.160
What I just did for a3, you
could just as easily have done

00:11:35.160 --> 00:11:38.180
for a5 by subtracting
this term from both

00:11:38.180 --> 00:11:39.270
sides of the equation.

00:11:39.270 --> 00:11:44.260
Setting x5 to negative 1 and
setting x3 to 0 so that the 3

00:11:44.260 --> 00:11:48.690
term disappears, and you could
run the same exact argument.

00:11:48.690 --> 00:11:52.360
So given that, I've hopefully
shown you, or least helped you

00:11:52.360 --> 00:11:56.240
see or made you comfortable
with the idea, that the

00:11:56.240 --> 00:12:00.000
vectors -- let me do them in a
nice vibrant color -- these

00:12:00.000 --> 00:12:04.480
magenta color vectors here that
are associated with the

00:12:04.480 --> 00:12:10.940
free columns or with the free
variables, the free variables

00:12:10.940 --> 00:12:16.520
were x3 and x5, those were these
columns right here, that

00:12:16.520 --> 00:12:19.390
they can always be expressed as
linear combinations of the

00:12:19.390 --> 00:12:20.150
other columns.

00:12:20.150 --> 00:12:23.370
Because you just have to
manipulate this equation, set

00:12:23.370 --> 00:12:25.940
the coefficient for whatever
you're trying to find a linear

00:12:25.940 --> 00:12:29.950
combination for equal to minus
1, and set all the other free

00:12:29.950 --> 00:12:33.620
variables equal to 0 that
you're not solving for.

00:12:33.620 --> 00:12:39.010
And then you can get a linear
combination of the vectors

00:12:39.010 --> 00:12:41.970
that are associated with
the pivot columns.

00:12:41.970 --> 00:12:45.630
So given that, we've shown you
that these free vectors, and

00:12:45.630 --> 00:12:49.570
I'm using my terminology very
loosely, that these ones that

00:12:49.570 --> 00:12:52.560
are associated with the non
pivot columns can be expressed

00:12:52.560 --> 00:12:55.300
as linear combinations
of these guys.

00:12:55.300 --> 00:12:56.310
So they're unnecessary.

00:12:56.310 --> 00:12:59.970
The span of this is equivalent
to the span of this, the span

00:12:59.970 --> 00:13:04.030
of this is the column space of
A, so the span of this is the

00:13:04.030 --> 00:13:05.390
column space of A.

00:13:05.390 --> 00:13:07.250
So in the last video I showed
you that these guys are

00:13:07.250 --> 00:13:09.860
linearly independent, and now
I've showed you that the span

00:13:09.860 --> 00:13:12.020
of these guys is the
column space of A.

00:13:12.020 --> 00:13:15.270
So now you should be satisfied
that these vectors that are

00:13:15.270 --> 00:13:20.860
associated -- let me do it in
a blue color -- that that

00:13:20.860 --> 00:13:23.800
column vector, this column
vector, and this column

00:13:23.800 --> 00:13:27.260
vector, that are associated with
the pivot columns in the

00:13:27.260 --> 00:13:32.520
reduced row echelon form of
the matrix, do indeed

00:13:32.520 --> 00:13:36.160
represent a basis for the
column space of A.

00:13:36.160 --> 00:13:39.090
Anyway, hopefully you didn't
find that too convoluted.


Showing relation between basis cols and pivot cols

WEBVTT
Kind: captions
Language: en

00:00:00.730 --> 00:00:04.310
In the last video we saw a
method of figuring out what

00:00:04.310 --> 00:00:06.590
the basis for column space is.

00:00:06.590 --> 00:00:09.260
And we use these
exact examples.

00:00:09.260 --> 00:00:11.960
Whereas this was matrix A, I
just took it and I put it in

00:00:11.960 --> 00:00:13.610
reduced row echelon form.

00:00:13.610 --> 00:00:16.920
And I figured out which of these
columns in my reduced

00:00:16.920 --> 00:00:19.330
row echelon form of A,
are pivot columns.

00:00:19.330 --> 00:00:21.490
And it turned out to be the
first one, the second one, and

00:00:21.490 --> 00:00:22.430
the fourth one.

00:00:22.430 --> 00:00:25.510
And then the method is, you say
look, the corresponding

00:00:25.510 --> 00:00:27.940
columns in A-- so the first one,
the second one, and the

00:00:27.940 --> 00:00:31.550
fourth one-- form my basis
for my column space.

00:00:31.550 --> 00:00:34.430
And since they form the basis,
and if you want to know the

00:00:34.430 --> 00:00:37.000
dimension of your basis of your
column space, which is

00:00:37.000 --> 00:00:39.020
also called the rank,
you just say, well

00:00:39.020 --> 00:00:40.230
there's three in there.

00:00:40.230 --> 00:00:42.890
So it has a rank of
one, two, three.

00:00:42.890 --> 00:00:45.350
In this video I want to discuss
a little bit about why

00:00:45.350 --> 00:00:45.890
this worked.

00:00:45.890 --> 00:00:48.370
Why were we able to just take
the corresponding columns?

00:00:48.370 --> 00:00:52.360
Why did linear independence of
these three guys, imply linear

00:00:52.360 --> 00:00:54.060
independence of these
three guys?

00:00:54.060 --> 00:00:57.420
Why was the fact that I can
represent these guys-- this

00:00:57.420 --> 00:01:00.040
guy right here as a linear
combination of these three, or

00:01:00.040 --> 00:01:01.930
this guy as a linear combination
of these three--

00:01:01.930 --> 00:01:06.430
why does that imply that I can
construct this guy as a linear

00:01:06.430 --> 00:01:08.790
combination of my
basis vectors?

00:01:08.790 --> 00:01:12.270
So the first thing that wasn't
too much of a stretch of the

00:01:12.270 --> 00:01:17.380
imagination in the last video,
was the idea that these pivot

00:01:17.380 --> 00:01:19.650
vectors are linearly
independent.

00:01:19.650 --> 00:01:22.980
So r1, r2, and r4.

00:01:22.980 --> 00:01:24.960
And everything I'm doing, I'm
kind of applying to the

00:01:24.960 --> 00:01:27.420
special case just so that it's
easier to understand.

00:01:27.420 --> 00:01:28.630
But it should be
generalizable.

00:01:28.630 --> 00:01:30.950
In fact, it definitely
is generalizable.

00:01:30.950 --> 00:01:35.330
That all of the pivot columns
in reduced row echelon form

00:01:35.330 --> 00:01:37.500
are linearly independent.

00:01:37.500 --> 00:01:40.700
And that's because the very
nature of reduced row echelon

00:01:40.700 --> 00:01:46.040
form, is that you are the only
pivot column that has a 1 in

00:01:46.040 --> 00:01:47.580
that respective row.

00:01:47.580 --> 00:01:50.420
So the only way to construct
it is with that vector.

00:01:50.420 --> 00:01:53.140
You can't construct it with
the other pivot columns

00:01:53.140 --> 00:01:55.420
because they're all going
to have 0 in that row.

00:01:55.420 --> 00:01:57.560
And when I say it's linearly
independent, I'm just saying

00:01:57.560 --> 00:01:59.000
the set of pivot columns.

00:01:59.000 --> 00:02:00.770
So let me say this in general.

00:02:00.770 --> 00:02:12.940
The set of pivot columns for any
reduced row echelon form

00:02:12.940 --> 00:02:17.150
matrix is linearly
independent.

00:02:17.150 --> 00:02:19.000
And it's just a very
straightforward argument.

00:02:19.000 --> 00:02:22.380
Because each column is
going to have a 1 in

00:02:22.380 --> 00:02:25.170
a very unique place.

00:02:25.170 --> 00:02:28.630
All of the other pivot columns
are going to have a 0 in that

00:02:28.630 --> 00:02:29.110
same place.

00:02:29.110 --> 00:02:31.290
And so you can't take any linear
combinations to get to

00:02:31.290 --> 00:02:34.410
that 1 because 0 times anything,
minus or plus 0

00:02:34.410 --> 00:02:36.540
times anything, can never
be equal to 1.

00:02:36.540 --> 00:02:38.560
So I think you can
accept that.

00:02:38.560 --> 00:02:48.250
Now, that means that the
solution to c1 times r1, plus

00:02:48.250 --> 00:02:55.610
c2 times r2, plus, let
me say, c4 times r4.

00:02:55.610 --> 00:02:58.500
The solution to this equation,
because these guys are

00:02:58.500 --> 00:03:00.680
linearly independent, we know
that this only has one

00:03:00.680 --> 00:03:07.200
solution, and that's c1, c2,
and c4 is equal to 0.

00:03:07.200 --> 00:03:08.840
That's the only solution
to that.

00:03:08.840 --> 00:03:12.690
So another way we could say it
is, if we write r times some

00:03:12.690 --> 00:03:18.200
vector x-- well I'll just write
it times this particular

00:03:18.200 --> 00:03:26.680
x-- where I write it as
c1, c2, 0, c4, and

00:03:26.680 --> 00:03:29.460
0 is equal to 0.

00:03:29.460 --> 00:03:32.800
So this will be some special
member of your null space.

00:03:32.800 --> 00:03:35.210
It's a particular solution
to the equation.

00:03:35.210 --> 00:03:39.830
This is equal to one, two,
three, four 0's because we

00:03:39.830 --> 00:03:41.430
have four rows here.

00:03:41.430 --> 00:03:44.270
Now, if we just expand
this out.

00:03:44.270 --> 00:03:51.410
If we just multiply 1 times c1,
plus 0 times c2, minus 1

00:03:51.410 --> 00:03:56.870
times 0, plus 4 times 0, you'll
get-- or actually a

00:03:56.870 --> 00:03:59.770
better way to explain it-- this
multiplication right here

00:03:59.770 --> 00:04:04.120
can be written as-- and we've
seen this multiple times-- c1

00:04:04.120 --> 00:04:13.460
times r1, plus c2 times
r2, plus 0 times r3.

00:04:13.460 --> 00:04:19.589
So we could just ignore that
term, plus c4, c4 times r4,

00:04:19.589 --> 00:04:23.450
plus 0 times r5.

00:04:23.450 --> 00:04:24.850
That's r5 right there.

00:04:24.850 --> 00:04:26.740
All of that equal to 0.

00:04:26.740 --> 00:04:30.360
So the only solution to this,
because we know that these

00:04:30.360 --> 00:04:33.200
three columns are linearly
independent-- or the set of

00:04:33.200 --> 00:04:35.690
just those three columns, those
three pivot columns are

00:04:35.690 --> 00:04:38.050
linearly independent-- the only
solution here is all of

00:04:38.050 --> 00:04:38.720
these equal to 0.

00:04:38.720 --> 00:04:41.120
That's exactly what I
said right up here.

00:04:41.120 --> 00:04:44.870
So the only solution here, where
if these two are 0, is

00:04:44.870 --> 00:04:49.110
that these guys also all have
to equal 0, if I already

00:04:49.110 --> 00:04:50.670
constrain these two.

00:04:50.670 --> 00:04:53.460
Now, the one thing that we've
done over and over again, we

00:04:53.460 --> 00:04:56.790
know that the solution set of
this equation, the solution

00:04:56.790 --> 00:05:03.310
set of Rx is equal to 0, is the
same as the solution set

00:05:03.310 --> 00:05:05.870
of Ax is equal to 0.

00:05:05.870 --> 00:05:06.740
Now, how do we know that?

00:05:06.740 --> 00:05:07.820
Or what do I mean?

00:05:07.820 --> 00:05:11.640
Well the solution set of this
is just the null space.

00:05:11.640 --> 00:05:15.850
The solution set is just
the null space of r.

00:05:15.850 --> 00:05:18.590
It's all of x's that satisfy
this equation.

00:05:18.590 --> 00:05:22.160
And we know that is equal to the
null space of a, because r

00:05:22.160 --> 00:05:24.550
is just a in reduced
row echelon form.

00:05:24.550 --> 00:05:27.240
So this is the null space of
a, is all of the x's that

00:05:27.240 --> 00:05:29.040
satisfy this equation.

00:05:29.040 --> 00:05:34.550
Now, the only version of this
that satisfied this equation

00:05:34.550 --> 00:05:38.440
was when c1, c2, and
c4 are equal to 0.

00:05:38.440 --> 00:05:48.380
So that tells us that the only
version of this, c1, c2, 0,

00:05:48.380 --> 00:05:55.180
c4, 0, that satisfies this
equation, or this equation, is

00:05:55.180 --> 00:05:58.240
when c1, c2, and c4
is equal to 0.

00:05:58.240 --> 00:06:03.390
Or another way of saying that
it if this is vector a1, a2,

00:06:03.390 --> 00:06:07.780
a4 right here, if you multiply
this out, you get c1-- let me

00:06:07.780 --> 00:06:16.760
do it over here, let me do it in
blue-- you get c1 times a1

00:06:16.760 --> 00:06:28.040
plus c2 times a2, and then 0
times a3, plus c4 times a4 is

00:06:28.040 --> 00:06:29.200
equal to 0.

00:06:29.200 --> 00:06:32.820
Now these guys are going to be
linearly independent, if and

00:06:32.820 --> 00:06:37.640
only if the only solution to
this equation is they all

00:06:37.640 --> 00:06:38.930
equal to 0.

00:06:38.930 --> 00:06:41.150
Well we know that the only
solution to this is that they

00:06:41.150 --> 00:06:44.670
all equal 0 because anything
that's a solution to this is a

00:06:44.670 --> 00:06:45.850
solution to this.

00:06:45.850 --> 00:06:50.220
And the only solution to this
was, if I go ahead and I

00:06:50.220 --> 00:06:53.030
constrain these two terms to
being equal to 0, the only

00:06:53.030 --> 00:06:56.320
solution to this is all of
these c's have to be 0.

00:06:56.320 --> 00:06:59.580
So likewise, if I constrain
these to be 0, the only

00:06:59.580 --> 00:07:04.120
solution to this is that c1,
c2, and c4 have to be 0.

00:07:04.120 --> 00:07:09.500
So those guys have to be 0,
which imply that these three

00:07:09.500 --> 00:07:16.580
vectors, a1, a2, and a4, so that
implies that the set a1,

00:07:16.580 --> 00:07:22.950
a2, and a4 are linearly
independent.

00:07:22.950 --> 00:07:23.920
So we're halfway there.

00:07:23.920 --> 00:07:26.970
We've shown that because the
pivot columns here are

00:07:26.970 --> 00:07:28.240
linearly independent.

00:07:28.240 --> 00:07:30.900
We can show and they have
the same solution set.

00:07:30.900 --> 00:07:34.410
The null space of the reduced
row echelon form is the same

00:07:34.410 --> 00:07:36.510
as the null space of our
original matrix.

00:07:36.510 --> 00:07:39.920
We were able to show that the
only solution to c1 times this

00:07:39.920 --> 00:07:43.240
plus c2 times this plus c4 times
this is when all the

00:07:43.240 --> 00:07:46.970
constants are 0, which shows
that these three vectors or a

00:07:46.970 --> 00:07:50.740
set of those three vectors
are definitely linearly

00:07:50.740 --> 00:07:51.900
independent.

00:07:51.900 --> 00:07:55.520
Now, the next thing to prove
that they are a basis, is to

00:07:55.520 --> 00:07:59.990
show that all of the other
column vectors can be

00:07:59.990 --> 00:08:03.420
represented as multiples
of these three guys.

00:08:03.420 --> 00:08:07.440
And I realize, just for the sake
of clarity, or maybe not

00:08:07.440 --> 00:08:09.340
boring you too much, I'll do
that in the next video.

00:08:09.340 --> 00:08:13.100
So in this one we saw that if
the pivot columns are linearly

00:08:13.100 --> 00:08:14.330
independent, they always are.

00:08:14.330 --> 00:08:16.560
All pivot columns, by definition
are linearly

00:08:16.560 --> 00:08:16.830
independent.

00:08:16.830 --> 00:08:19.500
Or the set of pivot columns
are always linearly

00:08:19.500 --> 00:08:22.520
independent when you take away
the non-pivot columns, then

00:08:22.520 --> 00:08:26.000
the corresponding columns in
your original vector are also

00:08:26.000 --> 00:08:26.910
linearly independent.

00:08:26.910 --> 00:08:29.310
In the next one we'll show that
these three guys also

00:08:29.310 --> 00:08:31.910
span your column space.


Dimension of the column space or rank

WEBVTT
Kind: captions
Language: en

00:00:00.450 --> 00:00:06.640
We've seen in several videos
that the column space of a

00:00:06.640 --> 00:00:08.410
matrix is pretty straightforward
to find.

00:00:08.410 --> 00:00:12.380
In this situation the column
space of A is just equal to

00:00:12.380 --> 00:00:16.170
all of the linear combinations
of the column vectors of A.

00:00:16.170 --> 00:00:18.690
Another way of saying all of
the linear combinations is

00:00:18.690 --> 00:00:22.430
just the span of each of
these column vectors.

00:00:22.430 --> 00:00:25.930
So if we call this one
right here a1.

00:00:25.930 --> 00:00:29.050
This is a2, a3, a4.

00:00:29.050 --> 00:00:31.620
This is a5.

00:00:31.620 --> 00:00:37.200
Then the column space of A is
just equal to the span of a1,

00:00:37.200 --> 00:00:43.430
a2, a3, a4, and a5.

00:00:43.430 --> 00:00:44.560
Fair enough.

00:00:44.560 --> 00:00:47.260
But a more interesting question
is whether these guys

00:00:47.260 --> 00:00:50.300
form a basis for the
column space.

00:00:50.300 --> 00:00:53.680
Or even more interesting, what
is the basis for the column

00:00:53.680 --> 00:00:54.450
space of A?

00:00:54.450 --> 00:00:56.080
And in this video I'm going
to show you a method for

00:00:56.080 --> 00:00:58.620
determining the basis, and along
the way we'll get an

00:00:58.620 --> 00:01:00.130
intuition for maybe
why it works.

00:01:00.130 --> 00:01:02.540
And if I have time, actually I
probably won't have time in

00:01:02.540 --> 00:01:02.580
this video.

00:01:02.580 --> 00:01:04.980
In the next video I'll prove
to you why it works.

00:01:08.780 --> 00:01:14.280
So we want to figure out
the basis for the

00:01:14.280 --> 00:01:15.960
column space of A.

00:01:15.960 --> 00:01:24.150
Remember the basis just means
that vectors span, C, A.

00:01:24.150 --> 00:01:26.730
Clearly these vectors span
our column space.

00:01:26.730 --> 00:01:29.150
I mean the span of these vectors
is the column space.

00:01:29.150 --> 00:01:31.420
But in order to be a basis, the
vectors also have to be

00:01:31.420 --> 00:01:35.590
linearly, let me just write,
linearly independent.

00:01:35.590 --> 00:01:39.120
And we don't know whether these
guys or what subset of

00:01:39.120 --> 00:01:42.990
these guys are linearly
independent.

00:01:42.990 --> 00:01:45.050
So what you do-- and I'm just
really going to describe the

00:01:45.050 --> 00:01:47.930
process here, as opposed to the
proof-- is you put this

00:01:47.930 --> 00:01:49.790
guy in reduced row
echelon form.

00:01:49.790 --> 00:01:51.310
So let's do that.

00:01:51.310 --> 00:01:54.600
So let me see if
we can do that.

00:01:54.600 --> 00:01:58.610
Let's keep our first
row the same.

00:01:58.610 --> 00:02:00.670
1, 0.

00:02:00.670 --> 00:02:02.840
Let me do it actually in the
right side right here.

00:02:02.840 --> 00:02:04.250
So let's keep the first
row the same.

00:02:04.250 --> 00:02:07.490
1, 0, minus 1, 0, 4.

00:02:07.490 --> 00:02:12.240
And then let's replace our
second row with the second row

00:02:12.240 --> 00:02:16.260
minus 2 times the first row.

00:02:16.260 --> 00:02:17.825
So then our second row.

00:02:17.825 --> 00:02:21.100
2 minus 2 times 1 is 0.

00:02:21.100 --> 00:02:24.530
1 minus 2 times 0 is 1.

00:02:24.530 --> 00:02:31.350
0 minus 2 times negative
1, so that's 0 plus 2.

00:02:31.350 --> 00:02:34.800
0 minus 2 times 0 is just 0.

00:02:34.800 --> 00:02:38.570
And then 9 minus
2 times 4 is 1.

00:02:38.570 --> 00:02:39.620
Fair enough.

00:02:39.620 --> 00:02:41.770
Now we want to zero
out this guy.

00:02:41.770 --> 00:02:43.400
Well it seems like a pretty
straightforward way.

00:02:43.400 --> 00:02:46.590
Just replace this row with this
row plus the first row.

00:02:46.590 --> 00:02:50.920
So minus 1 plus 1 is 0.

00:02:50.920 --> 00:02:53.420
2 plus 0 is 2.

00:02:53.420 --> 00:02:57.000
5 minus 1 is 4.

00:02:57.000 --> 00:03:00.730
1 plus 0 is 1.

00:03:00.730 --> 00:03:05.290
Minus 5 plus 4 is minus 1.

00:03:05.290 --> 00:03:09.330
And then finally we got this guy
right here, and in order

00:03:09.330 --> 00:03:11.910
to zero him out, let's
replace him with him

00:03:11.910 --> 00:03:14.210
minus the first row.

00:03:14.210 --> 00:03:18.120
So 1 minus 1 is 0.

00:03:18.120 --> 00:03:21.750
Minus 1 minus 0 is minus 1.

00:03:21.750 --> 00:03:25.690
Minus 3 minus negative 1, that's
minus 3 plus 1, so

00:03:25.690 --> 00:03:27.540
that's minus 2.

00:03:27.540 --> 00:03:31.900
Minus 2 minus 0 is minus 2.

00:03:31.900 --> 00:03:35.360
And then 9 minus 4 is 5.

00:03:35.360 --> 00:03:37.360
So we did one round.

00:03:37.360 --> 00:03:41.600
We got our first pivot
column going.

00:03:41.600 --> 00:03:45.420
Now let's do another round
of row operations.

00:03:45.420 --> 00:03:47.090
Well we want to zero all
of these guys out.

00:03:47.090 --> 00:03:48.930
Luckily this is already 0.

00:03:48.930 --> 00:03:51.100
So we don't have to change our
first row or our second row.

00:03:51.100 --> 00:03:55.490
So we get 1, 0, minus 1, 0, 4.

00:03:55.490 --> 00:04:01.980
Our second row becomes
0, 1, 2, 0, 1.

00:04:01.980 --> 00:04:05.880
And now let us see if we can
eliminate this guy right here.

00:04:05.880 --> 00:04:09.580
And let's do it by replacing our
blue row, our third row,

00:04:09.580 --> 00:04:12.760
with the third row minus
2 times the second row.

00:04:12.760 --> 00:04:15.600
So 0 minus 2 times 0 is 0.

00:04:15.600 --> 00:04:18.170
2 minus 2 times 1 is 0.

00:04:18.170 --> 00:04:21.630
4 minus 2 times 2 is 0.

00:04:21.630 --> 00:04:26.350
1 minus 2 times 0 is 1.

00:04:26.350 --> 00:04:31.660
Minus 1 minus 2 times
1 is minus 3.

00:04:31.660 --> 00:04:32.870
All right.

00:04:32.870 --> 00:04:35.690
Now this last guy we want to
eliminate him, and we want

00:04:35.690 --> 00:04:37.590
turn this into a 0.

00:04:37.590 --> 00:04:40.620
Let's replace this fourth row
with the fourth row plus the

00:04:40.620 --> 00:04:41.300
second row.

00:04:41.300 --> 00:04:43.690
So 0 plus 0 is 0.

00:04:43.690 --> 00:04:47.320
Minus 1 plus minus 1 is 0.

00:04:47.320 --> 00:04:49.920
Minus 2 plus minus 2 is 0.

00:04:49.920 --> 00:04:54.190
Minus 2 plus 0 is minus 2.

00:04:54.190 --> 00:04:57.070
And then 5 plus 1 is 6.

00:05:00.850 --> 00:05:02.950
We're getting close.

00:05:02.950 --> 00:05:07.050
So let's look at our
pivot entries.

00:05:07.050 --> 00:05:08.490
We have this is a pivot entry.

00:05:08.490 --> 00:05:09.900
That's a pivot entry.

00:05:09.900 --> 00:05:14.420
And this is not a pivot entry,
because it's following

00:05:14.420 --> 00:05:15.500
obviously another.

00:05:15.500 --> 00:05:19.370
This guy is a pivot entry
right here, or will be.

00:05:19.370 --> 00:05:23.950
Zero this minus 2 out, and
I think we'll be done.

00:05:23.950 --> 00:05:26.830
So let me write my first row
just the way it is, because

00:05:26.830 --> 00:05:28.090
everything above it is
0, so we don't have

00:05:28.090 --> 00:05:28.790
to worry about it.

00:05:28.790 --> 00:05:38.110
So my first row I can just write
as 1, 0, minus 1, 0, 4.

00:05:38.110 --> 00:05:44.170
I can write my second
row, 0, 1, 2, 0, 1.

00:05:44.170 --> 00:05:49.260
I can write my third row
as 0, 0, 0, 1 minus 3.

00:05:49.260 --> 00:05:51.830
And now let's replace
my fourth row.

00:05:51.830 --> 00:05:55.830
Let's replace it with it plus
2 times the second row.

00:05:55.830 --> 00:06:00.690
So 0 plus 2 times 0, 0 plus 2
times 0, 0 plus 2 times 0,

00:06:00.690 --> 00:06:04.270
minus 2 plus 2 times
1 is just 0.

00:06:04.270 --> 00:06:08.440
6 plus 2 times minus 3, that's
6 minus 6, that's just 0.

00:06:08.440 --> 00:06:13.570
And there we've actually put
our matrix in reduced row

00:06:13.570 --> 00:06:14.560
echelon form.

00:06:14.560 --> 00:06:17.710
So let me put brackets
around it.

00:06:17.710 --> 00:06:21.570
It's not so bad if you just
kind of go and just do the

00:06:21.570 --> 00:06:22.350
manipulations.

00:06:22.350 --> 00:06:25.410
And sometimes you kind of get
a headache thinking about

00:06:25.410 --> 00:06:27.110
doing something like this,
but this wasn't too bad.

00:06:27.110 --> 00:06:31.980
So this is let me just say the
reduced row echelon form of A.

00:06:31.980 --> 00:06:34.010
Let me just call
that matrix R.

00:06:34.010 --> 00:06:37.520
So this is matrix
R right there.

00:06:37.520 --> 00:06:39.410
Now what do we see
about matrix R?

00:06:39.410 --> 00:06:42.480
Well it has 3 pivot entries,
or 3 pivot columns.

00:06:42.480 --> 00:06:45.460
Let me square them out,
or circle them out.

00:06:45.460 --> 00:06:49.700
Column 1 is a pivot column,
column 2 is a pivot column,

00:06:49.700 --> 00:06:54.890
and column 3 is a
pivot column.

00:06:54.890 --> 00:06:58.340
And we've done this in
previous videos.

00:06:58.340 --> 00:07:00.040
There's two things
that you can see.

00:07:00.040 --> 00:07:03.140
These three columns are clearly
linearly independent.

00:07:03.140 --> 00:07:04.390
How do we know that?

00:07:06.750 --> 00:07:08.220
And that's just with respect
to each other.

00:07:08.220 --> 00:07:14.060
If we just took a set of, let's
call this r1, r2, and

00:07:14.060 --> 00:07:17.830
this would be r3, this would
be r4 right here.

00:07:17.830 --> 00:07:27.950
It's clear that the set r1,
r2, and r4 is linearly

00:07:27.950 --> 00:07:28.335
independent.

00:07:28.335 --> 00:07:30.000
And you say why is that?

00:07:30.000 --> 00:07:33.110
Well look, our one's got a 1
here, while the other two have

00:07:33.110 --> 00:07:35.550
a 0 in that entry, right?

00:07:35.550 --> 00:07:37.430
And this is by definition
of pivot entries.

00:07:37.430 --> 00:07:40.890
Pivot entries have 0's, or
pivot columns have 0's

00:07:40.890 --> 00:07:44.310
everywhere except for
where they have a 1.

00:07:44.310 --> 00:07:47.830
For any pivot column, it will be
the only pivot column that

00:07:47.830 --> 00:07:49.210
has 0's there.

00:07:49.210 --> 00:07:52.170
Or it'll be the only pivot
column that has a 1 there.

00:07:52.170 --> 00:07:55.410
So there's no way that you can
add up combinations of these

00:07:55.410 --> 00:07:56.230
guys to get a 1.

00:07:56.230 --> 00:07:58.950
You can say 100 times
0, minus 3, times 0.

00:07:58.950 --> 00:08:00.140
You're just going to
get a bunch of 0's.

00:08:00.140 --> 00:08:01.910
So no combination of these
two guys is going to be

00:08:01.910 --> 00:08:03.270
equal to that guy.

00:08:03.270 --> 00:08:07.660
By the same reasoning, no
combination of that and that

00:08:07.660 --> 00:08:08.680
is going to equal this.

00:08:08.680 --> 00:08:11.140
This is by definition
of a pivot entry.

00:08:11.140 --> 00:08:13.770
When you put it in reduced row
echelon form, it's very clear

00:08:13.770 --> 00:08:16.870
that any pivot column will
be the only one to

00:08:16.870 --> 00:08:18.950
have 1 in that place.

00:08:18.950 --> 00:08:21.970
So it's very clear that these
guys are linearly independent.

00:08:21.970 --> 00:08:24.300
Now it turns out, and I haven't
proven it to you, that

00:08:24.300 --> 00:08:28.820
the corresponding columns in
A-- this is r1, but it's A

00:08:28.820 --> 00:08:31.840
before we put it in reduced row
echelon form-- that these

00:08:31.840 --> 00:08:41.380
guys right here, so a1, a2,
and a4 are also linearly

00:08:41.380 --> 00:08:42.760
independent.

00:08:42.760 --> 00:08:47.440
So a1-- let me circle
it-- a2, and a4.

00:08:47.440 --> 00:08:52.570
So if I write it like this,
a1, a2, and a4.

00:08:52.570 --> 00:08:55.310
Let me write it in
set notation.

00:08:55.310 --> 00:08:59.170
These guys are also linearly
independant,

00:08:59.170 --> 00:09:00.020
which I haven't proven.

00:09:00.020 --> 00:09:01.970
But I think you can kind of
get a sense that these row

00:09:01.970 --> 00:09:04.960
operations really don't change
the sense of the matrix.

00:09:04.960 --> 00:09:08.380
And I'll do a better explanation
of this, but I

00:09:08.380 --> 00:09:10.770
really just wanted you to
understand how to develop a

00:09:10.770 --> 00:09:12.500
basis for the column space.

00:09:12.500 --> 00:09:13.700
So they're linearly
independent.

00:09:13.700 --> 00:09:17.310
So the next question is do they
span our column space?

00:09:17.310 --> 00:09:19.970
And in order for them to span,
obviously all of these 5

00:09:19.970 --> 00:09:22.470
vectors, if you have all of
them, that's going to span

00:09:22.470 --> 00:09:24.290
your column space
by definition.

00:09:24.290 --> 00:09:26.590
But if we can show, and I'm not
going to show it in this

00:09:26.590 --> 00:09:31.850
video, but it turns out that you
can always represent the

00:09:31.850 --> 00:09:38.660
non-pivot columns as
linear combinations

00:09:38.660 --> 00:09:40.870
of the pivot columns.

00:09:40.870 --> 00:09:43.260
And we've kind of touched on
that in previous videos where

00:09:43.260 --> 00:09:46.220
we find a solution for the
null space and all that.

00:09:46.220 --> 00:09:49.740
So these guys can definitely
be represented as linear

00:09:49.740 --> 00:09:50.880
combinations of these guys.

00:09:50.880 --> 00:09:55.230
I haven't shown you that, but
if you take that on faith,

00:09:55.230 --> 00:09:57.415
then you don't need
that column and

00:09:57.415 --> 00:09:58.460
that column to span.

00:09:58.460 --> 00:10:03.970
If you did then, or I guess a
better way to think it, you

00:10:03.970 --> 00:10:05.535
don't need them to span,
although they

00:10:05.535 --> 00:10:06.520
are part of the span.

00:10:06.520 --> 00:10:08.925
Because if you needed this guy,
you can just construct

00:10:08.925 --> 00:10:11.520
him with linear combinations
of these guys.

00:10:11.520 --> 00:10:14.100
So if you wanted to figure out
a basis for the column space

00:10:14.100 --> 00:10:16.160
of A, you literally
just take A into

00:10:16.160 --> 00:10:17.900
reduced row echelon form.

00:10:17.900 --> 00:10:20.600
You look at the pivot entries
in the reduced row echelon

00:10:20.600 --> 00:10:23.450
form of A, and that's
those three.

00:10:23.450 --> 00:10:26.540
And then you look at the
corresponding columns to those

00:10:26.540 --> 00:10:28.660
pivot columns in your
original A.

00:10:28.660 --> 00:10:31.020
And those form the basis.

00:10:31.020 --> 00:10:33.690
Because any linear combination
of them, or linear

00:10:33.690 --> 00:10:36.470
combinations of them can be
used to construct the

00:10:36.470 --> 00:10:40.410
non-pivot columns, and they're
linearly independant.

00:10:40.410 --> 00:10:41.490
So I haven't shown you that.

00:10:41.490 --> 00:10:47.350
But for this case, if you want
to know the basis, it's just

00:10:47.350 --> 00:10:49.500
a1, a2, and a4.

00:10:52.310 --> 00:10:53.860
And now we can answer
another question.

00:10:56.610 --> 00:11:10.510
So a1, a2, and a4 form a basis
for the column space of A,

00:11:10.510 --> 00:11:13.910
because you can construct the
other two guys with linear

00:11:13.910 --> 00:11:17.500
combinations of our basis
vectors, and they're also

00:11:17.500 --> 00:11:19.060
linearly independent.

00:11:19.060 --> 00:11:22.970
Now the next question is what is
the dimension of the basis?

00:11:22.970 --> 00:11:24.950
Or what is the dimension-- not
the dimension of the basis--

00:11:24.950 --> 00:11:29.240
what is the dimension of
the column space of A?

00:11:29.240 --> 00:11:32.490
Well the dimension is just the
number of vectors in any basis

00:11:32.490 --> 00:11:33.750
for the column space.

00:11:33.750 --> 00:11:36.110
And all bases have the same
number of vectors for any

00:11:36.110 --> 00:11:38.120
given subspace.

00:11:38.120 --> 00:11:40.270
So we have 1, 2, 3 vectors.

00:11:40.270 --> 00:11:44.990
So the dimension of our column
space is equal to 3.

00:11:44.990 --> 00:11:48.000
And the dimension of a column
space actually has a specific

00:11:48.000 --> 00:11:50.220
term for it, and that's
called the rank.

00:11:50.220 --> 00:11:54.690
So the rank of A, which is the
exact same thing as the

00:11:54.690 --> 00:11:58.990
dimension of the column space,
it is equal to 3.

00:11:58.990 --> 00:12:02.460
And another way to think about
it is, the rank of A is the

00:12:02.460 --> 00:12:06.840
number of linearly independent
column vectors that you have

00:12:06.840 --> 00:12:09.470
that can span your entire
column space.

00:12:09.470 --> 00:12:12.140
Or the number of linearly
independent column vectors

00:12:12.140 --> 00:12:14.300
that can be used to construct
all of the

00:12:14.300 --> 00:12:15.930
other column vectors.

00:12:15.930 --> 00:12:17.730
But hopefully this didn't
confuse you too much, because

00:12:17.730 --> 00:12:19.140
the idea is very simple.

00:12:19.140 --> 00:12:25.940
Take A, put it into reduced row
echelon form, see which

00:12:25.940 --> 00:12:27.090
columns are pivot columns.

00:12:27.090 --> 00:12:30.950
The corresponding columns are
going to be a basis for your

00:12:30.950 --> 00:12:32.000
column space.

00:12:32.000 --> 00:12:35.340
If you want to know the rank for
your matrix, you can just

00:12:35.340 --> 00:12:36.360
count them.

00:12:36.360 --> 00:12:37.860
Or if you don't want to count
those, you could literally

00:12:37.860 --> 00:12:41.210
just count the number of pivot
columns you have in your

00:12:41.210 --> 00:12:42.990
reduced row echelon form.

00:12:42.990 --> 00:12:44.570
So that's how you do it.

00:12:44.570 --> 00:12:46.480
In the next video I'll explain
why this worked.


Dimension of the null space or nullity

WEBVTT
Kind: captions
Language: en

00:00:00.410 --> 00:00:03.820
Let's say I have this matrix
B, here, and I want to know

00:00:03.820 --> 00:00:08.330
what the null space of B is.

00:00:08.330 --> 00:00:10.720
And we've done this multiple
times but just as a review,

00:00:10.720 --> 00:00:14.000
the null space of B
is just all of the

00:00:14.000 --> 00:00:18.570
x's that are a member.

00:00:18.570 --> 00:00:20.640
It's all the vector x's that
are member of what?

00:00:20.640 --> 00:00:28.410
1, 2, 3, 4, 5 that are members
of r to the fifth, where B, my

00:00:28.410 --> 00:00:32.540
matrix B, times any of these
vector x's, is equal to 0.

00:00:32.540 --> 00:00:34.000
That's the definition
of the null space.

00:00:34.000 --> 00:00:37.500
I'm just trying to find the
solution set to this equation

00:00:37.500 --> 00:00:38.100
right here.

00:00:38.100 --> 00:00:43.030
And we've seen before, that the
null set of the reduced

00:00:43.030 --> 00:00:49.830
row echelon form of B is equal
to the null set of B.

00:00:49.830 --> 00:00:53.180
So what's the reduced row
echelon form of B?

00:00:53.180 --> 00:00:56.340
And this is actually almost
trivially easy.

00:00:56.340 --> 00:01:00.460
Let me just take a couple of
steps right here-- to get a 0

00:01:00.460 --> 00:01:06.940
here, let's just replace row
2 with row 2 minus row 1

00:01:06.940 --> 00:01:07.760
So what do we get?

00:01:07.760 --> 00:01:09.280
Row 2 minus row 1.

00:01:09.280 --> 00:01:14.500
Row 1 doesn't change, it's
just 1, 1, 2, 3, 2.

00:01:14.500 --> 00:01:16.800
And then row 2 minus row 1.

00:01:16.800 --> 00:01:19.110
1 minus 1 is 0.

00:01:19.110 --> 00:01:21.050
1 minus 1 is 0.

00:01:21.050 --> 00:01:23.670
3 minus 2 is 1.

00:01:23.670 --> 00:01:28.080
1 minus 3 is minus 2.

00:01:28.080 --> 00:01:30.580
4 minus is 2 is 2.

00:01:30.580 --> 00:01:32.230
We're almost there.

00:01:32.230 --> 00:01:34.250
Let's see, so this is a free
variable right here.

00:01:34.250 --> 00:01:35.780
This is a pivot variable
right here.

00:01:35.780 --> 00:01:37.130
We have a 1.

00:01:37.130 --> 00:01:39.740
So let me get rid of that
guy right there.

00:01:39.740 --> 00:01:43.060
And I can get rid of that guy
right there, by replacing row

00:01:43.060 --> 00:01:46.170
1 with row 1 minus
2 times row 2.

00:01:46.170 --> 00:01:49.390
So now row 2 is going
to be the same.

00:01:49.390 --> 00:01:53.010
0, 0, 1 minus 2, 2.

00:01:53.010 --> 00:01:57.550
And let me replace row 1 with
row 1 minus 2 times row 2.

00:01:57.550 --> 00:01:59.450
So 1 minus 2 times 0 is 1.

00:01:59.450 --> 00:02:01.510
1 minus 2 times 0 is 1.

00:02:01.510 --> 00:02:04.800
2 minus 2 times 1 is 0.

00:02:04.800 --> 00:02:08.870
3 minus 2 times minus 2.

00:02:08.870 --> 00:02:13.850
So that's 3 plus
4 is 7, right?

00:02:13.850 --> 00:02:16.380
2 times this is minus 4 and
we're subtracting it.

00:02:16.380 --> 00:02:19.230
And then 2 minus 2 times
2-- that's 2 minus

00:02:19.230 --> 00:02:21.150
4-- it's minus 2.

00:02:21.150 --> 00:02:27.270
So this is the reduced row
echelon form of B is equal to

00:02:27.270 --> 00:02:28.370
that right there.

00:02:28.370 --> 00:02:34.240
And then if I wanted to figure
out its null space, I have x1,

00:02:34.240 --> 00:02:41.180
x2, x3, x4, and x5 equaling--
I'm going to have two 0's

00:02:41.180 --> 00:02:42.050
right here.

00:02:42.050 --> 00:02:44.770
Now I can just write this
as just a set of

00:02:44.770 --> 00:02:46.290
or a system of equations.

00:02:46.290 --> 00:02:47.750
So let me do that.

00:02:47.750 --> 00:02:50.725
I get x1.

00:02:50.725 --> 00:02:54.020
I'm going to write my pivot
variables in a green color.

00:02:54.020 --> 00:03:02.670
x1 plus 1 times x2, so plus
x2, plus 0 times x3.

00:03:02.670 --> 00:03:08.460
Plus 7 times x4.

00:03:08.460 --> 00:03:14.610
Minus 2 times x5 is equal
to that 0 right there.

00:03:14.610 --> 00:03:19.350
And then I get my--
this is x3, right?

00:03:19.350 --> 00:03:23.250
0 times x1 plus 0 times
x2 plus 1 times x3.

00:03:23.250 --> 00:03:35.080
So I get x3 minus 2 times x4
plus 2 times x5 is equal to

00:03:35.080 --> 00:03:37.220
that 0 right there.

00:03:37.220 --> 00:03:39.860
And then if we solve for our
pivot variables, right?

00:03:39.860 --> 00:03:40.790
These are our free variables.

00:03:40.790 --> 00:03:42.570
We can set them equal
to anything.

00:03:42.570 --> 00:03:45.440
If we solve for our pivot
variables what do we get?

00:03:45.440 --> 00:03:51.960
We get x1 is equal to-- I
should do that in green.

00:03:51.960 --> 00:03:53.760
The color coding helps.

00:03:53.760 --> 00:04:03.790
I get x1 is equal to minus x2
minus 7x4 plus 2x5, just

00:04:03.790 --> 00:04:06.390
subtracted these from both
sides of the equation.

00:04:06.390 --> 00:04:10.690
And I get x3 is equal to--
we've done this multiple

00:04:10.690 --> 00:04:14.770
times-- 2x4 minus 2x5.

00:04:14.770 --> 00:04:17.410
And so if I wanted to write
the solution set in vector

00:04:17.410 --> 00:04:23.320
form, I could write my solution
set or my null space,

00:04:23.320 --> 00:04:26.570
really, is-- or all
the possible x's.

00:04:26.570 --> 00:04:31.220
x1, x2, x3, x4, x5.

00:04:31.220 --> 00:04:33.970
This is my vector
x, that's in r5.

00:04:33.970 --> 00:04:37.460
It is equal to a linear
combination of these.

00:04:37.460 --> 00:04:40.770
So let me write it out.

00:04:40.770 --> 00:04:47.900
The free variables are x2 times
some vector right there.

00:04:47.900 --> 00:04:51.750
Plus x-- is x3, no x3 is
not a free variable.

00:04:51.750 --> 00:04:57.130
Plus x4, that's my next free
variable, times some factor.

00:04:57.130 --> 00:05:00.290
Plus x5 times some vector.

00:05:00.290 --> 00:05:02.350
I've run out of space.

00:05:02.350 --> 00:05:04.180
Plus x5 times some vector.

00:05:04.180 --> 00:05:06.570
And what are those vectors?

00:05:06.570 --> 00:05:09.630
Let's see.

00:05:09.630 --> 00:05:14.960
I don't want to make this too
dirty, so let me see if I can

00:05:14.960 --> 00:05:18.680
maybe move-- nope that's not
what I wanted to do.

00:05:18.680 --> 00:05:21.430
Let me just rewrite this.

00:05:21.430 --> 00:05:23.980
I haven't mastered this pen
tool yet, so let me

00:05:23.980 --> 00:05:24.690
rewrite this here.

00:05:24.690 --> 00:05:30.390
So x3 is equal to
2x4 minus 2x5.

00:05:30.390 --> 00:05:33.650
Let me delete this right
over here so I

00:05:33.650 --> 00:05:34.900
get some extra space.

00:05:37.420 --> 00:05:39.065
Cross that out.

00:05:39.065 --> 00:05:40.910
I think that's good enough.

00:05:40.910 --> 00:05:43.050
So I can go back to what
I was doing before.

00:05:43.050 --> 00:05:45.590
x5 times some vector
right here.

00:05:45.590 --> 00:05:47.440
And now what are
those vectors?

00:05:47.440 --> 00:05:49.650
We just have to look
at these formulas.

00:05:49.650 --> 00:05:52.470
x1 is equal to minus
1 times x2.

00:05:52.470 --> 00:05:54.020
So minus 1 times x2.

00:05:54.020 --> 00:05:57.980
Minus 7 times x4.

00:05:57.980 --> 00:06:00.370
Plus 2 times x5.

00:06:00.370 --> 00:06:01.300
Fair enough.

00:06:01.300 --> 00:06:03.292
And what is x3 equal to?

00:06:03.292 --> 00:06:05.510
x3 is equal to 2x4.

00:06:09.700 --> 00:06:12.910
2x4, right?

00:06:12.910 --> 00:06:16.200
It had nothing to do with x2
right here, so it's equal to

00:06:16.200 --> 00:06:18.540
2x4 minus 2x5.

00:06:21.950 --> 00:06:25.830
And then 0 times x2, right?

00:06:25.830 --> 00:06:28.960
Because it had no x2
term right here.

00:06:28.960 --> 00:06:31.950
And then what is x2 equal to?

00:06:31.950 --> 00:06:34.390
Well x2 is just equal
to 1 times x2.

00:06:34.390 --> 00:06:36.540
And so all of these terms
are 0 right there.

00:06:36.540 --> 00:06:38.300
And I want you to pay
attention to that.

00:06:38.300 --> 00:06:40.280
I'll write it right here.

00:06:40.280 --> 00:06:43.850
x2 is a free variable, so it's
just equal to itself, right?

00:06:43.850 --> 00:06:46.300
1 and you write a 0 and a 0.

00:06:46.300 --> 00:06:48.510
x4 is a free variable.

00:06:48.510 --> 00:06:50.360
And this is the important
point of this exercise.

00:06:50.360 --> 00:06:52.920
So it's just equal to
1 times itself.

00:06:52.920 --> 00:06:55.400
You don't have to throw in any
of the other free variables.

00:06:55.400 --> 00:06:56.940
And x5 is a free variable.

00:06:56.940 --> 00:06:59.870
So it just equals 1 times itself
and none of the other

00:06:59.870 --> 00:07:01.050
free variables.

00:07:01.050 --> 00:07:05.420
So right here we now say that
all of the solutions of our

00:07:05.420 --> 00:07:09.120
equation Bx equals 0, or the
reduced row echelon form of B

00:07:09.120 --> 00:07:12.080
times x is equal to 0,
will take this form.

00:07:12.080 --> 00:07:15.090
Or they are linear combinations
of these vectors.

00:07:15.090 --> 00:07:19.890
Let's call this v1,
v2, and v3.

00:07:19.890 --> 00:07:23.530
These are just random
real numbers.

00:07:23.530 --> 00:07:26.665
I can pick any combination here
to create this solution

00:07:26.665 --> 00:07:29.120
set, or to create
our null space.

00:07:29.120 --> 00:07:35.230
So the null space of A, which is
of course equal to the null

00:07:35.230 --> 00:07:39.810
space of the reduced row echelon
form of A, is equal to

00:07:39.810 --> 00:07:42.900
all the possible linear
combinations of these 3

00:07:42.900 --> 00:07:53.340
vectors, is equal to the span
of my vector v1, v2, and v3.

00:07:53.340 --> 00:07:54.490
Just like that.

00:07:54.490 --> 00:07:56.730
Now, the whole reason I went
through this exercise--

00:07:56.730 --> 00:07:59.690
because we've done this multiple
times already-- is to

00:07:59.690 --> 00:08:04.560
think about whether these guys
form a linear independent set.

00:08:04.560 --> 00:08:11.090
So my question is are these
guys linearly independent?

00:08:11.090 --> 00:08:13.670
And the reason why I care is
because if they are linearly

00:08:13.670 --> 00:08:16.290
independent then they
form a basis for

00:08:16.290 --> 00:08:17.490
the null space, right?

00:08:17.490 --> 00:08:19.860
That we know that they span the
null space, but if they're

00:08:19.860 --> 00:08:22.020
linearly independent,
then that's the 2

00:08:22.020 --> 00:08:23.010
constraints for a basis.

00:08:23.010 --> 00:08:26.970
You have to span the subspace,
and you have to be linearly

00:08:26.970 --> 00:08:27.900
independent.

00:08:27.900 --> 00:08:31.210
So let's just inspect these
guys right here.

00:08:31.210 --> 00:08:34.480
This v1, he has a
1 right here.

00:08:34.480 --> 00:08:39.460
He has a 1 in the second term
because he corresponds to the

00:08:39.460 --> 00:08:42.620
free variable x2, which is
the second entry, so we

00:08:42.620 --> 00:08:43.780
just throw a 1 here.

00:08:43.780 --> 00:08:46.960
And we have a 0 everywhere
else in all of the other

00:08:46.960 --> 00:08:50.210
vectors in our spanning set.

00:08:50.210 --> 00:08:52.180
And that's because for the other
free variables we always

00:08:52.180 --> 00:08:54.815
wanted to multiply them
times a 0, right?

00:08:54.815 --> 00:08:57.060
And this is going to
be true of any null

00:08:57.060 --> 00:08:57.960
space problem we do.

00:08:57.960 --> 00:09:00.670
For any free variable, if this
free variable represents a

00:09:00.670 --> 00:09:02.100
second entry, we're going
to have a 1 in the

00:09:02.100 --> 00:09:03.150
second entry here.

00:09:03.150 --> 00:09:07.060
And then a 0 for the second
entry for all of the other

00:09:07.060 --> 00:09:09.900
vectors associated with the
other free variables.

00:09:09.900 --> 00:09:12.330
So can this guy ever be
represented as a linear

00:09:12.330 --> 00:09:14.890
combination of this
guy and that guy?

00:09:14.890 --> 00:09:17.730
Well there's nothing that I can
multiply this 0 by and add

00:09:17.730 --> 00:09:20.240
to something that I multiply
this 0 by to get a 1 here.

00:09:20.240 --> 00:09:21.670
It's just going to get 0's.

00:09:21.670 --> 00:09:23.330
So this guy can't be
representated as a linear

00:09:23.330 --> 00:09:24.880
combination of these guys.

00:09:24.880 --> 00:09:28.880
Likewise, this vector
right here has a 1

00:09:28.880 --> 00:09:29.880
in the fourth position.

00:09:29.880 --> 00:09:30.940
Why is it a fourth position?

00:09:30.940 --> 00:09:32.570
Because the fourth position
corresponds to its

00:09:32.570 --> 00:09:35.410
corresponding free
variable, x4.

00:09:35.410 --> 00:09:36.750
So this guy's a 1 here.

00:09:36.750 --> 00:09:39.190
These other guys
will definitely

00:09:39.190 --> 00:09:40.410
always have a 0 here.

00:09:40.410 --> 00:09:42.020
So you can't take any linear
combination of

00:09:42.020 --> 00:09:43.710
them to get this guy.

00:09:43.710 --> 00:09:45.590
So this guy can't be represented
as a linear

00:09:45.590 --> 00:09:46.860
combination of those guys.

00:09:46.860 --> 00:09:51.640
And last, this x5 guy, right
here, has a 1 here.

00:09:51.640 --> 00:09:53.610
And these guys have 0's here.

00:09:53.610 --> 00:09:57.000
So no linear combination of
these 0's can equal this 1.

00:09:57.000 --> 00:09:59.500
So all of these guys are
linearly independent.

00:09:59.500 --> 00:10:01.790
You can't construct any of
these vectors with some

00:10:01.790 --> 00:10:03.180
combination of the other.

00:10:03.180 --> 00:10:06.950
So they are linearly
independent.

00:10:06.950 --> 00:10:19.390
So v1, the set v1, v2, and v3
is actually a basis for the

00:10:19.390 --> 00:10:23.770
null space, for the null space
of-- Oh, you know what, I have

00:10:23.770 --> 00:10:24.480
to be very careful.

00:10:24.480 --> 00:10:26.330
For the null space of B.

00:10:26.330 --> 00:10:31.940
Just for variety, I defined my
initial matrix as matrix B, so

00:10:31.940 --> 00:10:32.970
let me be very careful here.

00:10:32.970 --> 00:10:36.930
So the null space of B was equal
to the null space of the

00:10:36.930 --> 00:10:39.700
reduced row echelon form of B.

00:10:39.700 --> 00:10:41.910
It's good to switch things up
every once in a while, you

00:10:41.910 --> 00:10:43.280
start thinking that
every matrix is

00:10:43.280 --> 00:10:44.420
named A if you don't.

00:10:44.420 --> 00:10:46.540
And that's equal to the
span of these vectors.

00:10:46.540 --> 00:10:48.550
So these vectors, and we just
said that they're linearly

00:10:48.550 --> 00:10:48.980
independent.

00:10:48.980 --> 00:10:51.470
We just showed that because
there's no way to get that one

00:10:51.470 --> 00:10:53.780
from these guys, that one from
these guys, or that one from

00:10:53.780 --> 00:10:54.820
these guys.

00:10:54.820 --> 00:10:58.420
These guys form a basis for
the null space of B.

00:10:58.420 --> 00:11:00.300
Now this raises an interesting
question.

00:11:00.300 --> 00:11:04.090
In the last video, I defined
what dimensionality is.

00:11:04.090 --> 00:11:05.550
And maybe you missed
it because that

00:11:05.550 --> 00:11:08.080
video was kind of proofy.

00:11:08.080 --> 00:11:14.730
But the dimensionality, the
dimension, of a subspace--

00:11:14.730 --> 00:11:25.760
I'll redefine it here-- is the
number of elements in a basis

00:11:25.760 --> 00:11:31.220
for the subspace.

00:11:31.220 --> 00:11:33.830
And in the last video I took
great pains to show that all

00:11:33.830 --> 00:11:36.030
bases for any given subspace
will have the

00:11:36.030 --> 00:11:37.190
same number of elements.

00:11:37.190 --> 00:11:38.740
So this is well defined.

00:11:38.740 --> 00:11:44.760
So my question to you now is:
what is the dimension of my

00:11:44.760 --> 00:11:47.560
null space of B?

00:11:47.560 --> 00:11:50.630
What is that the dimension
of my null space of B?

00:11:50.630 --> 00:11:54.200
Well, the dimension is just
the number of vectors in a

00:11:54.200 --> 00:11:55.420
basis set for B.

00:11:55.420 --> 00:11:57.280
Well this is a basis set
for B right there.

00:11:57.280 --> 00:11:58.880
And how many vectors
do I have in it?

00:11:58.880 --> 00:12:01.000
I have 1, 2 3 vectors.

00:12:01.000 --> 00:12:04.670
So the dimension of the
null space of B is 3.

00:12:04.670 --> 00:12:07.760
Or another way to think about
it-- or another name for the

00:12:07.760 --> 00:12:12.510
dimension of the null space
of B-- is the nullity, the

00:12:12.510 --> 00:12:14.970
nullity of B.

00:12:14.970 --> 00:12:17.410
And that is also equal to 3.

00:12:17.410 --> 00:12:18.870
And let's think about
it, you know I went

00:12:18.870 --> 00:12:20.010
through all this exercise.

00:12:20.010 --> 00:12:23.480
But what is the nullity of any
matrix going to be equal to?

00:12:23.480 --> 00:12:25.520
It's the dimension of
the null space.

00:12:25.520 --> 00:12:27.520
Well the dimension of the null
space-- you're always going to

00:12:27.520 --> 00:12:30.360
have as many factors here as
you have free variables.

00:12:33.720 --> 00:12:41.680
So in general, the nullity of
any matrix of any matrix--

00:12:41.680 --> 00:12:49.160
let's say matrix A-- is equal
to the number of I guess you

00:12:49.160 --> 00:12:52.110
could call it free variable
columns or the number free

00:12:52.110 --> 00:12:59.950
variables in, well, I guess we
call it in the reduced row

00:12:59.950 --> 00:13:03.790
echelon form, or I guess we
could say the number of

00:13:03.790 --> 00:13:05.290
non-pivot columns.

00:13:05.290 --> 00:13:14.700
The number of non-pivot columns
in the reduced row

00:13:14.700 --> 00:13:15.730
echelon form of A.

00:13:15.730 --> 00:13:18.665
Because that's essentially the
number of free variables-- all

00:13:18.665 --> 00:13:21.780
of those free variables have
an associated, linearly

00:13:21.780 --> 00:13:24.880
independent vector with
each of them, right?

00:13:24.880 --> 00:13:27.970
So the number of variables is
the number of vectors you're

00:13:27.970 --> 00:13:30.450
going to have in your basis
for your null space.

00:13:30.450 --> 00:13:32.650
And the number of free variables
is essentially the

00:13:32.650 --> 00:13:35.970
number of non-pivot columns
in your reduced row

00:13:35.970 --> 00:13:37.870
echelon form, right?

00:13:37.870 --> 00:13:40.520
This was a non-pivot column,
that's a non-pivot column,

00:13:40.520 --> 00:13:41.870
that's a non-pivot column.

00:13:41.870 --> 00:13:43.370
And they're associated
with the free

00:13:43.370 --> 00:13:47.510
variables x2, x4, and x5.

00:13:47.510 --> 00:13:50.710
So the nullity of a matrix is
essentially the number of

00:13:50.710 --> 00:13:54.910
non-pivot columns in the reduced
row echelon form of

00:13:54.910 --> 00:13:55.940
that matrix.

00:13:55.940 --> 00:13:59.110
Anyway, hopefully you found
that vaguely useful.