---
title: "The Scalar Product in the Plane"
book: "High School Mathematics"
subject: math
language: en
chapter: 16
exercises: 11
source: https://one-course.com/books/math/2/en/chapter/16-the-scalar-product-in-the-plane
---

# Chapter 16 — The Scalar Product in the Plane

The [scalar product](#def-g11-scal-dot) attaches a *number* to a pair of [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector), and that number sees geometry: it vanishes exactly for perpendicular directions, and it measures angles and lengths. It is the engine behind the law of [cosines](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin), [equations](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-equation) of circles, and perpendicularity computations. The same tool, in space, is the subject of [Chapter 31](https://one-course.com/books/math/2/en/chapter/31-vectors-lines-and-planes-in-space#ch-g12-space).

## 16.1 Definition and first computations

**Definition 16.1 (Scalar product).**

The *scalar product* of two [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) $\vec u$ and $\vec v$ is the number

$$
\vec u \cdot \vec v
= \tfrac12\left(\norm{\vec u + \vec v}^2 - \norm{\vec u}^2
- \norm{\vec v}^2\right),
$$

where $\norm{\vec u}$ denotes the length (*norm*) of $\vec u$.

**Theorem 16.2 (The four faces of the scalar product).**

Let $\vec u\,(x, y)$ and $\vec v\,(x', y')$ be nonzero [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector), and $\theta$ the angle between them. Then

1. *([coordinates](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#def-g10-coordgeom-system))* $\vec u \cdot \vec v = xx' + yy'$ ;
2. *([cosine](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin))* $\vec u \cdot \vec v =  \norm{\vec u}\,\norm{\vec v}\cos\theta$ ;
3. *(projection)* $\vec u \cdot \vec v = \vec u \cdot \vec v'$ , where $\vec v'$ is the [orthogonal](#def-g11-scal-orthogonal) projection of $\vec v$ on the direction of $\vec u$ ; if $\vec u = \vect{OA}$ and $\vec v = \vect{OB}$ , then $\vec u \cdot \vec v = \overline{OA} \times \overline{OH}$ , a product of signed lengths, where $H$ is the foot of the perpendicular from $B$ to the line $(OA)$ ;
4. *([norms](#def-g11-scal-dot))* the defining formula of [Definition 16.1](#def-g11-scal-dot) .

**Proof of 1 and 2.** *1.* In [coordinates](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#def-g10-coordgeom-system), $\norm{\vec u}^2 = x^2 + y^2$ (Pythagoras) and $\vec u + \vec v$ has [coordinates](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#def-g10-coordgeom-system) $(x + x', y + y')$, so

$$
\begin{align*}
2\,\vec u \cdot \vec v
&= (x + x')^2 + (y + y')^2 - (x^2 + y^2) - (x'^2 + y'^2)\\
&= 2xx' + 2yy',
\end{align*}
$$

after [expanding](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-expand) the squares and cancelling.

*2.* Choose the [coordinate system](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#def-g10-coordgeom-system) so that $\vec u$ points along the positive $x$-axis: $\vec u\,(\norm{\vec u}, 0)$ and $\vec v\,(\norm{\vec v}\cos\theta,\ \norm{\vec v}\sin\theta)$ ([Chapter 14](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#ch-g11-trigo)). Formula 1 then gives $\vec u \cdot \vec v = \norm{\vec u}\,\norm{\vec v}\cos\theta + 0$. Formula 3 reads off the same computation: the projection of $\vec v$ on the $x$-axis has signed length $\norm{\vec v}\cos\theta =
\overline{OH}$. ∎

![The projection view: u v = OA × OH, where H is the foot of the perpendicular from the tip of v. The orange segment OH has signed length v.](https://one-course.com/images/onecourse/chapters/math-2/g11-scal/fig-c5a833d29518.svg)

*The projection view: $\vec u \cdot \vec v = \overline{OA} \times
\overline{OH}$, where $H$ is the foot of the perpendicular from the tip of $\vec v$. The orange segment $OH$ has signed length $\norm{\vec v}\cos\theta$.*

**Example 16.3.**

$\vec u\,(3, 1)$ and $\vec v\,(2, -4)$: $\vec u \cdot \vec v = 6 - 4 = 2$. The [norms](#def-g11-scal-dot) are $\norm{\vec u} = \sqrt{10}$ and $\norm{\vec v} = \sqrt{20}$, so $\cos\theta = \frac{2}{\sqrt{10}\sqrt{20}} = \frac{2}{10\sqrt2}
= \frac{\sqrt2}{10}$: the angle is a bit less than $82^\circ$.

**Proposition 16.4 (Algebraic rules).**

For all [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) and all $\lambda \in \R$:

$$
\vec u \cdot \vec v = \vec v \cdot \vec u, \qquad
\vec u \cdot (\vec v + \vec w) = \vec u \cdot \vec v + \vec u \cdot
\vec w, \qquad
(\lambda \vec u)\cdot \vec v = \lambda\,(\vec u \cdot \vec v),
$$

$$
\vec u \cdot \vec u = \norm{\vec u}^2,
\qquad
\norm{\vec u + \vec v}^2 = \norm{\vec u}^2 + 2\,\vec u\cdot\vec v +
\norm{\vec v}^2 .
$$

**Proof.** All follow from the coordinate formula: for instance $\vec u \cdot (\vec v + \vec w) = x(x' + x'') + y(y' + y'') =
(xx' + yy') + (xx'' + yy'')$. The last identity expands $\norm{\vec u + \vec v}^2 = (\vec u + \vec v)\cdot(\vec u + \vec v)$ using the first three rules — the [scalar product](#def-g11-scal-dot) behaves exactly like an ordinary product, so the usual algebraic identities apply to [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector). ∎

## 16.2 Orthogonality

**Definition 16.5 (Orthogonal vectors).**

Two [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) are *orthogonal*, written $\vec u \perp \vec v$, if $\vec u \cdot \vec v = 0$.

**Remark 16.6.**

For nonzero [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector), formula 2 of [Theorem 16.2](#thm-g11-scal-faces) shows $\vec u \cdot \vec v = 0 \iff \cos\theta = 0 \iff$ the directions are perpendicular. The zero [vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) is [orthogonal](#def-g11-scal-orthogonal) to everything.

**Example 16.7.**

$\vec u\,(3, 2)$ and $\vec v\,(-4, 6)$: $\vec u \cdot \vec v = -12 + 12 =
0$: [orthogonal](#def-g11-scal-orthogonal). In general, $\vec u\,(a, b)$ is always [orthogonal](#def-g11-scal-orthogonal) to $\vec v\,(-b, a)$ — a quarter-turn rotation.

## 16.3 The law of cosines

**Theorem 16.8 (Law of cosines).**

In a triangle $ABC$ with sides $a = BC$, $b = CA$, $c = AB$ and angle $\widehat A$ at the vertex $A$:

$$
a^2 = b^2 + c^2 - 2bc\,\cos\widehat A .
$$

**Proof.** Write $\vect{BC} = \vect{BA} + \vect{AC} = \vect{AC} - \vect{AB}$ and expand with [Proposition 16.4](#prop-g11-scal-rules):

$$
a^2 = \norm{\vect{BC}}^2
= \norm{\vect{AC}}^2 - 2\,\vect{AC}\cdot\vect{AB} + \norm{\vect{AB}}^2
= b^2 + c^2 - 2\,\vect{AB}\cdot\vect{AC}.
$$

By the [cosine](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin) formula, $\vect{AB}\cdot\vect{AC} = c\,b\,\cos\widehat A$. ∎

**Remark 16.9.**

When $\widehat A$ is a right angle, $\cos\widehat A = 0$ and the law of [cosines](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin) reduces to the Pythagorean theorem $a^2 = b^2 + c^2$: it is Pythagoras with a correction term for non-right angles.

![The law of cosines: knowing two sides b, c and the angle between them determines the third side a.](https://one-course.com/images/onecourse/chapters/math-2/g11-scal/fig-c3343d6ea45e.svg)

*The law of [cosines](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin): knowing two sides $b$, $c$ and the angle between them determines the third side $a$.*

**Example 16.10.**

Two sides of a triangle measure $b = 5$ and $c = 8$, enclosing an angle $\widehat A = \frac\pi3$. Then

$$
a^2 = 25 + 64 - 2 \times 5 \times 8 \times \frac12 = 89 - 40 = 49,
$$

so $a = 7$.

## 16.4 Applications: circles and perpendicular lines

**Proposition 16.11 (Circle with a given diameter).**

A point $M$ lies on the circle of diameter $[AB]$ if and only if

$$
\vect{MA} \cdot \vect{MB} = 0 .
$$

**Proof.** If $M \neq A, B$, the condition says the angle at $M$ in the triangle $AMB$ is right, and the points seeing a segment under a right angle are exactly those of the circle with that diameter. Here is a direct proof: let $O$ be the [midpoint](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#prop-g10-coordgeom-midpoint) of $[AB]$ and $r = \frac{AB}{2}$. Then $\vect{MA} = \vect{MO} + \vect{OA}$ and $\vect{MB} = \vect{MO} + \vect{OB} = \vect{MO} - \vect{OA}$, so

$$
\vect{MA}\cdot\vect{MB}
= \norm{\vect{MO}}^2 - \norm{\vect{OA}}^2 = MO^2 - r^2,
$$

which vanishes exactly when $MO = r$, i.e. when $M$ is on the circle of center $O$ and radius $r$. ∎

**Proposition 16.12 (Normal vector of a line).**

The [vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) $\vec n\,(a, b)$ is [orthogonal](#def-g11-scal-orthogonal) to every [direction vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-direction) of the line $d : ax + by + c = 0$; one says $\vec n$ is a *normal vector* of $d$. Two lines are perpendicular exactly when their normal (or direction) [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) are [orthogonal](#def-g11-scal-orthogonal).

**Proof.** A [direction vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-direction) of $d$ is $\vec u\,(-b, a)$ ([Theorem 15.9](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#thm-g11-vect-cartesian)), and $\vec n \cdot \vec u = a(-b) + b(a) = 0$. ∎

**Method 16.13 (Using normal vectors).**

- Line through $A$ with normal $\vec n\,(a,b)$ : write $\vect{AM} \cdot \vec n = 0$ , which expands to $ax + by + c = 0$ with $c$ determined by $A$ .
- Perpendicularity of $d: ax+by+c = 0$ and $d': a'x+b'y+c' = 0$ : check $aa' + bb' = 0$ .

**Example 16.14.**

The line through $P(2, -1)$ perpendicular to $d : 3x - y + 4 = 0$: a [direction vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-direction) of $d$ is $(1, 3)$, which serves as *normal* [vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) of the perpendicular. [Equation](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-equation): $x + 3y + c = 0$ with $2 - 3 + c = 0$, so $c = 1$: the line is $x + 3y + 1 = 0$.

**Example 16.15 (Equation of a circle).**

The circle of center $\Omega(1, 2)$ and radius $3$ is the set of points $M(x,y)$ with $\Omega M^2 = 9$:

$$
(x - 1)^2 + (y - 2)^2 = 9 .
$$

Conversely, $x^2 + y^2 - 2x - 4y - 4 = 0$ rewrites, completing the squares ([Chapter 10](https://one-course.com/books/math/2/en/chapter/10-quadratic-functions-and-equations#ch-g11-quad)), as $(x-1)^2 + (y-2)^2 = 9$: the same circle.

## 16.5 Exercises

**Exercise 16.1 ★.**

Compute $\vec u \cdot \vec v$ for

$$
\vec u\,(2, 5),\ \vec v\,(3, -1); \qquad
\vec u\,(1, -4),\ \vec v\,(8, 2); \qquad
\norm{\vec u} = 3,\ \norm{\vec v} = 4,\ \theta = \frac{\pi}{3} .
$$

**Solution of Exercise 16.1.**

$(2,5)\cdot(3,-1) = 6 - 5 = 1$.

$(1,-4)\cdot(8,2) = 8 - 8 = 0$ ([orthogonal vectors](#def-g11-scal-orthogonal)).

$\vec u\cdot\vec v = 3 \times 4 \times \cos\frac\pi3 = 12 \times \frac12
= 6$.

**Exercise 16.2 ★.**

$ABC$ is an equilateral triangle of side $6$. Compute $\vect{AB} \cdot \vect{AC}$ and $\vect{AB} \cdot \vect{BC}$.

**Solution of Exercise 16.2.**

$\vect{AB}\cdot\vect{AC} = 6 \times 6 \times \cos 60^\circ = 18$.

The [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) $\vect{AB}$ and $\vect{BC}$ make an angle of $180^\circ - 60^\circ = 120^\circ$ (place them tail to tail at $B$), so $\vect{AB}\cdot\vect{BC} = 36 \cos 120^\circ = -18$.

**Exercise 16.3 ★.**

For which value of $t$ are $\vec u\,(3, t)$ and $\vec v\,(t - 8, 1)$ [orthogonal](#def-g11-scal-orthogonal)? And for which value(s) of $t$ is $\vec u\,(t, 2)$ [orthogonal](#def-g11-scal-orthogonal) to itself minus $\vec v\,(4, 2)$, i.e. $\vec u \perp (\vec u - \vec v)$?

**Solution of Exercise 16.3.**

$\vec u \cdot \vec v = 3(t - 8) + t = 4t - 24 = 0$ gives $t = 6$.

$\vec u - \vec v = (t - 4,\ 0)$, so $\vec u \cdot (\vec u - \vec v) = t(t-4) + 0 = t^2 - 4t$, which vanishes for $t = 0$ or $t = 4$.

**Exercise 16.4 ★.**

Compute the angle $\theta$ between $\vec u\,(1, 2)$ and $\vec v\,(3, 1)$ (give $\cos\theta$ exactly, then $\theta$ to the nearest degree).

**Solution of Exercise 16.4.**

$\vec u \cdot \vec v = 3 + 2 = 5$, $\norm{\vec u} = \sqrt5$, $\norm{\vec v} = \sqrt{10}$, so

$$
\cos\theta = \frac{5}{\sqrt5\,\sqrt{10}} = \frac{5}{5\sqrt2}
= \frac{\sqrt2}{2},
$$

hence $\theta = 45^\circ$ exactly.

**Exercise 16.5 ★★.**

A triangle has sides $b = 4$, $c = 6$ and angle $\widehat A = \frac{2\pi}{3}$ between them. Compute the third side $a$. Then, in a triangle with sides $a = 7$, $b = 5$, $c = 4$, compute $\cos\widehat A$ and decide whether $\widehat A$ is acute or obtuse.

**Solution of Exercise 16.5.**

$a^2 = 16 + 36 - 2 \times 4 \times 6 \times \cos\frac{2\pi}{3}
= 52 - 48 \times \left(-\frac12\right) = 76$, so $a = \sqrt{76} =
2\sqrt{19} \approx 8.7$.

For the second triangle, the law of [cosines](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin) solved for the angle gives

$$
\cos\widehat A = \frac{b^2 + c^2 - a^2}{2bc}
= \frac{25 + 16 - 49}{2 \times 5 \times 4} = -\frac{8}{40} = -\frac15,
$$

negative: $\widehat A$ is obtuse.

**Exercise 16.6 ★★.**

Let $A(1, 1)$, $B(5, -1)$ and $C(3, 5)$. Compute $\vect{AB} \cdot \vect{AC}$; is the angle $\widehat A$ right? Compute the three side lengths and check your answer with the law of [cosines](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin).

**Solution of Exercise 16.6.**

$\vect{AB}\,(4, -2)$ and $\vect{AC}\,(2, 4)$: $\vect{AB}\cdot\vect{AC} = 8 - 8 = 0$, so the angle at $A$ is right. Sides: $AB = \sqrt{16 + 4} = \sqrt{20}$, $AC = \sqrt{4 + 16} =
\sqrt{20}$, and $\vect{BC}\,(-2, 6)$ gives $BC = \sqrt{40}$. Consistency: $BC^2 = 40 = 20 + 20 = AB^2 + AC^2$, the law of [cosines](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin) with $\cos\widehat A = 0$ (Pythagoras).

**Exercise 16.7 ★★.**

Give an [equation](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-equation) of the circle of center $\Omega(-2, 3)$ and radius $5$. Then determine the center and radius of the circle

$$
x^2 + y^2 - 6x + 2y - 6 = 0 .
$$

**Solution of Exercise 16.7.**

Center–radius form: $(x + 2)^2 + (y - 3)^2 = 25$.

For the second circle, complete the squares:

$$
x^2 - 6x + y^2 + 2y = 6
\iff (x - 3)^2 - 9 + (y + 1)^2 - 1 = 6
\iff (x-3)^2 + (y+1)^2 = 16 :
$$

center $(3, -1)$, radius $4$.

**Exercise 16.8 ★★.**

Let $A(-3, 0)$ and $B(0, 2)$. Using [Proposition 16.11](#prop-g11-scal-diameter), find an [equation](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-equation) of the circle of diameter $[AB]$, and check that the origin $O(0,0)$ lies on it.

**Solution of Exercise 16.8.**

$M(x,y)$ is on the circle when $\vect{MA}\cdot\vect{MB} = 0$ with $\vect{MA}\,(-3 - x,\ -y)$ and $\vect{MB}\,(-x,\ 2 - y)$:

$$
(-3 - x)(-x) + (-y)(2 - y) = x^2 + 3x + y^2 - 2y = 0 .
$$

For the origin: $0 + 0 + 0 - 0 = 0$, so $O$ lies on the circle — geometrically, $\vect{OA}\,(-3,0)$ and $\vect{OB}\,(0,2)$ are [orthogonal](#def-g11-scal-orthogonal), so $O$ sees $[AB]$ under a right angle. (Completing the squares: center $\left(-\frac32, 1\right)$, radius $\frac{\sqrt{13}}{2}$.)

**Exercise 16.9 ★★.**

Find an [equation](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-equation) of the line through $P(1, 3)$ perpendicular to $d : 2x + y - 7 = 0$, and the [coordinates](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#def-g10-coordgeom-system) of the foot $H$ of the perpendicular (the [intersection](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interunion) of the two lines). Deduce the distance from $P$ to $d$.

**Solution of Exercise 16.9.**

The perpendicular through $P$ has the [direction vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-direction) of $d$, namely $(-1, 2)$, as normal [vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector): [equation](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-equation) $-x + 2y + c = 0$; through $P(1,3)$: $-1 + 6 + c = 0$, $c = -5$, so $x - 2y + 5 = 0$.

[Intersection](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interunion) with $d$: from $2x + y = 7$, $y = 7 - 2x$; substituting, $x - 2(7 - 2x) + 5 = 5x - 9 = 0$, so $x = \frac95$, $y = \frac{17}5$: $H\left(\frac95, \frac{17}5\right)$. Then $\vect{PH}\left(\frac45, \frac25\right)$ and

$$
PH = \sqrt{\frac{16}{25} + \frac{4}{25}} = \frac{\sqrt{20}}{5}
= \frac{2\sqrt5}{5} \approx 0.89 .
$$

**Exercise 16.10 ★★.**

Using $\norm{\vec u + \vec v}^2 = \norm{\vec u}^2 + 2\vec u\cdot\vec v +
\norm{\vec v}^2$ and its analogue for $\vec u - \vec v$, prove the *parallelogram identity*:

$$
\norm{\vec u + \vec v}^2 + \norm{\vec u - \vec v}^2
= 2\norm{\vec u}^2 + 2\norm{\vec v}^2 ,
$$

and interpret it in a parallelogram (diagonals versus sides).

**Solution of Exercise 16.10.**

Adding

$$
\norm{\vec u + \vec v}^2 = \norm{\vec u}^2 + 2\vec u\cdot\vec v +
\norm{\vec v}^2
\quad\text{and}\quad
\norm{\vec u - \vec v}^2 = \norm{\vec u}^2 - 2\vec u\cdot\vec v +
\norm{\vec v}^2,
$$

the cross terms cancel and $\norm{\vec u + \vec v}^2 + \norm{\vec u - \vec v}^2 = 2\norm{\vec u}^2 +
2\norm{\vec v}^2$. In a parallelogram with sides $\vec u$ and $\vec v$, the diagonals are $\vec u + \vec v$ and $\vec u - \vec v$: the sum of the squares of the two diagonals equals the sum of the squares of the four sides.

**Exercise 16.11 ★★★.**

Let $A$ and $B$ be two points with $AB = 4$, and $I$ the [midpoint](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#prop-g10-coordgeom-midpoint) of $[AB]$.

1. Show that for every point $M$ : $\vect{MA}\cdot\vect{MB} = MI^2 - 4$ . (Insert $I$ : $\vect{MA} = \vect{MI} + \vect{IA}$ .)
2. Deduce the set of points $M$ such that $\vect{MA}\cdot\vect{MB} = 12$ .

**Solution of Exercise 16.11.**

*1.* Since $I$ is the [midpoint](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#prop-g10-coordgeom-midpoint), $\vect{IB} = -\vect{IA}$ and $IA = 2$. Then

$$
\vect{MA}\cdot\vect{MB}
= (\vect{MI} + \vect{IA})\cdot(\vect{MI} - \vect{IA})
= \norm{\vect{MI}}^2 - \norm{\vect{IA}}^2
= MI^2 - 4 .
$$

*2.* The condition $\vect{MA}\cdot\vect{MB} = 12$ becomes $MI^2 = 16$, i.e. $MI = 4$: the set is the circle of center $I$ and radius $4$.

## 16.6 Problem: Two gifts of the scalar product

**Problem 16.1.**

Weekend problem — the addition formulas fall out of one dot product, the distance to a line out of another, and the three altitudes meet as a bonus

The [scalar product](#def-g11-scal-dot) looks like bookkeeping — multiply, add — yet it hands over, almost free of charge, two treasures that resisted centuries of angle-chasing: the *addition formulas* of trigonometry (compute $\cos 15^\circ$ exactly!) and the *distance from a point to a line* in one clean fraction. As a parting gift it proves that the three altitudes of every triangle pass through one point. All four faces of [Theorem 16.2](#thm-g11-scal-faces) will report for duty.

**Part I — Fluency.**

1. For $\vec u(3, 4)$ and $\vec v(-1, 2)$ : compute $\vec u \cdot \vec v$ , the two [norms](#def-g11-scal-dot) , and the angle between the [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) (to the tenth of a degree).
2. Find $k$ so that $(2, k)$ and $(3, -4)$ are [orthogonal](#def-g11-scal-orthogonal) ( [Definition 16.5](#def-g11-scal-orthogonal) ).
3. Physics face: a sled is pulled $10$ m by a $50$ N force at $60^\circ$ to the ground. Compute the work $W = \vec F \cdot \vec d$ .
4. Law of [cosines](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin) ( [Theorem 16.8](#thm-g11-scal-cosines) ): two sides of $5$ and $7$ enclose an angle of $60^\circ$ ; find the third side exactly.
5. Reverse: a triangle has sides $4$ , $6$ , $8$ . Compute the [cosine](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin) of the angle opposite the side $8$ , classify the angle, and give it to the tenth of a degree.

**Part II — First gift: the addition formulas.** Let $\vec u = (\cos a, \sin a)$ and $\vec v = (\cos b, \sin b)$: two unit [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) at angles $a$ and $b$.

6. Compute $\vec u \cdot \vec v$ twice — once with [coordinates](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#def-g10-coordgeom-system), once with [norms](#def-g11-scal-dot) and the angle between the [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) — and conclude the mother formula: $$\cos(a - b) = \cos a \cos b + \sin a \sin b .$$
7. Substitute $-b$ for $b$ (parities of [sine](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin) and [cosine](https://one-course.com/books/math/2/en/chapter/14-trigonometry-the-unit-circle#def-g11-trigo-cossin) !) to obtain $\cos(a + b)$ .
8. Obtain $\sin(a + b)$ from the complementary identity $\sin x = \cos\left(\frac\pi2 - x\right)$ applied to $x = a + b$ .
9. Exact values at last: compute $\cos 15^\circ$ (as $\cos(45^\circ - 30^\circ)$ ) and $\sin 75^\circ$ . Check both numerically.
10. Set $b = a$ to derive the double-angle formulas: $\cos 2a$ (in its three forms) and $\sin 2a$ .
11. From $\cos 2a = 1 - 2\sin^2 a$ , compute $\sin^2 15^\circ$ , then $\sin 15^\circ$ as a nested radical — and verify that its square agrees with the value $\frac{\sqrt6 - \sqrt2}{4}$ that question 9’s method gives.

**Part III — Second gift: the distance to a line.**

12. Let $d$ be the line $ax + by + c = 0$, with normal [vector](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) $\vec n(a, b)$ ([Proposition 16.12](#prop-g11-scal-normal)), and $P(x_0, y_0)$ a point. Taking any point $A$ on $d$, explain why the distance from $P$ to $d$ is $\dfrac{\abs{\vect{AP} \cdot \vec n}}{\norm{\vec n}}$, and deduce the formula $$\operatorname{dist}(P, d)  = \frac{\abs{a x_0 + b y_0 + c}}{\sqrt{a^2 + b^2}} .$$ Compute the distance from $P(5, 6)$ to $3x + 4y - 12 = 0$.
13. Write the [equation](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-equation) of the circle centered at $(5, 6)$ [tangent](https://one-course.com/books/math/2/en/chapter/12-differentiation-a-first-course#def-g11-deriv-tangent) to that line.
14. Cross-check the formula: compute the distance from the origin to $3x + 4y - 12 = 0$ , then verify it by computing the foot of the perpendicular from the origin explicitly.
15. Triangle $A(0,0)$ , $B(6,0)$ , $C(2,5)$ : compute its area using the base $[AB]$ ; then compute the distance from $B$ to the line $(AC)$ and check it reproduces the same area.
16. The circle of center $(2, 1)$ and radius $2$ , against the line $x + y - 6 = 0$ : compute the center’s distance to the line and classify their position ( [secant](https://one-course.com/books/math/2/en/chapter/12-differentiation-a-first-course#def-g11-deriv-rate) , [tangent](https://one-course.com/books/math/2/en/chapter/12-differentiation-a-first-course#def-g11-deriv-tangent) , disjoint).

**Part IV — The bonus: altitudes concur.**

17. Generalize [Exercise 16.11](#exo-g11-scal-11): for any two points $A$, $B$ with [midpoint](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#prop-g10-coordgeom-midpoint) $I$, prove $$\vect{MA} \cdot \vect{MB} = MI^2 - \frac{AB^2}{4}  \quad\text{for every point } M .$$
18. Deduce [Proposition 16.11](#prop-g11-scal-diameter) in one line: the set of points $M$ with $\vect{MA} \cdot \vect{MB} = 0$ is the circle of diameter $[AB]$ .
19. The altitudes: let $H$ be the [intersection](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interunion) of the altitudes from $A$ and from $B$ in a triangle $ABC$ (so $\vect{HA} \cdot \vect{BC} = 0$ and $\vect{HB} \cdot \vect{CA} = 0$). Prove the identity $$\vect{HA} \cdot \vect{BC} + \vect{HB} \cdot \vect{CA}  + \vect{HC} \cdot \vect{AB} = 0$$ — expand everything from $H$ with Chasles — and conclude that $H$ also lies on the altitude from $C$: the three altitudes are concurrent (at the *orthocenter*).
20. Finale: four faces, three trophies. Which face of [Theorem 16.2](#thm-g11-scal-faces) carried the addition formulas, which the distance formula, which the [orthocenter](#pb-g11-scal-1) — and why is “compute the same quantity twice” the motto of the whole chapter?

**Solution of Problem 16.1.**

**1.** $\vec u \cdot \vec v = -3 + 8 = 5$; $\norm{\vec u} = 5$, $\norm{\vec v} = \sqrt5$; $\cos\theta = \frac{5}{5\sqrt5} = \frac{1}{\sqrt5}$: $\theta \approx 63.4^\circ$.

**2.** $6 - 4k = 0$: $k = \frac32$.

**3.** $W = 50 \times 10 \times \cos 60^\circ = 250$ joules: only the component along the motion works.

**4.** $c^2 = 25 + 49 - 2 \times 35 \times \frac12 = 39$: $c = \sqrt{39}$.

**5.** $\cos\gamma = \frac{16 + 36 - 64}{2 \times 4
\times 6} = -\frac14$: negative, the angle is obtuse: $\gamma \approx 104.5^\circ$.

**6.** [Coordinates](https://one-course.com/books/math/2/en/chapter/5-coordinate-geometry#def-g10-coordgeom-system): $\vec u \cdot \vec v = \cos a \cos b +
\sin a \sin b$. Geometry: two unit [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector), $\vec u \cdot \vec v = 1 \times 1 \times \cos(a - b)$. Equating the two computations of the same number: $\cos(a - b) = \cos a \cos b + \sin a \sin b$.

**7.** $\cos(a + b) = \cos(a - (-b)) = \cos a \cos(-b) +
\sin a \sin(-b) = \cos a \cos b - \sin a \sin b$.

**8.** $\sin(a + b) = \cos\left(\frac\pi2 - a - b\right)
= \cos\left(\left(\frac\pi2 - a\right) - b\right)
= \cos\left(\frac\pi2 - a\right)\cos b +
\sin\left(\frac\pi2 - a\right)\sin b
= \sin a \cos b + \cos a \sin b$.

**9.** $\cos 15^\circ = \cos 45^\circ \cos 30^\circ +
\sin 45^\circ \sin 30^\circ = \frac{\sqrt2}{2} \cdot
\frac{\sqrt3}{2} + \frac{\sqrt2}{2} \cdot \frac12 =
\frac{\sqrt6 + \sqrt2}{4} \approx 0.966$. And $\sin 75^\circ = \cos 15^\circ$: same value.

**10.** $b = a$ in questions 7 and 8: $\cos 2a = \cos^2 a - \sin^2 a = 2\cos^2 a - 1 = 1 - 2\sin^2 a$ (using $\cos^2 + \sin^2 = 1$), and $\sin 2a = 2 \sin a \cos a$.

**11.** $\sin^2 15^\circ = \frac{1 - \cos 30^\circ}{2}
= \frac{2 - \sqrt3}{4}$, so $\sin 15^\circ = \frac{\sqrt{2 - \sqrt3}}{2}$. Squaring $\frac{\sqrt6 - \sqrt2}{4}$: $\frac{6 - 2\sqrt{12} + 2}{16} = \frac{8 - 4\sqrt3}{16} =
\frac{2 - \sqrt3}{4}$: the same number in two costumes.

**12.** $\vect{AP}$ decomposes into a part along $d$ (invisible to $\vec n$) and a part perpendicular to $d$, whose length is the distance sought; dotting with the unit normal $\frac{\vec n}{\norm{\vec n}}$ kills the first part and measures the second. With $A$ on $d$: $\vect{AP} \cdot \vec n = a x_0 + b y_0 - (a x_A + b y_A) =
a x_0 + b y_0 + c$, whence the formula. Example: $\frac{\abs{15 + 24 - 12}}{5} = \frac{27}{5} = 5.4$.

**13.** Radius $= 5.4$: $(x - 5)^2 + (y - 6)^2 = 29.16$.

**14.** Distance $= \frac{\abs{-12}}{5} = 2.4$. Foot: the perpendicular through the origin is $(3t, 4t)$; on the line: $9t + 16t = 12$, $t = \frac{12}{25}$: foot $\left(\frac{36}{25}, \frac{48}{25}\right)$, at distance $5t = \frac{60}{25} = 2.4$. The formula and the honest computation agree.

**15.** Base $AB = 6$, height $=$ distance from $C$ to $(AB)$ (the axis $y = 0$): $5$; area $15$. Line $(AC)$: $5x - 2y = 0$, and $\operatorname{dist}(B, (AC)) = \frac{\abs{30}}{\sqrt{29}}$; then $\frac12 \times AC \times \frac{30}{\sqrt{29}} =
\frac12 \times \sqrt{29} \times \frac{30}{\sqrt{29}} = 15$: same area, either altitude.

**16.** $\operatorname{dist} = \frac{\abs{2 + 1 - 6}}
{\sqrt2} = \frac{3}{\sqrt2} \approx 2.12 > 2$: the line passes clear of the circle — disjoint.

**17.** Insert $I$: $\vect{MA} \cdot \vect{MB} = (\vect{MI} + \vect{IA}) \cdot
(\vect{MI} + \vect{IB}) = MI^2 + \vect{MI} \cdot (\vect{IA} +
\vect{IB}) + \vect{IA} \cdot \vect{IB}$. The middle term dies ($\vect{IA} + \vect{IB} = \vec 0$), and $\vect{IA} \cdot \vect{IB} = -IA^2 = -\frac{AB^2}{4}$ (opposite [vectors](https://one-course.com/books/math/2/en/chapter/15-vectors-and-lines-in-the-plane#def-g11-vect-vector) of length $\frac{AB}2$).

**18.** $\vect{MA} \cdot \vect{MB} = 0 \iff MI^2 =
\frac{AB^2}{4} \iff MI = \frac{AB}{2}$: the circle of center $I$ and radius $\frac{AB}2$ — the circle with diameter $[AB]$.

**19.** [Expanding](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-expand) each pair from $H$ ($\vect{BC} =
\vect{HC} - \vect{HB}$, etc.):

$$
\vect{HA} \cdot \vect{HC} - \vect{HA} \cdot \vect{HB}
+ \vect{HB} \cdot \vect{HA} - \vect{HB} \cdot \vect{HC}
+ \vect{HC} \cdot \vect{HB} - \vect{HC} \cdot \vect{HA} = 0 :
$$

everything cancels in pairs — the identity holds for *any* four points. For our $H$, the first two dot products vanish by hypothesis, so $\vect{HC} \cdot \vect{AB} = 0$: $H$ lies on the altitude from $C$. Three altitudes, one point.

**20.** The addition formulas came from computing one dot product with the *coordinate* face and the *norms-and-angle* face; the distance formula from the *projection* face; the [orthocenter](#pb-g11-scal-1) from the *bilinearity* (Chasles-and-expand) face. Compute the same quantity twice, equate, and a theorem falls out — the [scalar product](#def-g11-scal-dot)’s whole trade.
