Return to Video

Representing systems of any number of equations with matrices | Precalculus | Khan Academy

  • 0:00 - 0:01
    - [Instructor] In a previous video,
  • 0:01 - 0:02
    we saw that if you have a system
  • 0:02 - 0:05
    of three equations with
    three unknowns like this,
  • 0:05 - 0:08
    you can represent it as
    a matrix vector equation,
  • 0:08 - 0:11
    where this matrix right over here
  • 0:11 - 0:14
    is a three-by-three matrix.
  • 0:14 - 0:16
    That is essentially a coefficient matrix.
  • 0:16 - 0:18
    It has all of the coefficients of the Xs,
  • 0:18 - 0:21
    the Ys, and the Zs as its various columns.
  • 0:21 - 0:25
    and then you're going to
    multiply that times this vector,
  • 0:25 - 0:27
    which is really the vector
    of the unknown variables,
  • 0:27 - 0:30
    and this is a three-by-one vector.
  • 0:30 - 0:31
    And then you would result
  • 0:31 - 0:35
    in this other three-by-one
    vector, which is a vector
  • 0:35 - 0:40
    that contains these constant
    terms right over here.
  • 0:40 - 0:42
    What we're gonna do in
    this video is recognize
  • 0:42 - 0:45
    that you can generalize this phenomenon.
  • 0:45 - 0:46
    It's not just true with a system
  • 0:46 - 0:49
    of three equations with three unknowns.
  • 0:49 - 0:52
    It actually generalizes to
    N equations with N unknowns.
  • 0:52 - 0:56
    But just to appreciate that
    that is indeed the case,
  • 0:56 - 1:00
    let us look at a system of two
    equations with two unknowns.
  • 1:00 - 1:04
    So let's say you had 2x
    plus y is equal to nine,
  • 1:04 - 1:09
    and we had 3x minus y is equal to five.
  • 1:09 - 1:11
    I encourage you, pause this video
  • 1:11 - 1:13
    and think about how that
    would be represented
  • 1:13 - 1:15
    as a matrix vector equation.
  • 1:17 - 1:20
    All right, now let's
    work on this together.
  • 1:20 - 1:24
    So this is a system of two
    equations with two unknowns.
  • 1:24 - 1:27
    So the matrix that represents
    the coefficients is going
  • 1:27 - 1:29
    to be a two-by-two matrix
  • 1:29 - 1:32
    and then that's going to be multiplied
  • 1:32 - 1:35
    by a vector that represents
    the unknown variables.
  • 1:35 - 1:37
    We have two unknown variables over here.
  • 1:37 - 1:40
    So this is going to be
    a two-by-one vector,
  • 1:40 - 1:43
    and then that's going
    to be equal to a vector
  • 1:43 - 1:46
    that represents the constants
    on the right-hand side,
  • 1:46 - 1:47
    and obviously we have two of those.
  • 1:47 - 1:49
    So that's going to be a
    two-by-one vector as well.
  • 1:49 - 1:52
    And then we can do exactly what we did
  • 1:52 - 1:54
    in that previous example
    in a previous video.
  • 1:54 - 1:59
    The coefficients on the
    X terms, two and three,
  • 1:59 - 2:03
    and then we have the
    coefficients on the Y terms.
  • 2:03 - 2:05
    This would be a positive one
  • 2:05 - 2:07
    and then this would be a negative one.
  • 2:07 - 2:10
    And then we multiply it times the vector
  • 2:10 - 2:12
    of the variables, X, Y,
  • 2:12 - 2:15
    and then last but not least,
  • 2:15 - 2:19
    you have this nine and this
    five over here, nine and five.
  • 2:19 - 2:22
    And I encourage you and multiply this out.
  • 2:22 - 2:25
    Multiply this matrix times this vector.
  • 2:25 - 2:29
    And when you do that and you
    still set up this equality,
  • 2:29 - 2:31
    you're going to see that
    it essentially turns
  • 2:31 - 2:33
    into this exact same system
  • 2:33 - 2:36
    of two equations and two unknowns.
  • 2:36 - 2:38
    Now, what's interesting about this is
  • 2:38 - 2:41
    that we see a generalizable form.
  • 2:41 - 2:44
    In general, you can represent a system
  • 2:44 - 2:48
    of N equations and N unknowns in the form.
  • 2:48 - 2:52
    Sum N-by-N matrix A,
  • 2:52 - 2:53
    N by N,
  • 2:53 - 2:58
    times sum N-by-one vector X.
  • 2:58 - 3:00
    This isn't just the variable X.
  • 3:00 - 3:04
    This is a vector X that
    has N dimensions to it.
  • 3:04 - 3:09
    So times sum N-by-one vector X is going
  • 3:09 - 3:14
    to be equal to sum N-by-one vector B.
  • 3:14 - 3:17
    These are the letters that
    people use by convention.
  • 3:17 - 3:19
    This is going to be N by one.
  • 3:19 - 3:22
    And so you can see in
    these different scenarios.
  • 3:22 - 3:25
    In that first one, this is
    a three-by-three matrix.
  • 3:25 - 3:27
    We could call that A,
  • 3:27 - 3:30
    and then we could call this the vector X,
  • 3:30 - 3:32
    and then we could call this the vector B.
  • 3:32 - 3:33
    Now in that second scenario,
  • 3:33 - 3:35
    we could call this the matrix A,
  • 3:35 - 3:37
    we could call this the vector X,
  • 3:37 - 3:39
    and then we could call this the vector B,
  • 3:39 - 3:43
    but we can generalize
    that to N dimensions.
  • 3:43 - 3:45
    And as I talked about
    in the previous video,
  • 3:45 - 3:48
    what's interesting about this
    is you could think about,
  • 3:48 - 3:50
    for example, in this
    system of two equations
  • 3:50 - 3:52
    with two unknowns, as all
    right, I have a line here,
  • 3:52 - 3:53
    I have a line here,
  • 3:53 - 3:58
    and X and Y represent the
    intersection of those lines.
  • 3:58 - 3:59
    But when you represent it this way,
  • 3:59 - 4:01
    you could also imagine it as saying,
  • 4:01 - 4:04
    okay, I have some unknown
    vector in the coordinate plane
  • 4:04 - 4:07
    and I'm transforming it using this matrix
  • 4:07 - 4:10
    to get this vector nine five.
  • 4:10 - 4:12
    And so I have to figure out what vector,
  • 4:12 - 4:16
    when transformed in this
    way, gets us to nine five,
  • 4:16 - 4:18
    and we also thought about it
    in the three-by-three case.
  • 4:18 - 4:21
    What three-dimensional vector,
    when transformed in this way,
  • 4:21 - 4:23
    gets us to this vector right over here?
  • 4:23 - 4:25
    And so that hints,
  • 4:25 - 4:27
    that foreshadows where
    we might be able to go.
  • 4:27 - 4:31
    If we can unwind this
    transformation somehow,
  • 4:31 - 4:34
    then we can figure out what
    these unknown vectors are.
  • 4:34 - 4:37
    And if we can do it in two
    dimensions or three dimensions,
  • 4:37 - 4:40
    why not be able to do it in N dimensions?
  • 4:40 - 4:42
    Which you'll see is actually very useful
  • 4:42 - 4:44
    if you ever become a data scientist,
  • 4:44 - 4:45
    or you go into computer science,
  • 4:45 - 4:48
    or if you go into computer
    graphics of some kind.
Title:
Representing systems of any number of equations with matrices | Precalculus | Khan Academy
Description:

more » « less
Video Language:
English
Team:
Khan Academy
Duration:
04:49

English subtitles

Revisions