Multiplying Vectors

Problem 1. Illustrate the two vectors \mathbf u = \begin{bmatrix} a \\ b \end{bmatrix} , \mathbf v = \begin{bmatrix} c \\ d \end{bmatrix} in the diagram below.

Show that the angle \theta between \mathbf u, \mathbf v is given by

ac + bd = \| \mathbf u \| \| \mathbf v \| \cos(\theta).

(Click for Solution)

Solution. Observe that

\mathbf u - \mathbf v = \begin{bmatrix} a \\ b \end{bmatrix}  - \begin{bmatrix} c \\ d \end{bmatrix} = \begin{bmatrix} a-c \\ b-d \end{bmatrix}.

Using the law of cosines,

\begin{aligned} \| \mathbf u - \mathbf v \|^2 &= \| \mathbf u \|^2 + \| \mathbf v \|^2 - 2 \cdot \| \mathbf u \| \cdot \| \mathbf v \| \cdot \cos(\theta).\end{aligned}

Expanding the display on the left-hand side by Pythagoras’ theorem,

\begin{aligned} \| \mathbf u - \mathbf v \|^2 &= (a-c)^2 + (b-d)^2 \\ &= (a^2 - 2ac + c^2) + (b^2 - 2bd + d^2) \\ &= (a^2 + b^2) + (c^2 + d^2) - 2(ac + bd) \\ &= \|\mathbf u\|^2 + \|\mathbf v\|^2 - 2(ac + bd) .\end{aligned}

Comparing both sides of the expression \frac 12 (\|\mathbf u\|^2 + \|\mathbf v\|^2 - \| \mathbf u - \mathbf v \|^2),

ac + bd = \| \mathbf u \| \cdot \| \mathbf v \| \cdot \cos(\theta),

as required.

Remark 1. The left-hand side is called the dot product of two vectors, defined by

\displaystyle \begin{bmatrix} a \\ b \end{bmatrix} \cdot \begin{bmatrix} c \\ d \end{bmatrix} := ac+ bd.

Then the result of Question 1 reduces to the dot product equation

\mathbf u \cdot \mathbf v = \| \mathbf u \| \| \mathbf v \| \cos(\theta).

Let \alpha denote a real constant and \mathbf w denote another two-dimensional vector.

Problem 2. Using Remark 1, show that the following equations always hold:

  • \mathbf v \cdot \mathbf v \geq 0.
  • \mathbf v \cdot \mathbf v = 0 \Rightarrow \mathbf v = \mathbf 0.
  • \mathbf u \cdot \mathbf v = \mathbf v \cdot \mathbf u.
  • \mathbf u \cdot (\alpha \mathbf v) = (\alpha \mathbf u) \cdot \mathbf v = \alpha (\mathbf u \cdot \mathbf v).
  • \mathbf u \cdot (\mathbf v + \mathbf w) = \mathbf u \cdot \mathbf v + \mathbf u \cdot \mathbf w.
(Click for Solution)

Solution. Write \mathbf u = \begin{bmatrix} a \\ b \end{bmatrix} and \mathbf v = \begin{bmatrix} c \\ d \end{bmatrix}. The first result is almost immediate since c,d are real numbers:

\begin{aligned} \mathbf v\cdot\mathbf v &= c^2+d^2 \\ &\ge 0 + 0 \\ &= 0. \end{aligned}

For the second result

\mathbf v\cdot\mathbf v=0 \quad \Rightarrow \quad c^2+d^2=0.

Furthermore,

\begin{aligned} 0 \leq c^2 &= c^2 + 0 \\ &\leq c^2 + d^2 = 0. \end{aligned}

Hence, c = 0. Similarly, d = 0. Hence \mathbf v= \begin{bmatrix} 0 \\ 0 \end{bmatrix}= \mathbf 0.

The third property is straightforward:

\begin{aligned} \mathbf u\cdot\mathbf v &= ac+bd \\ &=ca+db=\mathbf v\cdot\mathbf u. \end{aligned}

Recall that \alpha \mathbf v = \alpha \begin{bmatrix} c \\d \end{bmatrix} = \begin{bmatrix} \alpha c \\ \alpha d\end{bmatrix}. Then

\begin{aligned} \mathbf u\cdot(\alpha\mathbf v) &= a(\alpha c)+b(\alpha d)  \\ &= \alpha(ac+bd) \\ &= \alpha(\mathbf u\cdot\mathbf v), \end{aligned}

Define \mathbf w=\begin{bmatrix} p \\ q \end{bmatrix}. Then the fifth property is immediate:

\begin{aligned} \mathbf u\cdot(\mathbf v+\mathbf w) &= a(c+p)+b(d+q) \\ &= (ac+bd)+(ap+bq) \\ &= \mathbf u\cdot\mathbf v+\mathbf u\cdot\mathbf w. \end{aligned}

Problem 3. Explain why \| \mathbf v \| = \sqrt{ \mathbf v \cdot \mathbf v }. Deduce the following:

  • \|\mathbf v \| \geq 0.
  • \|\mathbf v \| = 0 \Rightarrow \mathbf v = \mathbf 0.
  • \| \alpha \mathbf v \| = |\alpha| \|\mathbf v \|.
  • | \mathbf u \cdot \mathbf v | \leq \| \mathbf u \| \| \mathbf v\|.
  • \| \mathbf u + \mathbf v \| \leq \| \mathbf u \| + \| \mathbf v \|.
(Click for Solution)

Solution. Using Remark 1 and Pythagoras’ theorem,

\| \mathbf v \| = \sqrt{c^2 + d^2} = \sqrt{ \mathbf v \cdot \mathbf v }.

Therefore, we obtain the properties rather straightforwardly:

\|\mathbf v \| = \sqrt{\mathbf v \cdot \mathbf v} \geq \sqrt{0} = 0

