Unit 2 · Length, angle and the dot product

Lesson 07 · Available to read

Length of a vector

The length, or norm, of a vector follows from Pythagoras' theorem: √(3² + 4²) = 5.

What is the length of the vector [3, 4]?

Drawn in the plane, it moves 3 units horizontally and 4 units vertically, forming a right triangle in which the vector is the hypotenuse. Pythagoras' theorem gives the length: √(3² + 4²) = √25 = 5.

This length is called the norm (more precisely, the Euclidean norm) and is written ‖v‖. The same formula applies in any dimension: square each component, sum the squares and take the square root. For example, the vector [1, 2, 2, 0, 4] in ℝ⁵ also has norm 5. A norm is never negative, and it equals zero only for the zero vector.

Norms allow us to measure magnitude; in the next lessons they will also measure how far apart two data points are.

The vector [3, 4] as the long side of a right triangle with sides 3 and 4, length 5

The takeaway

‖v‖ = √(v₁² + v₂² + … + vₙ²), the square root of the sum of squared components.

Practice

0 of 5 attempted

  1. 1Calculate

    Find the length of [6, 8].

    Saved in this browser

  2. 2Calculate

    Find the length of [1, 1] (to two decimals).

    Saved in this browser

  3. 3Calculate

    Find the length of the 3D vector [2, 3, 6].

    Saved in this browser

  4. 4Multiple choice

    What is the length of [−3, −4]?

  5. 5Explain in your own words

    Explain why the length formula comes from Pythagoras.

    Saved in this browser