learn › Linear Algebra

Vectors

lesson · about 3 minutes

Dot products, lengths, perpendicular vectors, cross products.

Pen and paper is fine · no calculator needed why?

Opens at level 35. You're level 1. You can read and practice here now.

the idea

A vector is a list of numbers, like (2, −1, 3): an arrow with a direction and a length.

more of the idea

The dot product multiplies matching entries and adds them, giving one number. It is 0 exactly when the two arrows are perpendicular (at right angles). The length comes from Pythagoras: square the entries, add, and take the square root. The cross product of two 3D vectors is a new vector at right angles to both, and each of its components is a small difference of two products.

techniques

Dot product, and perpendicular Any dot product, or the k that makes two vectors perpendicular.
  1. Multiply matching entries: first with first, second with second, and so on.
  2. Add the products into one number.
  3. Perpendicular: write the dot product with k in it, set it to 0, and solve for k.

example For what value of k are (2, k, 1) and (3, 2, −4) perpendicular?

  1. First entries: 2 × 3 = 6.
  2. Second: k × 2, or 2k. Third: 1 × (−4) = −4.
  3. Add and set to 0: 6 + 2k − 4 = 0, so 2k = −2.
  4. k = −1.

Answer: −1

Length: square, add, root The length of any vector.
  1. Square each entry. Negative entries give positive squares.
  2. Add the squares, then take the square root.

example What is the length of the vector (4, −4, 7)?

  1. Squares: 16, 16 and 49.
  2. 16 + 16 + 49 = 81.
  3. The square root of 81 is 9.

Answer: 9

Cross product, one component One component of a × b, where a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃).
  1. x-component: a₂b₃ − a₃b₂.
  2. y-component: a₃b₁ − a₁b₃.
  3. z-component: a₁b₂ − a₂b₁.
  4. Each skips its own position and uses the next two in the cycle 1, 2, 3, 1, 2.

example What is the y-component of (2, −1, 3) × (1, 4, −2)?

  1. y-component: a₃b₁ − a₁b₃.
  2. 3 × 1 − 2 × (−2) = 3 + 4 = 7.

Answer: 7

watch out for · 3 traps

practice

Sign in to try one

New here? Start the four-problem warm-up. No sign-up.

Dot product

worked example

What is (2, −5, 6) · (6, 0, −3)?

  1. Multiply matching entries: 2 × 6, (−5) × 0, 6 × (−3).
  2. Add the products: 12 + 0 − 18 = −6.

Answer: -6

Length of a vector

worked example

What is the length of the vector (6, 7, 6)?

  1. Length = √(sum of the squares of the entries).
  2. √(6² + 7² + 6²) = √(36 + 49 + 36) = √121 = 11.

Answer: 11

Perpendicular vectors

worked example

For what value of k are (5, 5) and (−5, k) perpendicular?

  1. Perpendicular means the dot product is 0: 5 × (−5) + 5 × k = 0.
  2. That is −25 + 5k = 0, so k = 5.

Answer: 5

Cross product

worked example

What is the y-component of (1, 1, 2) × (4, −3, −4)?

  1. With a = (1, 1, 2) and b = (4, −3, −4), the y-component of a × b is a₃b₁ − a₁b₃.
  2. 2 × 4 − 1 × (−4) = 8 − (−4) = 12.

Answer: 12

Sign in to start