with equality if and only if \mathbf v \cdot \mathbf v = 0 \iff \mathbf v = \mathbf 0. Next,

\begin{aligned} \| \alpha \mathbf v \| &= \sqrt{(\alpha \mathbf v) \cdot(\alpha \mathbf v)} \\ &= |\alpha | \sqrt{\mathbf v \cdot \mathbf v} \\ &= |\alpha| \|\mathbf v \|. \end{aligned}

The fourth property, known as the Cauchy-Schwarz inequality, follows from Problem 1 and the observation that |{\cos(\theta)}| \leq 1:

\begin{aligned} |\mathbf u \cdot \mathbf v| &= \| \mathbf u \| \|\mathbf v\| |{\cos(\theta)}| \\ &\leq \| \mathbf u \| \|\mathbf v\| \cdot 1 \\ &=\| \mathbf u \| \|\mathbf v\|. \end{aligned}

The fifth property follows from the fourth:

\begin{aligned} \| \mathbf u + \mathbf v \|^2 &= (\mathbf u + \mathbf v) \cdot (\mathbf u + \mathbf v) \\ &= (\mathbf u \cdot \mathbf u) + (\mathbf u \cdot \mathbf v) + (\mathbf v \cdot \mathbf u) + (\mathbf v \cdot \mathbf v) \\ &= \| \mathbf u \|^2 + 2(\mathbf u \cdot \mathbf v) + \| \mathbf v \|^2 \\ &\leq \| \mathbf u \|^2 + 2 \| \mathbf u \| \| \mathbf v \| + \| \mathbf v \|^2 \\ &= (\| \mathbf u \| + \| \mathbf v \|)^2 \end{aligned}

and taking square roots on both sides.

Problem 4. Define d(\mathbf u, \mathbf v) := \| \mathbf u - \mathbf v\|. Show that the following hold:

  • d(\mathbf u, \mathbf v) \geq 0.
  • d(\mathbf u, \mathbf v) = 0 \Rightarrow \mathbf u = \mathbf v.
  • d(\mathbf u, \mathbf v) = d(\mathbf v, \mathbf u).
  • d(\mathbf u, \mathbf v) \leq d(\mathbf u, \mathbf w) + d(\mathbf w, \mathbf v).
(Click for Solution)

Solution. The results in Problem 4 comes from Problem 3:

d(\mathbf u, \mathbf v) = \| \mathbf u - \mathbf v \| \geq 0,

then

\begin{aligned} d(\mathbf u, \mathbf v) = 0 \quad &\Rightarrow  \quad \| \mathbf u - \mathbf v \| = 0 \\ &\Rightarrow \quad \mathbf u - \mathbf v = \mathbf 0 \\&\Rightarrow \quad \mathbf u = \mathbf v.  \end{aligned}

Furthermore,

\begin{aligned} d(\mathbf u, \mathbf v) &= \| \mathbf u - \mathbf v \| \\ &=  \| (-1)(\mathbf v - \mathbf u) \| \\ &=  |{-1}| \| \mathbf v - \mathbf u \| \\ &= \| \mathbf v - \mathbf u \| \\ &= d(\mathbf v , \mathbf u) \end{aligned}

and

\begin{aligned} d(\mathbf u, \mathbf v) &= \| \mathbf u - \mathbf v \| \\ &=  \| (\mathbf u - \mathbf w) + (\mathbf w - \mathbf v) \| \\ &\leq \| \mathbf u - \mathbf w \| + \| \mathbf w - \mathbf v \| \\ &= d(\mathbf u, \mathbf w) + d(\mathbf w, \mathbf v). \end{aligned}

Remark 2. In the language of linear algebra, Remark 1 and Problem 2 defines a “multiplication” on the set of two-dimensional vectors, turning it into a real inner product space. Problem 3 show that inner product spaces are normed spaces (in that two-dimensional vectors have lengths or norms), while Problem 4 shows that normed spaces are metric spaces (i.e. the notion of distance is a reasonable one).

Problem 5. Given that the point (x_0, y_0) lies on the line ax+by = c, show that any other point (x,y) lies on the line if and only if

\begin{bmatrix} x - x_0 \\ y - y_0 \end{bmatrix} \cdot \begin{bmatrix} a \\ b \end{bmatrix} = 0.

(Click for Solution)

Solution. Since (x_0, y_0) lies on the line, we have

ax_0 + by_0 = c.

The point (x,y) lies on the line if and only if

ax + by = c.

Subtracting the equations yields the equation

a(x-x_0) + b(y-y_0) = 0.

On the other hand,

\begin{aligned} \begin{bmatrix} x - x_0 \\ y - y_0 \end{bmatrix} \cdot \begin{bmatrix} a \\ b \end{bmatrix} &= (x-x_0)a + (y-y_0)b \\ &= a(x-x_0) + b(y-y_0). \end{aligned}

Then (x,y) lies on the line if and only if the right-hand side equals 0, that is,

\begin{bmatrix} x - x_0 \\ y - y_0 \end{bmatrix} \cdot \begin{bmatrix} a \\ b \end{bmatrix} = 0.

Remark 3. Problem 5 generalises to an (n-1)-dimensional hyperplane: Given that the point (v_1, \dots, v_n) lies on the (n-1)-dimensional hyperplane with equation

a_1 x_1 + a_2 x_2 + \cdots + a_n x_n = c,

any other point (u_1,\dots, u_n) lies on the line if and only if

\begin{bmatrix} u_1 - v_1 \\ \vdots \\ u_n - v_n \end{bmatrix} \cdot \begin{bmatrix} a_1 \\ \vdots \\ a_n \end{bmatrix} = 0.

—Joel Kindiak, 30 Jan 26, 1810H

,

Published by


Leave a comment