< Return to Video

The dot product

  • 0:01 - 0:03
    Let's learn a little bit
    about the dot product.
  • 0:03 - 0:06
    The dot product, frankly, out of
    the two ways of multiplying
  • 0:06 - 0:08
    vectors, I think is
    the easier one.
  • 0:08 - 0:10
    So what does the
    dot product do?
  • 0:10 - 0:11
    Why don't I give you the
    definition, and then I'll give
  • 0:11 - 0:12
    you an intuition.
  • 0:12 - 0:24
    So if I have two vectors; vector
    a dot vector b-- that's
  • 0:24 - 0:25
    how I draw my arrows.
  • 0:25 - 0:26
    I can draw my arrows
    like that.
  • 0:26 - 0:32
    That is equal to the magnitude
    of vector a times the
  • 0:32 - 0:37
    magnitude of vector b
    times cosine of the
  • 0:37 - 0:38
    angle between them.
  • 0:38 - 0:40
    Now where does this come from?
  • 0:40 - 0:41
    This might seem a little
    arbitrary, but I think with a
  • 0:41 - 0:44
    visual explanation, it will make
    a little bit more sense.
  • 0:44 - 0:49
    So let me draw, arbitrarily,
    these two vectors.
  • 0:49 - 0:54
    So that is my vector a-- nice
    big and fat vector.
  • 0:54 - 0:57
    It's good for showing
    the point.
  • 0:57 - 0:59
    And let me draw vector
    b like that.
  • 1:01 - 1:02
    Vector b.
  • 1:02 - 1:05
    And then let me draw the cosine,
    or let me, at least,
  • 1:05 - 1:07
    draw the angle between them.
  • 1:07 - 1:09
    This is theta.
  • 1:09 - 1:11
    So there's two ways
    of view this.
  • 1:11 - 1:13
    Let me label them.
  • 1:13 - 1:15
    This is vector a.
  • 1:15 - 1:17
    I'm trying to be color
    consistent.
  • 1:17 - 1:19
    This is vector b.
  • 1:19 - 1:22
    So there's two ways of
    viewing this product.
  • 1:22 - 1:27
    You could view it as vector a--
    because multiplication is
  • 1:27 - 1:29
    associative, you could
    switch the order.
  • 1:29 - 1:32
    So this could also be written
    as, the magnitude of vector a
  • 1:32 - 1:39
    times cosine of theta, times--
    and I'll do it in color
  • 1:39 - 1:42
    appropriate-- vector b.
  • 1:42 - 1:43
    And this times, this
    is the dot product.
  • 1:43 - 1:44
    I almost don't have
    to write it.
  • 1:44 - 1:46
    This is just regular
    multiplication, because these
  • 1:46 - 1:47
    are all scalar quantities.
  • 1:47 - 1:49
    When you see the dot between
    vectors, you're talking about
  • 1:49 - 1:52
    the vector dot product.
  • 1:52 - 1:54
    So if we were to just rearrange
    this expression this
  • 1:54 - 1:54
    way, what does it mean?
  • 1:54 - 1:57
    What is a cosine of theta?
  • 1:57 - 1:58
    Let me ask you a question.
  • 1:58 - 2:02
    If I were to drop a right
    angle, right here,
  • 2:02 - 2:07
    perpendicular to b-- so let's
    just drop a right angle
  • 2:07 - 2:15
    there-- cosine of theta
    soh-coh-toa so, cah cosine--
  • 2:15 - 2:20
    is equal to adjacent of
    a hypotenuse, right?
  • 2:20 - 2:22
    Well, what's the adjacent?
  • 2:22 - 2:25
    It's equal to this.
  • 2:25 - 2:29
    And the hypotenuse is equal to
    the magnitude of a, right?
  • 2:29 - 2:30
    Let me re-write that.
  • 2:30 - 2:34
    So cosine of theta-- and this
    applies to the a vector.
  • 2:34 - 2:40
    Cosine of theta of this angle
    is equal to ajacent, which
  • 2:40 - 2:43
    is-- I don't know what you could
    call this-- let's call
  • 2:43 - 2:47
    this the projection
    of a onto b.
  • 2:47 - 2:50
    It's like if you were to shine
    a light perpendicular to b--
  • 2:50 - 2:54
    if there was a light source
    here and the light was
  • 2:54 - 2:57
    straight down, it would be
    the shadow of a onto b.
  • 2:57 - 3:00
    Or you could almost think of it
    as the part of a that goes
  • 3:00 - 3:01
    in the same direction of b.
  • 3:01 - 3:07
    So this projection, they call
    it-- at least the way I get
  • 3:07 - 3:09
    the intuition of what a
    projection is, I kind of view
  • 3:09 - 3:10
    it as a shadow.
  • 3:10 - 3:13
    If you had a light source that
    came up perpendicular, what
  • 3:13 - 3:17
    would be the shadow of that
    vector on to this one?
  • 3:17 - 3:21
    So if you think about it, this
    shadow right here-- you could
  • 3:21 - 3:23
    call that, the projection
    of a onto b.
  • 3:23 - 3:24
    Or, I don't know.
  • 3:24 - 3:27
    Let's just call it, a sub b.
  • 3:27 - 3:29
    And it's the magnitude
    of it, right?
  • 3:29 - 3:34
    It's how much of vector a goes
    on vector b over-- that's the
  • 3:34 - 3:36
    adjacent side-- over
    the hypotenuse.
  • 3:36 - 3:39
    The hypotenuse is just the
    magnitude of vector a.
  • 3:39 - 3:42
    It's just our basic calculus.
  • 3:42 - 3:44
    Or another way you could view
    it, just multiply both sides
  • 3:44 - 3:46
    by the magnitude of vector a.
  • 3:46 - 3:51
    You get the projection of a onto
    b, which is just a fancy
  • 3:51 - 3:56
    way of saying, this side; the
    part of a that goes in the
  • 3:56 - 4:00
    same direction as b-- is another
    way to say it-- is
  • 4:00 - 4:04
    equal to just multiplying both
    sides times the magnitude of a
  • 4:04 - 4:08
    is equal to the magnitude
    of a, cosine of theta.
  • 4:08 - 4:10
    Which is exactly what
    we have up here.
  • 4:10 - 4:13
    And the definition of
    the dot product.
  • 4:13 - 4:16
    So another way of visualizing
    the dot product is, you could
  • 4:16 - 4:20
    replace this term with the
    magnitude of the projection of
  • 4:20 - 4:23
    a onto b-- which is just
    this-- times the
  • 4:23 - 4:25
    magnitude of b.
  • 4:25 - 4:26
    That's interesting.
  • 4:26 - 4:29
    All the dot product of two
    vectors is-- let's just take
  • 4:29 - 4:31
    one vector.
  • 4:31 - 4:34
    Let's figure out how much of
    that vector-- what component
  • 4:34 - 4:37
    of it's magnitude-- goes in
    the same direction as the
  • 4:37 - 4:40
    other vector, and let's
    just multiply them.
  • 4:40 - 4:41
    And where is that useful?
  • 4:41 - 4:42
    Well, think about it.
  • 4:42 - 4:43
    What about work?
  • 4:43 - 4:45
    When we learned work
    in physics?
  • 4:45 - 4:47
    Work is force times distance.
  • 4:47 - 4:49
    But it's not just
    the total force
  • 4:49 - 4:49
    times the total distance.
  • 4:49 - 4:51
    It's the force going
    in the same
  • 4:51 - 4:52
    direction as the distance.
  • 4:56 - 4:58
    You should review the physics
    playlist if you're watching
  • 4:58 - 5:04
    this within the calculus
    playlist. Let's say I have a
  • 5:04 - 5:08
    10 newton object.
  • 5:08 - 5:12
    It's sitting on ice, so
    there's no friction.
  • 5:12 - 5:14
    We don't want to worry about
    fiction right now.
  • 5:14 - 5:16
    And let's say I pull on it.
  • 5:16 - 5:20
    Let's say my force vector--
    This is my force vector.
  • 5:26 - 5:34
    Let's say my force vector
    is 100 newtons.
  • 5:34 - 5:38
    I'm making the numbers up.
  • 5:38 - 5:40
    100 newtons.
  • 5:40 - 5:47
    And Let's say I slide it to
    the right, so my distance
  • 5:47 - 5:55
    vector is 10 meters parallel
    to the ground.
  • 5:58 - 6:03
    And the angle between them is
    equal to 60 degrees, which is
  • 6:03 - 6:05
    the same thing is pi over 3.
  • 6:05 - 6:06
    We'll stick to degrees.
  • 6:06 - 6:08
    It's a little bit
    more intuitive.
  • 6:08 - 6:10
    It's 60 degrees.
  • 6:10 - 6:12
    This distance right
    here is 10 meters.
  • 6:12 - 6:17
    So my question is, by pulling on
    this rope, or whatever, at
  • 6:17 - 6:20
    the 60 degree angle, with a
    force of 100 newtons, and
  • 6:20 - 6:24
    pulling this block to the right
    for 10 meters, how much
  • 6:24 - 6:26
    work am I doing?
  • 6:26 - 6:29
    Well, work is force times the
    distance, but not just the
  • 6:29 - 6:30
    total force.
  • 6:30 - 6:33
    The magnitude of the force in
    the direction of the distance.
  • 6:33 - 6:35
    So what's the magnitude
    of the force in the
  • 6:35 - 6:37
    direction of the distance?
  • 6:37 - 6:42
    It would be the horizontal
    component of this force
  • 6:42 - 6:43
    vector, right?
  • 6:43 - 6:45
    So it would be 100
    newtons times the
  • 6:45 - 6:47
    cosine of 60 degrees.
  • 6:47 - 6:48
    It will tell you how
    much of that 100
  • 6:48 - 6:49
    newtons goes to the right.
  • 6:49 - 6:51
    Or another way you could
    view it if this
  • 6:51 - 6:55
    is the force vector.
  • 6:55 - 6:59
    And this down here is
    the distance vector.
  • 6:59 - 7:04
    You could say that the total
    work you performed is equal to
  • 7:04 - 7:10
    the force vector dot the
    distance vector, using the dot
  • 7:10 - 7:12
    product-- taking the dot
    product, to the force and the
  • 7:12 - 7:13
    distance factor.
  • 7:13 - 7:15
    And we know that the definition
    is the magnitude of
  • 7:15 - 7:19
    the force vector, which is 100
    newtons, times the magnitude
  • 7:19 - 7:23
    of the distance vector, which is
    10 meters, times the cosine
  • 7:23 - 7:24
    of the angle between them.
  • 7:24 - 7:27
    Cosine of the angle
    is 60 degrees.
  • 7:27 - 7:33
    So that's equal to 1,000
    newton meters
  • 7:33 - 7:34
    times cosine of 60.
  • 7:34 - 7:36
    Cosine of 60 is what?
  • 7:36 - 7:39
    It's square root of 3 over 2.
  • 7:42 - 7:45
    Square root of 3 over 2, if
    I remember correctly.
  • 7:45 - 7:48
    So times the square
    root of 3 over 2.
  • 7:48 - 7:50
    So the 2 becomes 500.
  • 7:50 - 7:56
    So it becomes 500 square roots
    of 3 joules, whatever that is.
  • 7:56 - 7:58
    I don't know 700 something,
    I'm guessing.
  • 7:58 - 7:59
    Maybe it's 800 something.
  • 7:59 - 8:00
    I'm not quite sure.
  • 8:00 - 8:02
    But the important thing to
    realize is that the dot
  • 8:02 - 8:03
    product is useful.
  • 8:03 - 8:05
    It applies to work.
  • 8:05 - 8:07
    It actually calculates what
    component of what vector goes
  • 8:07 - 8:08
    in the other direction.
  • 8:08 - 8:09
    Now you could interpret
    it the other way.
  • 8:09 - 8:12
    You could say this is
    the magnitude of a
  • 8:12 - 8:14
    times b cosine of theta.
  • 8:14 - 8:16
    And that's completely valid.
  • 8:16 - 8:18
    And what's b cosine of theta?
  • 8:18 - 8:22
    Well, if you took b cosine of
    theta, and you could work this
  • 8:22 - 8:24
    out as an exercise for yourself,
    that's the amount of
  • 8:24 - 8:26
    the magnitude of the
    b vector that's
  • 8:26 - 8:28
    going in the a direction.
  • 8:28 - 8:30
    So it doesn't matter
    what order you go.
  • 8:30 - 8:34
    So when you take the cross
    product, it matters whether
  • 8:34 - 8:36
    you do a cross b,
    or b cross a.
  • 8:36 - 8:38
    But when you're doing the dot
    product, it doesn't matter
  • 8:38 - 8:39
    what order.
  • 8:39 - 8:42
    So b cosine theta would be the
    magnitude of vector b that
  • 8:42 - 8:44
    goes in the direction of a.
  • 8:44 - 8:50
    So if you were to draw a
    perpendicular line here, b
  • 8:50 - 8:51
    cosine theta would
    be this vector.
  • 8:54 - 8:57
    That would be b cosine theta.
  • 8:57 - 9:00
    The magnitude of
    b cosine theta.
  • 9:00 - 9:03
    So you could say how much of
    vector b goes in the same
  • 9:03 - 9:04
    direction as a?
  • 9:04 - 9:06
    Then multiply the
    two magnitudes.
  • 9:06 - 9:08
    Or you could say how much of
    vector a goes in the same
  • 9:08 - 9:10
    direction is vector b?
  • 9:10 - 9:12
    And then multiply the
    two magnitudes.
  • 9:12 - 9:14
    And now, this is, I think, a
    good time to just make sure
  • 9:14 - 9:17
    you understand the difference
    between the dot product and
  • 9:17 - 9:18
    the cross product.
  • 9:18 - 9:20
    The dot product ends up
    with just a number.
  • 9:20 - 9:23
    You multiply two vectors and
    all you have is a number.
  • 9:23 - 9:26
    You end up with just
    a scalar quantity.
  • 9:26 - 9:28
    And why is that interesting?
  • 9:28 - 9:33
    Well, it tells you how much do
    these-- you could almost say--
  • 9:33 - 9:34
    these vectors reinforce
    each other.
  • 9:34 - 9:37
    Because you're taking the parts
    of their magnitudes that
  • 9:37 - 9:39
    go in the same direction
    and multiplying them.
  • 9:39 - 9:42
    The cross product is actually
    almost the opposite.
  • 9:42 - 9:45
    You're taking their orthogonal
    components, right?
  • 9:45 - 9:47
    The difference was, this
    was a a sine of theta.
  • 9:47 - 9:49
    I don't want to mess you up
    this picture too much.
  • 9:49 - 9:51
    But you should review the
    cross product videos.
  • 9:51 - 9:53
    And I'll do another video where
    I actually compare and
  • 9:53 - 9:54
    contrast them.
  • 9:54 - 9:56
    But the cross product is, you're
    saying, let's multiply
  • 9:56 - 10:00
    the magnitudes of the vectors
    that are perpendicular to each
  • 10:00 - 10:02
    other, that aren't going in the
    same direction, that are
  • 10:02 - 10:03
    actually orthogonal
    to each other.
  • 10:03 - 10:06
    And then, you have to pick a
    direction since you're not
  • 10:06 - 10:07
    saying, well, the same
    direction that
  • 10:07 - 10:09
    they're both going in.
  • 10:09 - 10:11
    So you're picking the direction
    that's orthogonal to
  • 10:11 - 10:12
    both vectors.
  • 10:12 - 10:15
    And then, that's why the
    orientation matters and you
  • 10:15 - 10:16
    have to take the right hand
    rule, because there's actually
  • 10:16 - 10:19
    two vectors that are
    perpendicular to any other two
  • 10:19 - 10:21
    vectors in three dimensions.
  • 10:21 - 10:22
    Anyway, I'm all out of time.
  • 10:22 - 10:26
    I'll continue this, hopefully
    not too confusing, discussion
  • 10:26 - 10:26
    in the next video.
  • 10:26 - 10:29
    I'll compare and contrast
    the cross
  • 10:29 - 10:30
    product and the dot product.
  • 10:30 - 10:32
    See you in the next video.
Title:
The dot product
Description:

more » « less
Video Language:
English
Duration:
10:33

English subtitles

Revisions