Mathematics, five units · Grade 12

How do you find the length of a vector and the angle between two vectors?

The length of a vector in space is the square root of the sum of the squares of its three components. The angle between two vectors comes from the scalar product: multiply component by component, add, and divide by the product of the lengths — the result is the cosine of the angle. A scalar product of zero means the vectors are perpendicular.

Learning objectives

The length of a vector

A vector in space is written with three components, one for each axis. Its length is the square root of the sum of their squares — Pythagoras' theorem, applied twice: once in a plane and once between that plane and the third axis.

A length is always non-negative. A negative result means a root was skipped or a sign was mishandled in a square, since squaring a negative number gives a positive one.

The same formula gives the distance between two points in space: subtract the points to get the vector joining them, and take its length. Distance and vector length are one calculation.

The scalar product

The scalar product of two vectors is the sum of the products of corresponding components. Note that the result is a number and not a vector, which is where the name comes from.

It relates to the angle by a single formula: the scalar product equals the product of the lengths times the cosine of the angle between them. Dividing gives the cosine, and the inverse function gives the angle.

What the sign tells you

A scalar product of zero means the cosine is zero, so the angle is ninety degrees. That is the shortest test for perpendicularity there is, and it appears in almost every vector question at this level.

A positive product means an acute angle and a negative one an obtuse angle. You can tell the kind of angle before computing it at all.

In an exam this nearly always arrives in one form: prove the triangle is right-angled. Rather than computing three angles, compute one scalar product at the suspected vertex — if it is zero, the proof is finished.

Worked examples

  1. Find the length of the vector with components 2, 3 and 6

    1. Square each component: 4, 9, 36
    2. Add: 49
    3. Take the root

    Answer: The length is 7

  2. Are the vectors (1,2,3) and (2,1,−4) perpendicular?

    1. Multiply component by component: 2, 2, minus 12
    2. Add: 2 plus 2 minus 12

    Answer: The product is minus 8, so they are not perpendicular. The angle is obtuse

  3. Find the angle between (1,0,0) and (0,1,0)

    1. Scalar product: 0 plus 0 plus 0
    2. The lengths are 1 and 1
    3. The cosine of the angle is zero over one

    Answer: The angle is 90 degrees

Common mistakes

Adding components instead of multiplying them in the scalar product
The scalar product multiplies component by component and only then adds. Adding components is vector addition, which is a different operation and returns a vector rather than a number.
Expecting the scalar product to be a vector
The result is a single number. Three numbers coming out means either a vector product was computed or the addition was skipped.
Forgetting to divide by the product of the lengths
The scalar product alone is not a cosine. If the value exceeds one in size, the division was certainly skipped — a cosine never leaves that range.

What to remember

More in Mathematics, five units