The Scalar Product

The scalar product takes two vectors and returns a single number. That one number quietly tells you the angle between the vectors and whether they meet at a right angle.

MYP 5Extended MathsVectors & MatricesCriteria A · C · D~10 min read

What the dot product is

The scalar product (also called the dot product) combines two vectors into one number. For 2D column vectors you multiply the matching components and add the two results.

Scalar product
For \(\mathbf{u} = \begin{pmatrix} x_1 \\ y_1 \end{pmatrix}\) and \(\mathbf{v} = \begin{pmatrix} x_2 \\ y_2 \end{pmatrix}\), the value \(\mathbf{u}\cdot\mathbf{v} = x_1 x_2 + y_1 y_2\).

The answer is a scalar (a plain number), never a vector, which is exactly why it is called the scalar product.

Worked example

Find \(\mathbf{u}\cdot\mathbf{v}\) for \(\mathbf{u} = \begin{pmatrix} 3 \\ 4 \end{pmatrix}\) and \(\mathbf{v} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}\).

1
Multiply the \(x\) components: \(3 \times 2 = 6\).
2
Multiply the \(y\) components: \(4 \times 1 = 4\).
3
Add the two results: \(6 + 4 = 10\).
\(\mathbf{u}\cdot\mathbf{v} = 10\)

The angle between vectors

The dot product is linked to the angle \(\theta\) between two vectors by this rule, where \(|\mathbf{u}|\) and \(|\mathbf{v}|\) are the magnitudes.

\[ \cos\theta = \frac{\mathbf{u}\cdot\mathbf{v}}{|\mathbf{u}|\,|\mathbf{v}|} \]

So the recipe is: work out the dot product, work out each magnitude, divide, then take the inverse cosine.

Worked example

Find the angle between \(\mathbf{u} = \begin{pmatrix} 3 \\ 4 \end{pmatrix}\) and \(\mathbf{v} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}\).

1
The dot product (from above) is \(\mathbf{u}\cdot\mathbf{v} = 10\).
2
The magnitudes are \(|\mathbf{u}| = \sqrt{3^2 + 4^2} = \sqrt{25} = 5\) and \(|\mathbf{v}| = \sqrt{2^2 + 1^2} = \sqrt{5}\).
3
So \(\cos\theta = \dfrac{10}{5\sqrt{5}} = \dfrac{2}{\sqrt{5}} \approx 0.8944\).
4
Take the inverse cosine: \(\theta = \cos^{-1}(0.8944) \approx 26.6^\circ\).
The angle is about \(26.6^\circ\).

Testing for perpendicularity

Here is the neat part. If two vectors are perpendicular, the angle between them is \(90^\circ\), and \(\cos 90^\circ = 0\). The magnitudes are never zero for real vectors, so the fraction can only equal zero when the top is zero. That gives a lightning-fast test.

Dot product zero means perpendicular

Two non-zero vectors are perpendicular exactly when \(\mathbf{u}\cdot\mathbf{v} = 0\). You do not need to find any angle: just check whether the dot product comes out to zero.

Worked example

Are \(\mathbf{a} = \begin{pmatrix} 2 \\ 3 \end{pmatrix}\) and \(\mathbf{b} = \begin{pmatrix} 3 \\ -2 \end{pmatrix}\) perpendicular?

1
Compute the dot product: \(\mathbf{a}\cdot\mathbf{b} = (2)(3) + (3)(-2) = 6 - 6\).
2
This equals \(0\), and both vectors are non-zero.
Yes, the dot product is \(0\), so \(\mathbf{a}\) and \(\mathbf{b}\) are perpendicular.

Putting it together (Criterion D)

A common applied question gives you an unknown component and asks you to make two vectors perpendicular. Set the dot product to zero and solve the resulting equation.

Worked example

Find the value of \(k\) so that \(\begin{pmatrix} 4 \\ k \end{pmatrix}\) is perpendicular to \(\begin{pmatrix} 2 \\ 6 \end{pmatrix}\).

1
For perpendicular vectors the dot product is zero: \((4)(2) + (k)(6) = 0\).
2
Simplify: \(8 + 6k = 0\).
3
Solve: \(6k = -8\), so \(k = -\dfrac{8}{6} = -\dfrac{4}{3}\).
\(k = -\dfrac{4}{3}\)

Where this is assessed

The dot product itself is Criterion A. Choosing to set it to zero to solve a perpendicularity problem, then interpreting the result, is Criterion D. Communicating each line of the angle calculation clearly earns Criterion C.

Check yourself

1. Find the scalar product of \(\begin{pmatrix} 1 \\ 2 \end{pmatrix}\) and \(\begin{pmatrix} 4 \\ 3 \end{pmatrix}\). +

Multiply matching components and add: \((1)(4) + (2)(3) = 4 + 6 = \mathbf{10}\).

2. Are \(\begin{pmatrix} 6 \\ 4 \end{pmatrix}\) and \(\begin{pmatrix} 2 \\ -3 \end{pmatrix}\) perpendicular? +

Dot product: \((6)(2) + (4)(-3) = 12 - 12 = 0\). Since the dot product is zero and neither vector is zero, yes, they are perpendicular.

3. Find the angle between \(\begin{pmatrix} 1 \\ 0 \end{pmatrix}\) and \(\begin{pmatrix} 1 \\ 1 \end{pmatrix}\). +

Dot product: \((1)(1) + (0)(1) = 1\). Magnitudes: \(\sqrt{1^2 + 0^2} = 1\) and \(\sqrt{1^2 + 1^2} = \sqrt{2}\). So \(\cos\theta = \dfrac{1}{1 \times \sqrt{2}} = \dfrac{1}{\sqrt{2}}\), giving \(\theta = \cos^{-1}\!\left(\dfrac{1}{\sqrt{2}}\right) = \mathbf{45^\circ}\).


Part of the Extended Maths library. Spotted an error or want a topic added? That feedback makes the notes better.