Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 44 · Getting Started

A Calculus and Vector Toolkit

Revise the dot product, cross product, vector derivatives and the chain rule, with the one fact about unit vectors that powers all of curve theory.

Almost every formula in this course is built from three ingredients: the dot product, the cross product, and the derivative of a vector that depends on a parameter. This lesson revises each one with a picture, a worked example and a bit of code. If you already know them well, skim the headings and read the last section, which contains a small fact about unit vectors that you will use constantly.

Three cards: the dot product with projection and angle, the cross product as a parallelogram with a perpendicular arrow, and secant lines turning into a tangent
Caption: the three tools of the course. The dot product measures alignment, the cross product measures area and direction of a perpendicular, and the derivative is a limit of secants.

What you will learn

  • How to compute lengths, angles, areas and perpendicular directions with dot and cross products
  • What the derivative of a vector-valued function is and how to compute it
  • The product rules for dot and cross products
  • Why the derivative of a unit vector is perpendicular to it

Key terms

Vector-valued function: a rule that assigns a vector r(t) to each number t.

Dot product: u · v = u₁v₁ + u₂v₂ + u₃v₃, a number.

Cross product: u × v, a vector perpendicular to both u and v (in 3D).

Velocity: the derivative r′(t) of a position function.

Partial derivative: the derivative with respect to one variable, the others held fixed.

Vectors, length and the dot product

A vector in 3-space is a list u = (u₁, u₂, u₃). Its length is |u| = √(u · u). The dot product has two equivalent descriptions:

Text
u · v = u₁v₁ + u₂v₂ + u₃v₃      (algebra)
u · v = |u| |v| cos θ           (geometry, θ = angle between them)

The geometric form gives the angle: cos θ = (u · v) / (|u| |v|). It also gives a test for perpendicularity: u · v = 0 exactly when u ⟂ v (for nonzero vectors). And |v| cos θ is the length of the shadow of v along u, which is why the dot product appears whenever we split a vector into a part along something and a part across it. We will use this to split acceleration into tangential and normal pieces.

Worked example. Let u = (1, 2, 3) and v = (4, −1, 2). Then u · v = 4 − 2 + 6 = 8, |u| = √14, |v| = √21, so cos θ = 8 / √294 ≈ 0.4666 and θ ≈ 62.2°.

The cross product

For u = (u₁, u₂, u₃) and v = (v₁, v₂, v₃):

Text
u × v = (u₂v₃ − u₃v₂,  u₃v₁ − u₁v₃,  u₁v₂ − u₂v₁)

Three facts to remember:

  1. u × v is perpendicular to both u and v, with direction given by the right-hand rule.
  2. |u × v| = |u| |v| sin θ, the area of the parallelogram spanned by u and v.
  3. u × v = −(v × u), and u × v = 0 exactly when u and v are parallel.

For our example: u × v = (2·2 − 3·(−1), 3·4 − 1·2, 1·(−1) − 2·4) = (7, 10, −9). Check: (7, 10, −9) · u = 7 + 20 − 27 = 0 and (7, 10, −9) · v = 28 − 10 − 18 = 0.

Python Dot and cross products in numpy

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Derivatives of vector functions

A curve in space is described by a vector function r(t) = (x(t), y(t), z(t)). Its derivative is taken component by component:

Text
r′(t) = (x′(t), y′(t), z′(t)) = lim (r(t + h) − r(t)) / h   as h → 0

Geometrically, the vector (r(t + h) − r(t)) / h points along a secant from r(t) to a nearby point. As h shrinks, the secants rotate into the tangent line. If you think of t as time, r′(t) is the velocity and |r′(t)| is the speed.

Worked example. For the helix r(t) = (cos t, sin t, t), r′(t) = (−sin t, cos t, 1) and the speed is √(sin²t + cos²t + 1) = √2, a constant.

JS The derivative as a limit

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Rules for differentiating vector expressions

Because derivatives work component by component, the usual rules carry over:

Text
(u + v)′ = u′ + v′             (c u)′ = c u′
(u · v)′ = u′ · v + u · v′      (u × v)′ = u′ × v + u × v′
(f(t) u)′ = f′ u + f u′

Note that the order matters in the cross-product rule. Also, if t = t(s) then d/ds r(t(s)) = r′(t) · dt/ds (the chain rule).

For a function of two variables, r(u, v), we write r_u = ∂r/∂u and r_v = ∂r/∂v. These are the two tangent vectors of a surface patch, the stars of chapter 3. The chain rule for a curve u(t), v(t) drawn on the patch is d/dt r(u(t), v(t)) = r_u u′ + r_v v′.

The key fact: unit vectors turn at right angles

Suppose T(t) has length 1 for every t. Then T · T = 1, and differentiating both sides using the dot-product rule gives:

Text
T′ · T + T · T′ = 0   so   T · T′ = 0

So the derivative of a unit vector is perpendicular to the vector itself. If you drive at constant speed, your velocity changes only in direction, and so the acceleration points sideways. This one-line argument is why the Frenet frame in chapter 2 exists, and why "turning" is the same as "being pushed sideways".

Common misconceptions

"The derivative of a unit vector is zero." Its length does not change, but its direction does, so the derivative is not zero. It is perpendicular to the vector.

"u × v = v × u." The cross product changes sign when you swap its factors.

"The dot product gives a vector." It gives a single number; the cross product gives a vector.

Try it

The picture below shows it. The unit vector T(t) = (cos t, sin t) moves around a circle, and its derivative (−sin t, cos t) is always at right angles.

Python A unit vector and its derivative

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python Secants turn into the tangent

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 5 questions

of 5 answered You scored / 5 · perfect!

  1. 1. If u = (1, 0, 0) and v = (0, 2, 0), what is u × v?

    u × v = (0·0 − 0·2, 0·0 − 1·0, 1·2 − 0·0) = (0, 0, 2). The x-axis crossed with the y-axis points along z.
  2. 2. What does |u × v| equal?

    |u × v| = |u||v| sin θ is the area of the parallelogram.
  3. 3. A curve has r(t) = (3t, 4t, 0). What is its speed?

    r′ = (3, 4, 0), so the speed is √(9 + 16) = 5.
  4. 4. If |T(t)| = 1 for all t, which statement is true?

    Differentiating T · T = 1 gives 2 T · T′ = 0.
  5. 5. Which rule is correct for the derivative of a cross product?

    The product rule holds with the order of the factors preserved.

Summary

  • The dot product gives lengths, angles and projections; zero means perpendicular.
  • The cross product gives a perpendicular vector whose length is the parallelogram area.
  • r′(t) is the limit of secant vectors; it points along the tangent, and its length is the speed.
  • Dot and cross products obey product rules, so long as the order of cross-product factors is kept.
  • A unit vector is always perpendicular to its own derivative.

Next: Plotting Curves and Surfaces with Python