Leaving Certificate Mathematics18.3 The dot product

All books

18.3 The dot product — Learn

Prerequisites: Section 18.2 — adding vectors and multiplying by a scalar.

Objectives: work out the dot product of two vectors; use its properties; connect it to length and to the angle between the vectors.

By the end of this section you can multiply two vectors to get a single number, and say what that number means.

Multiplying two vectors

There are two ways to multiply vectors. One of them, the dot product, takes two vectors and returns a single number. The number is a scalar, not a vector.

The dot product. For a=(a1a2)\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \end{pmatrix} and b=(b1b2)\mathbf{b} = \begin{pmatrix} b_1 \\ b_2 \end{pmatrix},

a⋅b=a1b1+a2b2\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2

Multiply the matching components, then add the two products. The answer is a single number.

Example 1. Work out (12)⋅(34)\begin{pmatrix} 1 \\ 2 \end{pmatrix} \cdot \begin{pmatrix} 3 \\ 4 \end{pmatrix}.

(12)⋅(34)=1×3+2×4=3+8=11\begin{pmatrix} 1 \\ 2 \end{pmatrix} \cdot \begin{pmatrix} 3 \\ 4 \end{pmatrix} = 1 \times 3 + 2 \times 4 = 3 + 8 = 11

Example 2. Work out (−25)⋅(3−1)\begin{pmatrix} -2 \\ 5 \end{pmatrix} \cdot \begin{pmatrix} 3 \\ -1 \end{pmatrix}.

(−2)×3+5×(−1)=−6−5=−11(-2) \times 3 + 5 \times (-1) = -6 - 5 = -11

A negative answer is allowed. The sign carries information, which Section 18.4 uses.

Properties of the dot product

The dot product behaves in the ways you would hope:

The last one is worth a moment. A vector dotted with itself gives a12+a22a_1^2 + a_2^2, which is exactly the square of its length. So the dot product knows about length.

Example 3. For a=(34)\mathbf{a} = \begin{pmatrix} 3 \\ 4 \end{pmatrix}, a⋅a=32+42=25\mathbf{a} \cdot \mathbf{a} = 3^2 + 4^2 = 25, and ∣a∣=5|\mathbf{a}| = 5, so ∣a∣2=25|\mathbf{a}|^2 = 25. The two agree.

The dot product and the angle

The dot product carries the angle between the two vectors as well as their lengths.

The angle formula. If θ\theta is the angle between the non-zero vectors a\mathbf{a} and b\mathbf{b}, then

a⋅b=∣a∣ ∣b∣cos⁡θ\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}|\,|\mathbf{b}|\cos\theta

Why it is true. Take the two vectors from a common point, and join their ends. The triangle has sides a\mathbf{a}, b\mathbf{b} and b−a\mathbf{b} - \mathbf{a}, and the angle between a\mathbf{a} and b\mathbf{b} is θ\theta.

The cosine rule applied to that triangle gives

∣b−a∣2=∣a∣2+∣b∣2−2∣a∣∣b∣cos⁡θ|\mathbf{b} - \mathbf{a}|^2 = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2|\mathbf{a}||\mathbf{b}|\cos\theta

Now expand the left side using the properties above. Because b−a\mathbf{b} - \mathbf{a} is a vector, its squared length is (b−a)⋅(b−a)(\mathbf{b} - \mathbf{a}) \cdot (\mathbf{b} - \mathbf{a}), which multiplies out to

∣b∣2−2 a⋅b+∣a∣2|\mathbf{b}|^2 - 2\,\mathbf{a} \cdot \mathbf{b} + |\mathbf{a}|^2

The two expressions for ∣b−a∣2|\mathbf{b} - \mathbf{a}|^2 are equal, so

∣a∣2+∣b∣2−2 a⋅b=∣a∣2+∣b∣2−2∣a∣∣b∣cos⁡θ|\mathbf{a}|^2 + |\mathbf{b}|^2 - 2\,\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}|^2 + |\mathbf{b}|^2 - 2|\mathbf{a}||\mathbf{b}|\cos\theta

Cancel the common terms and divide by −2-2:

a⋅b=∣a∣ ∣b∣cos⁡θ\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}|\,|\mathbf{b}|\cos\theta

This is the bridge between the algebra of components and the geometry of angles. It is why the dot product can test for a right angle, and why it can find an angle.

The sign of the dot product

Because ∣a∣|\mathbf{a}| and ∣b∣|\mathbf{b}| are positive, the sign of the dot product is the sign of cos⁡θ\cos\theta.

So the sign of one number tells you the shape of the angle, before you find it.

Progress check

Back to the chapter problem. The drone's two legs are a=(62)\mathbf{a} = \begin{pmatrix} 6 \\ 2 \end{pmatrix} km and b=(−26)\mathbf{b} = \begin{pmatrix} -2 \\ 6 \end{pmatrix} km.

Work out a⋅b\mathbf{a} \cdot \mathbf{b}. The answer is a single number, and its sign tells you the shape of the angle between the two legs. Write down what the sign says, then keep the number: Section 18.4 turns it into the angle.

You should now be able to

Settings

Colour scheme

Light or dark pages. Your colour and layout stay the same.

Colour

The paper, ink and lettering. Your layout stays the same.

Quiet colours
Bold colours
Layout

How pages are arranged. Your colours stay the same.

Reading offline

Keep this book on this device and read it offline.