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
- Add and subtract vectors and multiply a vector by a number
- Calculate the length of a vector given by its components
- Find the angle between two vectors using the scalar product
- Show that two vectors are perpendicular or that three points lie on one line
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
Find the length of the vector with components 2, 3 and 6
- Square each component: 4, 9, 36
- Add: 49
- Take the root
Answer: The length is 7
Are the vectors (1,2,3) and (2,1,−4) perpendicular?
- Multiply component by component: 2, 2, minus 12
- Add: 2 plus 2 minus 12
Answer: The product is minus 8, so they are not perpendicular. The angle is obtuse
Find the angle between (1,0,0) and (0,1,0)
- Scalar product: 0 plus 0 plus 0
- The lengths are 1 and 1
- 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
- Length is the root of the sum of the squared components.
- The scalar product is a number, not a vector.
- Zero means perpendicular; positive acute, negative obtuse.
- Divide by the product of lengths to get the cosine.
More in Mathematics, five units
- How do you prove a trigonometric identity?
- How do you solve a trigonometric equation over a full period?
- How do you find the asymptotes of a rational function?
- How do you differentiate a root and an exponential function?
- What is the natural logarithm and how do you differentiate it?
- What is a definite integral and how do you calculate it?
- What is the normal distribution and how do you standardise a measurement?