< Return to Video

Column Space of a Matrix

  • 0:00 - 0:00
  • 0:00 - 0:03
    We spent a good deal of time on
    the idea of a null space.
  • 0:03 - 0:06
    What I'm going to do in this
    video is introduce you to a
  • 0:06 - 0:09
    new type of space that can be
    defined around a matrix, it's
  • 0:09 - 0:13
    called a column space.
  • 0:13 - 0:16
    And you could probably guess
    what it means just based on
  • 0:16 - 0:17
    what it's called.
  • 0:17 - 0:20
    But let's say I have
    some matrix A.
  • 0:20 - 0:24
    Let's say it's an
    m by n matrix.
  • 0:24 - 0:26
    So I can write my matrix A and
    we've seen this multiple
  • 0:26 - 0:30
    times, I can write it as a
    collection of columns vectors.
  • 0:30 - 0:34
    So this first one, second one,
    and I'll have n of them.
  • 0:34 - 0:36
    How do I know that
    I have n of them?
  • 0:36 - 0:39
    Because I have n columns.
  • 0:39 - 0:41
    And each of these column
    vectors, we're going to have
  • 0:41 - 0:42
    how many components?
  • 0:42 - 0:48
    So v1, v2, all the way to vn.
  • 0:48 - 0:51
    This matrix has m rows.
  • 0:51 - 0:53
    So each of these guys are going
    to have m components.
  • 0:53 - 0:56
    So they're all members of Rm.
  • 0:56 - 1:01
    So the column space is defined
    as all of the possible linear
  • 1:01 - 1:04
    combinations of these
    columns vectors.
  • 1:04 - 1:09
    So the column space of A, this
    is my matrix A, the column
  • 1:09 - 1:12
    space of that is all the linear
    combinations of these
  • 1:12 - 1:13
    column vectors.
  • 1:13 - 1:14
    What's all of the linear
  • 1:14 - 1:16
    combinations of a set of vectors?
  • 1:16 - 1:21
    It's the span of
    those vectors.
  • 1:21 - 1:25
    So it's the span of vector
    1, vector 2, all the
  • 1:25 - 1:28
    way to vector n.
  • 1:28 - 1:30
    And we've done it before
    when we first talked
  • 1:30 - 1:31
    about span and subspaces.
  • 1:31 - 1:34
    But it's pretty easy to show
    that the span of any set of
  • 1:34 - 1:36
    vectors is a legitimate
    subspace.
  • 1:36 - 1:38
    It definitely contains
    the 0 vector.
  • 1:38 - 1:42
    If you multiply all of these
    guys by 0, which is a valid
  • 1:42 - 1:44
    linear combination added up,
    you'll see that it contains
  • 1:44 - 1:45
    the 0 vector.
  • 1:45 - 1:55
    If, let's say that I have some
    vector a that is a member of
  • 1:55 - 1:57
    the column space of a.
  • 1:57 - 1:59
    That means it can be represented
    as some linear
  • 1:59 - 2:00
    combination.
  • 2:00 - 2:06
    So a is equal to c1 times vector
    1, plus c2 times vector
  • 2:06 - 2:10
    2, all the way to Cn
    times vector n.
  • 2:10 - 2:13
    Now, the question is, is this
    closed under multiplication?
  • 2:13 - 2:18
    If I multiply a times some new--
    let me say I multiply it
  • 2:18 - 2:23
    times some scale or s, I'm just
    picking a random letter--
  • 2:23 - 2:27
    so s times a, is this
    in my span?
  • 2:27 - 2:35
    Well s times a would be equal
    to s c1 v1 plus s c2 v2, all
  • 2:35 - 2:41
    the way to s Cn Vn Which is
    once again just a linear
  • 2:41 - 2:43
    combination of these
    column vectors.
  • 2:43 - 2:48
    So this Sa, would clearly
    be a member of the
  • 2:48 - 2:50
    column space of a.
  • 2:50 - 2:53
    And then finally, to make sure
    it's a valid subspace-- and
  • 2:53 - 2:54
    this actually doesn't apply just
    to column space, so this
  • 2:54 - 2:55
    applies to any span.
  • 2:55 - 2:58
    This is actually a review of
    what we've done the past. We
  • 2:58 - 3:00
    just have to make sure it's
    closed under addition.
  • 3:00 - 3:03
    So let's say a is a member
    of our column space.
  • 3:03 - 3:07
    Let's say b is also a member
    of our column space, or our
  • 3:07 - 3:09
    span of all these
    column vectors.
  • 3:09 - 3:18
    Then b could be written as b1
    times v1, plus b2 times v2,
  • 3:18 - 3:21
    all the way to Bn times Vn.
  • 3:21 - 3:30
    And my question is, is a plus b
    a member of our span, of our
  • 3:30 - 3:33
    column space, the span
    of these vectors?
  • 3:33 - 3:42
    Well sure, what's a plus b? a
    plus b is equal to c1 plus b1
  • 3:42 - 3:50
    times v1, plus c2 plus
    v2 times v2.
  • 3:50 - 3:52
    I'm just literally adding
    this term to that
  • 3:52 - 3:54
    term, to get that term.
  • 3:54 - 3:56
    This term to this term
    to get this term.
  • 3:56 - 4:02
    And then it goes all the way
    to Bn and plus Cn times Vn.
  • 4:02 - 4:04
    Which is clearly just
    another linear
  • 4:04 - 4:05
    combination of these guys.
  • 4:05 - 4:11
    So this guy is definitely
    within the span.
  • 4:11 - 4:13
    It doesn't have to be
    unique to a matrix.
  • 4:13 - 4:15
    A matrix is just really just
    a way of writing a
  • 4:15 - 4:16
    set of column vectors.
  • 4:16 - 4:18
    So this applies to any span.
  • 4:18 - 4:22
    So this is clearly
    a valid subspace.
  • 4:22 - 4:28
    So the column space of a is
    clearly a valid subspace.
  • 4:28 - 4:31
    Let's think about other ways we
    can interpret this notion
  • 4:31 - 4:33
    of a column space.
  • 4:33 - 4:39
    Let's think about it in terms of
    the expression-- let me get
  • 4:39 - 4:44
    a good color-- if I were to
    multiply my-- let's think
  • 4:44 - 4:46
    about this.
  • 4:46 - 4:50
    Let's think about the set of all
    the values of if I take my
  • 4:50 - 5:01
    m by n matrix a and I multiply
    it by any vector x, where x is
  • 5:01 - 5:05
    a member of-- remember x has
    to be a member of Rn.
  • 5:05 - 5:07
    It has to have n components in
    order for this multiplication
  • 5:07 - 5:09
    to be well defined.
  • 5:09 - 5:13
    So x has to be a member of Rn.
  • 5:13 - 5:15
    Let's think about
    what this means.
  • 5:15 - 5:19
    This says, look, I can take any
    member, any n component
  • 5:19 - 5:23
    vector and multiply it by a,
    and I care about all of the
  • 5:23 - 5:26
    possible products that this
    could equal, all the possible
  • 5:26 - 5:30
    values of Ax, when I can
    pick and choose any
  • 5:30 - 5:32
    possible x from Rn.
  • 5:32 - 5:34
    Let's think about
    what that means.
  • 5:34 - 5:36
  • 5:36 - 5:40
    If I write a like that, and if
    I write x like this-- let me
  • 5:40 - 5:45
    write it a little bit better,
    let me write x like this-- x1,
  • 5:45 - 5:49
    x2, all the way to Xn.
  • 5:49 - 5:50
    What is Ax?
  • 5:50 - 5:54
    Well Ax could be rewritten as
    x1-- and we've seen this
  • 5:54 - 6:10
    before-- Ax is equal to x1 times
    v1 plus x2 times v2, all
  • 6:10 - 6:18
    the way to plus Xn times Vn.
  • 6:18 - 6:19
    We've seen this multiple
    times.
  • 6:19 - 6:21
    This comes out of our
    definition of
  • 6:21 - 6:23
    matrix vector products.
  • 6:23 - 6:28
    Now if Ax is equal to this,
    and I'm essentially saying
  • 6:28 - 6:32
    that I can pick any vector x in
    Rn, I'm saying that I can
  • 6:32 - 6:36
    pick all possible values of the
    entries here, all possible
  • 6:36 - 6:38
    real values and all possible
    combinations of them.
  • 6:38 - 6:40
    So what is this equal to?
  • 6:40 - 6:42
    What is the set of
    all possible?
  • 6:42 - 6:46
    So I could rewrite this
    statement here as the set of
  • 6:46 - 6:58
    all possible x1 v1 plus x2 v2
    all the way to Xn Vn, where
  • 6:58 - 7:03
    x1, x2, all the way to Xn, are
    a member of the real numbers.
  • 7:03 - 7:04
    That's all I'm saying here.
  • 7:04 - 7:06
    This statement is the
    equivalent of this.
  • 7:06 - 7:10
    When I say that the vector x can
    be any member of Rn, I'm
  • 7:10 - 7:12
    saying that its components
    can be any
  • 7:12 - 7:13
    members of the real numbers.
  • 7:13 - 7:17
    So if I just take the set of all
    of the, essentially, the
  • 7:17 - 7:19
    combinations of these column
    vectors where their real
  • 7:19 - 7:24
    numbers, where their
    coefficients, are members of
  • 7:24 - 7:24
    the real numbers.
  • 7:24 - 7:25
    What am I doing?
  • 7:25 - 7:28
    This is all the possible linear
    combinations of the
  • 7:28 - 7:30
    column vectors of a.
  • 7:30 - 7:42
    So this is equal to the span
    v1 v2, all the way to Vn,
  • 7:42 - 7:47
    which is the exact same thing
    as the column space of A.
  • 7:47 - 7:50
    So the column space of A, you
    could say what are all of the
  • 7:50 - 7:53
    possible vectors, or the set of
    all vectors I can create by
  • 7:53 - 7:56
    taking linear combinations of
    these guys, or the span of
  • 7:56 - 7:57
    these guys.
  • 7:57 - 8:00
    Or you can view it as, what are
    all of the possible values
  • 8:00 - 8:06
    that Ax can take on if
    x is a member of Rn?
  • 8:06 - 8:08
    So let's think about
    it this way.
  • 8:08 - 8:13
    Let's say that I were to tell
    you that I need to solve the
  • 8:13 - 8:20
    equation Ax is equal to-- well
    the convention is to write a b
  • 8:20 - 8:22
    there-- but let me
    put a special b
  • 8:22 - 8:25
    there, let me put b1.
  • 8:25 - 8:26
    Let's say that I need to
    solve this equation
  • 8:26 - 8:28
    Ax is equal to b1.
  • 8:28 - 8:30
    And then I were to tell you--
    let's say that I were to
  • 8:30 - 8:36
    figure out the column space of
    A-- and I say b1 is not a
  • 8:36 - 8:41
    member of the column space of
    A So what does that tell me?
  • 8:41 - 8:46
    That tells me that this right
    here can never take on the
  • 8:46 - 8:50
    value b1 because all of the
    values that this can take on
  • 8:50 - 8:52
    is the column space of A.
  • 8:52 - 8:55
    So if b1 is not in this, it
    means that this cannot take on
  • 8:55 - 8:56
    the value of b1.
  • 8:56 - 9:01
    So this would imply that this
    equation we're trying to set
  • 9:01 - 9:04
    up, Ax is equal to b1,
    has no solution.
  • 9:04 - 9:07
  • 9:07 - 9:19
    If it had a solution, so let's
    say that Ax equals b2 has at
  • 9:19 - 9:20
    least one solution.
  • 9:20 - 9:26
  • 9:26 - 9:27
    What does this mean?
  • 9:27 - 9:32
    Well, that means that this, for
    a particular x or maybe
  • 9:32 - 9:34
    for many different x's,
    you can definitely
  • 9:34 - 9:36
    achieve this value.
  • 9:36 - 9:39
    For there are some x's that when
    you multiply it by a, you
  • 9:39 - 9:41
    definitely are able
    to get this value.
  • 9:41 - 9:46
    So this implies that b2 is
    definitely a member of the
  • 9:46 - 9:48
    column space of A.
  • 9:48 - 9:51
    Some of this stuff on some level
    it's almost obvious.
  • 9:51 - 9:52
    This comes out of
    the definition
  • 9:52 - 9:53
    of the column space.
  • 9:53 - 9:56
    The column space is all of the
    linear combinations of the
  • 9:56 - 9:59
    column vectors, which another
    interpretation is all of the
  • 9:59 - 10:01
    values that Ax can take on.
  • 10:01 - 10:04
    So if I try to set Ax to some
    value that it can't take on,
  • 10:04 - 10:08
    clearly I'm not going to
    have some solution.
  • 10:08 - 10:12
    If I am able to find a solution,
    I am able to find
  • 10:12 - 10:17
    some x value where Ax is equal
    to b2, then b2 definitely is
  • 10:17 - 10:20
    one of the values that
    Ax can take on.
  • 10:20 - 10:22
    Anyway, I think I'll
    leave you there.
  • 10:22 - 10:25
    Now that you have at least a
    kind of abstract understanding
  • 10:25 - 10:26
    of what a column space is.
  • 10:26 - 10:28
    In the next couple of videos
    I'm going to try to bring
  • 10:28 - 10:31
    everything together of what we
    know about column spaces, and
  • 10:31 - 10:35
    null spaces, and whatever else
    to kind of understand a matrix
  • 10:35 - 10:39
    and a matrix vector product from
    every possible direction.
Title:
Column Space of a Matrix
Description:

more » « less
Video Language:
English
Team:
Khan Academy
Duration:
10:40

English subtitles

Revisions Compare revisions