< Return to Video

Linear Algebra: Duplicate Row Determinant

  • 0:00 - 0:01
  • 0:01 - 0:05
    Say I have some matrix a --
    let's say a is n by n, so it
  • 0:05 - 0:07
    looks something like this.
  • 0:07 - 0:11
    You've seen this before,
    a 1 1, a 1 2, all
  • 0:11 - 0:14
    the way to a 1 n.
  • 0:14 - 0:17
    When you go down the rows you
    get a 2 1, that goes all the
  • 0:17 - 0:19
    way to a 2 n.
  • 0:19 - 0:22
    And let's say that there's some
    row here, let's say row
  • 0:22 - 0:28
    i, it looks like a i 1,
    all the way to a i n.
  • 0:28 - 0:34
    And then you have some other row
    here, a j, it's a j 1 all
  • 0:34 - 0:36
    the way to a j n.
  • 0:36 - 0:42
    And then you keep going all the
    way down to a n 1, a n 2,
  • 0:42 - 0:45
    all the way to a n n.
  • 0:45 - 0:48
    This is just an n by n matrix,
    and you can see that I took a
  • 0:48 - 0:54
    little trouble to write out my
    row a, my i'th row here and my
  • 0:54 - 0:55
    j'th row here.
  • 0:55 - 0:58
    And just to kind of keep things
    a little simple, let me
  • 0:58 - 1:03
    just define -- just for
    notational purposes, you can
  • 1:03 - 1:05
    view these as row vectors if
    you like, but I haven't
  • 1:05 - 1:07
    formally defined row
    vectors so I won't
  • 1:07 - 1:09
    necessarily go there.
  • 1:09 - 1:15
    But let's just define the term r
    i, we'll call that row i, to
  • 1:15 - 1:24
    be equal to a i 1, a i 2,
    all the way to a i n.
  • 1:24 - 1:25
    You can write it as
    a vector if you
  • 1:25 - 1:26
    like, like a row vector.
  • 1:26 - 1:29
    We haven't really defined
    operations on row vectors that
  • 1:29 - 1:31
    well yet, but I think
    you get the idea.
  • 1:31 - 1:35
    We can then replace this guy
    with r 1, this guy with r 2,
  • 1:35 - 1:36
    all the way down.
  • 1:36 - 1:37
    Let me do that, and I'll do
    that in the next couple of
  • 1:37 - 1:40
    videos because it'll simplify
    things, and I think make
  • 1:40 - 1:42
    things a little bit easier
    to understand.
  • 1:42 - 1:47
    So I can rewrite this matrix,
    this n by n matrix a, I can
  • 1:47 - 1:51
    re-write it as just r i.
  • 1:51 - 1:53
    Actually, this just looks
    like a vector,
  • 1:53 - 1:56
    it's just a row vector.
  • 1:56 - 1:59
    Let me write it as a
    vector like that.
  • 1:59 - 2:01
    And I'm being a little bit
    hand-wavy here because all of
  • 2:01 - 2:04
    our vectors have been defined as
    column vectors, but I think
  • 2:04 - 2:05
    you get the idea.
  • 2:05 - 2:10
    So let's call that r 1, and then
    we have r 2 is the next
  • 2:10 - 2:12
    row, all the way down.
  • 2:12 - 2:15
    You keep going down, you get
    to r i -- that's this row
  • 2:15 - 2:17
    right there -- r i.
  • 2:17 - 2:24
    You keep going down, you get r
    j, and then you keep going
  • 2:24 - 2:25
    down until you get
    to the n'th row.
  • 2:25 - 2:28
    And each of these guys are going
    to have n terms because
  • 2:28 - 2:30
    you have n columns.
  • 2:30 - 2:31
    So that's another
    way of writing
  • 2:31 - 2:34
    this same n by n matrix.
  • 2:34 - 2:37
    Now what I'm going to do here
    is, I'm going to create a new
  • 2:37 - 2:41
    matrix-- let's call that
    swapping the swap
  • 2:41 - 2:44
    matrix of i and j.
  • 2:44 - 2:47
    So I'm going to swap i and
    j, those two rows.
  • 2:47 - 2:49
    So what's the matrix
    going to look like?
  • 2:49 - 2:51
    Everything else is going
    to be equal.
  • 2:51 - 2:55
    You have row 1-- assuming that
    1 wasn't one of the i or j's,
  • 2:55 - 2:56
    it could have been.
  • 2:56 - 3:01
    Row 2, all the way down to-- now
    instead of a row i there
  • 3:01 - 3:05
    you have a row j there, and you
    go down and instead of a
  • 3:05 - 3:09
    row j you have a row i there.
  • 3:09 - 3:12
    And you go down and
    then you get r n.
  • 3:12 - 3:13
    So what did we do?
  • 3:13 - 3:15
    We just swapped these
    two guys.
  • 3:15 - 3:17
    That's what the swap
    matrix is.
  • 3:17 - 3:19
    Now I think it was in the last
    video or a couple of videos
  • 3:19 - 3:23
    ago, we learned that if you just
    swap two rows of any n by
  • 3:23 - 3:28
    n matrix, the determinant of the
    resulting matrix will be
  • 3:28 - 3:31
    the negative of the original
    determinant.
  • 3:31 - 3:38
    So we get the determinant of
    s, the swap of the i'th and
  • 3:38 - 3:42
    the j rows is going to be equal
    to the minus of the
  • 3:42 - 3:43
    determinant of a.
  • 3:43 - 3:46
  • 3:46 - 3:49
    Now, let me ask you an
    interesting question.
  • 3:49 - 3:53
    What happens if those two rows
    were actually the same?
  • 3:53 - 3:58
    What if r i was equal to r j?
  • 3:58 - 4:02
    If we go back to all of these
    guys, if that row is
  • 4:02 - 4:05
    equal to this row?
  • 4:05 - 4:09
    That means that this guy is
    equal to that guy, that the
  • 4:09 - 4:11
    second column-- the second
    column for that row all the
  • 4:11 - 4:14
    way to the n'th guy is equal
    to the n'th guy.
  • 4:14 - 4:17
    That's what I mean when I say
    what happens if those two rows
  • 4:17 - 4:18
    are equal to each other.
  • 4:18 - 4:21
    Well, if those two rows are
    equal to each other, than this
  • 4:21 - 4:24
    matrix is no different than this
    matrix here, even though
  • 4:24 - 4:25
    we swapped them.
  • 4:25 - 4:27
    If you swap two identical
    things, you're just going to
  • 4:27 - 4:30
    be left with the same
    thing again.
  • 4:30 - 4:36
    So if-- let me write this down--
    if row i is equal to
  • 4:36 - 4:42
    row j, then this guy,
    then s, the swapped
  • 4:42 - 4:45
    matrix, is equal to a.
  • 4:45 - 4:46
    They'll be identical.
  • 4:46 - 4:48
    You're swapping two rows that
    are the same thing.
  • 4:48 - 4:56
    So that implies a determinant of
    the swapped matrix is equal
  • 4:56 - 4:59
    to the determinant of a.
  • 4:59 - 5:01
    But we just said, if the swap
    matrix, when you swap two
  • 5:01 - 5:04
    rows, it equals a negative
    of the determinant of a.
  • 5:04 - 5:08
    So this tells us it also has to
    equal the negative of the
  • 5:08 - 5:10
    determinant of a.
  • 5:10 - 5:11
    So what does that tell us?
  • 5:11 - 5:15
    That tells us if a has two rows
    that are equal to each
  • 5:15 - 5:20
    other, if we swap them, we
    should get the negative of the
  • 5:20 - 5:22
    determinant, but if two rows are
    equal we're going to get
  • 5:22 - 5:25
    the same matrix again.
  • 5:25 - 5:30
    So if a has two rows that are
    equal-- so if row i is equal
  • 5:30 - 5:33
    to row j-- then the determinant
    of a has to be
  • 5:33 - 5:35
    equal to the negative of
    the determinant of a.
  • 5:35 - 5:38
    We know that because the
    determinant of a, or a is the
  • 5:38 - 5:41
    same thing as the swapped
    version of a, and the swapped
  • 5:41 - 5:43
    version of a has to have the
    negative determinant of a.
  • 5:43 - 5:45
    So these two things
    have to be equal.
  • 5:45 - 5:49
    Now what number is equal to a
    negative version of itself?
  • 5:49 - 5:53
    If I just told you x is equal
    to negative x, what number
  • 5:53 - 5:56
    does x have to be equal to?
  • 5:56 - 5:59
    There's only one value that it
    could possibly be equal to. x
  • 5:59 - 6:03
    would have to be equal to 0.
  • 6:03 - 6:08
    So the takeaway here is, let's
    say if you have duplicate
  • 6:08 - 6:13
    rows-- you can extend this if
    you have three or four rows
  • 6:13 - 6:18
    that are the same-- leads
    you to the fact that the
  • 6:18 - 6:22
    determinant of your
    matrix is 0.
  • 6:22 - 6:24
    And that really shouldn't
    be a surprise.
  • 6:24 - 6:27
    Because if you have duplicate
    rows, remember what we learned
  • 6:27 - 6:28
    a long time ago.
  • 6:28 - 6:39
    We learned that a matrix is an
    invertible if and only if the
  • 6:39 - 6:45
    reduced row echelon form
    is the identity matrix.
  • 6:45 - 6:46
    We learned that.
  • 6:46 - 6:51
    But if you have two duplicate
    rows-- let's say these two
  • 6:51 - 6:54
    guys are equal to each other--
    you could perform a row
  • 6:54 - 6:57
    operation where you replace this
    guy with this guy minus
  • 6:57 - 6:59
    that guy, and you'll just
    get a row of 0's.
  • 6:59 - 7:02
    And if you get a row of 0's,
    you're never going to be able
  • 7:02 - 7:03
    get the identity matrix.
  • 7:03 - 7:15
    So we know that duplicate rows
    could never get reduced row
  • 7:15 - 7:19
    echelon form to be
    the identity.
  • 7:19 - 7:21
    Or, duplicate rows are
    not invertible.
  • 7:21 - 7:26
  • 7:26 - 7:28
    And we also learned that
    something is not invertible if
  • 7:28 - 7:30
    and only if its determinant
    is equal to 0.
  • 7:30 - 7:34
  • 7:34 - 7:37
    So we now got to the same result
    two different ways.
  • 7:37 - 7:39
    One, we just used some
    of what we learned.
  • 7:39 - 7:41
    When you swap rows, it should
    become the negative, but if
  • 7:41 - 7:43
    you swap the same row, you
    shouldn't change the matrix.
  • 7:43 - 7:45
    So the determinant of
    the matrix has to
  • 7:45 - 7:46
    be the same as itself.
  • 7:46 - 7:49
    So if you have duplicate rows,
    the determinant is 0.
  • 7:49 - 7:52
    Which isn't something that we
    had to use using this little
  • 7:52 - 7:55
    swapping technique, we could
    have gone back to our
  • 7:55 - 7:58
    requirements for invertability--
    I think was
  • 7:58 - 7:59
    five or six videos ago.
  • 7:59 - 8:00
    But I just wanted to
    point that out.
  • 8:00 - 8:02
    If you see duplicate rows.
  • 8:02 - 8:04
    and actually if you see
    duplicate columns-- I'll leave
  • 8:04 - 8:07
    that for you to think about--
    if you see duplicate rows or
  • 8:07 - 8:10
    duplicate columns, or even if
    you just see that some rows
  • 8:10 - 8:12
    are linear combinations of
    other rows-- and I'm not
  • 8:12 - 8:15
    showing that to you right here--
    then you know that your
  • 8:15 - 8:18
    determinant is going
    to be equal to 0.
  • 8:18 - 8:18
Title:
Linear Algebra: Duplicate Row Determinant
Description:

more » « less
Video Language:
English
Team:
Khan Academy
Duration:
08:19

English subtitles

Revisions Compare revisions