# Linear Algebra/Length and Angle Measures/Solutions
## Solutions

    This exercise is recommended for all readers.

### Problem 1

Find the length of each vector.
* ${\begin{pmatrix}3\\1\end{pmatrix}}$
* ${\begin{pmatrix}-1\\2\end{pmatrix}}$
* ${\begin{pmatrix}4\\1\\1\end{pmatrix}}$
* ${\begin{pmatrix}0\\0\\0\end{pmatrix}}$
* ${\begin{pmatrix}1\\-1\\1\\0\end{pmatrix}}$

### Answer

* ${\sqrt {3^{2}+1^{2}}}={\sqrt {10}}$
* ${\sqrt {5}}$
* ${\sqrt {18}}$
* $0$
* ${\sqrt {3}}$
    This exercise is recommended for all readers.

### Problem 2

Find the angle between each two, if it is defined.
* ${\begin{pmatrix}1\\2\end{pmatrix}},{\begin{pmatrix}1\\4\end{pmatrix}}$
* ${\begin{pmatrix}1\\2\\0\end{pmatrix}},{\begin{pmatrix}0\\4\\1\end{pmatrix}}$
* ${\begin{pmatrix}1\\2\end{pmatrix}},{\begin{pmatrix}1\\4\\-1\end{pmatrix}}$

### Answer

* $\arccos(9/{\sqrt {85}})\approx 0.22{\text{ radians}}$
* $\arccos(8/{\sqrt {85}})\approx 0.52{\text{ radians}}$
* Not defined.
    This exercise is recommended for all readers.

### Problem 3

During maneuvers preceding the Battle of Jutland, the British battle cruiser Lion moved as follows (in nautical miles): $1.2$ miles north, $6.1$ miles $38$ degrees east of south, $4.0$ miles at $89$ degrees east of north, and $6.5$ miles at $31$ degrees east of north. Find the distance between starting and ending positions (O'Hanian 1985).

### Answer

We express each displacement as a vector (rounded to one decimal place because that's the accuracy of the problem's statement) and add to find the total displacement (ignoring the curvature of the earth).
    ${\begin{pmatrix}0.0\\1.2\end{pmatrix}}+{\begin{pmatrix}3.8\\-4.8\end{pmatrix}}+{\begin{pmatrix}4.0\\0.1\end{pmatrix}}+{\begin{pmatrix}3.3\\5.6\end{pmatrix}}={\begin{pmatrix}11.1\\2.1\end{pmatrix}}$
The distance is ${\sqrt {11.1^{2}+2.1^{2}}}\approx 11.3$.

### Problem 4

Find $k$ so that these two vectors are perpendicular.
    ${\begin{pmatrix}k\\1\end{pmatrix}}\qquad {\begin{pmatrix}4\\3\end{pmatrix}}$

### Answer

Solve $(k)(4)+(1)(3)=0$ to get $k=-3/4$.

### Problem 5

Describe the set of vectors in $\mathbb {R} ^{3}$ orthogonal to this one.
    ${\begin{pmatrix}1\\3\\-1\end{pmatrix}}$

### Answer

The set
    $\{{\begin{pmatrix}x\\y\\z\end{pmatrix}}\,{\big |}\,1x+3y-1z=0\}$
can also be described with parameters in this way.
    $\{{\begin{pmatrix}-3\\1\\0\end{pmatrix}}y+{\begin{pmatrix}1\\0\\1\end{pmatrix}}z\,{\big |}\,y,z\in \mathbb {R} \}$
    This exercise is recommended for all readers.

### Problem 6

* Find the angle between the diagonal of the unit square in $\mathbb {R} ^{2}$ and one of the axes.
* Find the angle between the diagonal of the unit cube in $\mathbb {R} ^{3}$ and one of the axes.
* Find the angle between the diagonal of the unit cube in $\mathbb {R} ^{n}$ and one of the axes.
* What is the limit, as $n$ goes to $\infty$, of the angle between the diagonal of the unit cube in $\mathbb {R} ^{n}$ and one of the axes?

### Answer

* We can use the $x$-axis.
    $\arccos({\frac {(1)(1)+(0)(1)}{{\sqrt {1}}{\sqrt {2}}}})\approx 0.79{\text{radians}}$
* Again, use the $x$-axis.
    $\arccos({\frac {(1)(1)+(0)(1)+(0)(1)}{{\sqrt {1}}{\sqrt {3}}}})\approx 0.96{\text{radians}}$
* The $x$-axis worked before and it will work again.
    $\arccos({\frac {(1)(1)+\cdots +(0)(1)}{{\sqrt {1}}{\sqrt {n}}}})=\arccos({\frac {1}{\sqrt {n}}})$
* Using the formula from the prior item, $\lim _{n\to \infty }\arccos(1/{\sqrt {n}})=\pi /2{\text{ radians}}$.

### Problem 7

Is any vector perpendicular to itself?

### Answer

Clearly $u_{1}u_{1}+\cdots +u_{n}u_{n}$ is zero if and only if each $u_{i}$ is zero. So only ${\vec {0}}\in \mathbb {R} ^{n}$ is perpendicular to itself.
    This exercise is recommended for all readers.

### Problem 8

Describe the algebraic properties of dot product.
* Is it right-distributive over addition: $({\vec {u}}+{\vec {v}})\cdot {\vec {w}}={\vec {u}}\cdot {\vec {w}}+{\vec {v}}\cdot {\vec {w}}$?
* Is is left-distributive (over addition)?
* Does it commute?
* Associate?
* How does it interact with scalar multiplication?
As always, any assertion must be backed by either a proof or an example.

### Answer

Assume that ${\vec {u}},{\vec {v}},{\vec {w}}\in \mathbb {R} ^{n}$ have components $u_{1},\ldots ,u_{n},v_{1},\ldots ,w_{n}$.
* Dot product is right-distributive.
    ${\begin{array}{rl}({\vec {u}}+{\vec {v}})\cdot {\vec {w}}&=[{\begin{pmatrix}u_{1}\\\vdots \\u_{n}\end{pmatrix}}+{\begin{pmatrix}v_{1}\\\vdots \\v_{n}\end{pmatrix}}]\cdot {\begin{pmatrix}w_{1}\\\vdots \\w_{n}\end{pmatrix}}\\&={\begin{pmatrix}u_{1}+v_{1}\\\vdots \\u_{n}+v_{n}\end{pmatrix}}\cdot {\begin{pmatrix}w_{1}\\\vdots \\w_{n}\end{pmatrix}}\\&=(u_{1}+v_{1})w_{1}+\cdots +(u_{n}+v_{n})w_{n}\\&=(u_{1}w_{1}+\cdots +u_{n}w_{n})+(v_{1}w_{1}+\cdots +v_{n}w_{n})\\&={\vec {u}}\cdot {\vec {w}}+{\vec {v}}\cdot {\vec {w}}\end{array}}$
* Dot product is also left distributive: ${\vec {w}}\cdot ({\vec {u}}+{\vec {v}})={\vec {w}}\cdot {\vec {u}}+{\vec {w}}\cdot {\vec {v}}$. The proof is just like the prior one.
* Dot product commutes.
    ${\begin{pmatrix}u_{1}\\\vdots \\u_{n}\end{pmatrix}}\cdot {\begin{pmatrix}v_{1}\\\vdots \\v_{n}\end{pmatrix}}=u_{1}v_{1}+\cdots +u_{n}v_{n}=v_{1}u_{1}+\cdots +v_{n}u_{n}={\begin{pmatrix}v_{1}\\\vdots \\v_{n}\end{pmatrix}}\cdot {\begin{pmatrix}u_{1}\\\vdots \\u_{n}\end{pmatrix}}$
* Because ${\vec {u}}\cdot {\vec {v}}$ is a scalar, not a vector, the expression $({\vec {u}}\cdot {\vec {v}})\cdot {\vec {w}}$ makes no sense; the dot product of a scalar and a vector is not defined.
* This is a vague question so it has many answers. Some are (1) $k({\vec {u}}\cdot {\vec {v}})=(k{\vec {u}})\cdot {\vec {v}}$ and $k({\vec {u}}\cdot {\vec {v}})={\vec {u}}\cdot (k{\vec {v}})$, (2) $k({\vec {u}}\cdot {\vec {v}})\neq (k{\vec {u}})\cdot (k{\vec {v}})$ (in general; an example is easy to produce), and (3) $|k{\vec {v}}\,|=|k||{\vec {v}}\,|$ (the connection between norm and dot product is that the square of the norm is the dot product of a vector with itself).

### Problem 9

Verify the equality condition in Corollary 2.6, the Cauchy-Schwarz Inequality.
* Show that if ${\vec {u}}$ is a negative scalar multiple of ${\vec {v}}$ then ${\vec {u}}\cdot {\vec {v}}$ and ${\vec {v}}\cdot {\vec {u}}$ are less than or equal to zero.
* Show that $|{\vec {u}}\cdot {\vec {v}}|=|{\vec {u}}\,|\,|{\vec {v}}\,|$ if and only if one vector is a scalar multiple of the other.

### Answer

* Verifying that $(k{\vec {x}})\cdot {\vec {y}}=k({\vec {x}}\cdot {\vec {y}})={\vec {x}}\cdot (k{\vec {y}})$ for $k\in \mathbb {R}$ and ${\vec {x}},{\vec {y}}\in \mathbb {R} ^{n}$ is easy. Now, for $k\in \mathbb {R}$ and ${\vec {v}},{\vec {w}}\in \mathbb {R} ^{n}$, if ${\vec {u}}=k{\vec {v}}$ then ${\vec {u}}\cdot {\vec {v}}=(k{\vec {v}})\cdot {\vec {v}}=k({\vec {v}}\cdot {\vec {v}})$, which is $k$ times a nonnegative real. The ${\vec {v}}=k{\vec {u}}$ half is similar (actually, taking the $k$ in this paragraph to be the reciprocal of the $k$ above gives that we need only worry about the $k=0$ case).
* We first consider the ${\vec {u}}\cdot {\vec {v}}\geq 0$ case. From the Triangle Inequality we know that ${\vec {u}}\cdot {\vec {v}}=|{\vec {u}}\,|\,|{\vec {v}}\,|$ if and only if one vector is a nonnegative scalar multiple of the other. But that's all we need because the first part of this exercise shows that, in a context where the dot product of the two vectors is positive, the two statements "one vector is a scalar multiple of the other" and "one vector is a nonnegative scalar multiple of the other", are equivalent. We finish by considering the ${\vec {u}}\cdot {\vec {v}}<0$ case. Because $0<|{\vec {u}}\cdot {\vec {v}}|=-({\vec {u}}\cdot {\vec {v}})=(-{\vec {u}})\cdot {\vec {v}}$ and $|{\vec {u}}\,|\,|{\vec {v}}\,|=|-{\vec {u}}\,|\,|{\vec {v}}\,|$, we have that $0<(-{\vec {u}})\cdot {\vec {v}}=|-{\vec {u}}\,|\,|{\vec {v}}\,|$. Now the prior paragraph applies to give that one of the two vectors $-{\vec {u}}$ and ${\vec {v}}$ is a scalar multiple of the other. But that's equivalent to the assertion that one of the two vectors ${\vec {u}}$ and ${\vec {v}}$ is a scalar multiple of the other, as desired.

### Problem 10

Suppose that ${\vec {u}}\cdot {\vec {v}}={\vec {u}}\cdot {\vec {w}}$ and ${\vec {u}}\neq {\vec {0}}$. Must ${\vec {v}}={\vec {w}}$?

### Answer

No. These give an example.
    ${\vec {u}}={\begin{pmatrix}1\\0\end{pmatrix}}\quad {\vec {v}}={\begin{pmatrix}1\\0\end{pmatrix}}\quad {\vec {w}}={\begin{pmatrix}1\\1\end{pmatrix}}$
    This exercise is recommended for all readers.

### Problem 11

Does any vector have length zero except a zero vector? (If "yes", produce an example. If "no", prove it.)

### Answer

We prove that a vector has length zero if and only if all its components are zero.
Let ${\vec {u}}\in \mathbb {R} ^{n}$ have components $u_{1},\ldots ,u_{n}$. Recall that the square of any real number is greater than or equal to zero, with equality only when that real is zero. Thus $|{\vec {u}}\,|^{2}={u_{1}}^{2}+\cdots +{u_{n}}^{2}$ is a sum of numbers greater than or equal to zero, and so is itself greater than or equal to zero, with equality if and only if each $u_{i}$ is zero. Hence $|{\vec {u}}\,|=0$ if and only if all the components of ${\vec {u}}$ are zero.
    This exercise is recommended for all readers.

### Problem 12

Find the midpoint of the line segment connecting $(x_{1},y_{1})$ with $(x_{2},y_{2})$ in $\mathbb {R} ^{2}$. Generalize to $\mathbb {R} ^{n}$.

### Answer

We can easily check that
    ${\bigl{\frac {x_{1}+x_{2}}{2}},{\frac {y_{1}+y_{2}}{2}}{\bigr )}$
is on the line connecting the two, and is equidistant from both. The generalization is obvious.

### Problem 13

Show that if ${\vec {v}}\neq {\vec {0}}$ then ${\vec {v}}/|{\vec {v}}\,|$ has length one. What if ${\vec {v}}={\vec {0}}$?

### Answer

Assume that ${\vec {v}}\in \mathbb {R} ^{n}$ has components $v_{1},\ldots ,v_{n}$. If ${\vec {v}}\neq {\vec {0}}$ then we have this.
    ${\sqrt {\left({\frac {v_{1}}{\sqrt {{v_{1}}^{2}+\cdots +{v_{n}}^{2}}}}\right)^{2}+\dots +\left({\frac {v_{n}}{\sqrt {{v_{1}}^{2}+\cdots +{v_{n}}^{2}}}}\right)^{2}}}$
       ${\begin{aligned}&={\sqrt {\left({\frac {{v_{1}}^{2}}{{v_{1}}^{2}+\cdots +{v_{n}}^{2}}}\right)+\dots +\left({\frac {{v_{n}}^{2}}{{v_{1}}^{2}+\cdots +{v_{n}}^{2}}}\right)}}\\&=1\end{aligned}}$
If ${\vec {v}}={\vec {0}}$ then ${\vec {v}}/|{\vec {v}}\,|$ is not defined.

### Problem 14

Show that if $r\geq 0$ then $r{\vec {v}}$ is $r$ times as long as ${\vec {v}}$. What if $r<0$?

### Answer

For the first question, assume that ${\vec {v}}\in \mathbb {R} ^{n}$ and $r\geq 0$, take the root, and factor.
    $|r{\vec {v}}\,|={\sqrt {(rv_{1})^{2}+\cdots +(rv_{n})^{2}}}={\sqrt {r^{2}({v_{1}}^{2}+\cdots +{v_{n}}^{2}}}=r|{\vec {v}}\,|$
For the second question, the result is $r$ times as long, but it points in the opposite direction in that $r{\vec {v}}+(-r){\vec {v}}={\vec {0}}$.
    This exercise is recommended for all readers.

### Problem 15

A vector ${\vec {v}}\in \mathbb {R} ^{n}$ of length one is a unit vector. Show that the dot product of two unit vectors has absolute value less than or equal to one. Can "less than" happen? Can "equal to"?

### Answer

Assume that ${\vec {u}},{\vec {v}}\in \mathbb {R} ^{n}$ both have length $1$. Apply Cauchy-Schwarz: $|{\vec {u}}\cdot {\vec {v}}|\leq |{\vec {u}}\,|\,|{\vec {v}}\,|=1$.
To see that "less than" can happen, in $\mathbb {R} ^{2}$ take
    ${\vec {u}}={\begin{pmatrix}1\\0\end{pmatrix}}\qquad {\vec {v}}={\begin{pmatrix}0\\1\end{pmatrix}}$
and note that ${\vec {u}}\cdot {\vec {v}}=0$. For "equal to", note that ${\vec {u}}\cdot {\vec {u}}=1$.

### Problem 16

Prove that $|{\vec {u}}+{\vec {v}}\,|^{2}+|{\vec {u}}-{\vec {v}}\,|^{2}=2|{\vec {u}}\,|^{2}+2|{\vec {v}}\,|^{2}.$

### Answer

Write
    ${\vec {u}}={\begin{pmatrix}u_{1}\\\vdots \\u_{n}\end{pmatrix}}\qquad {\vec {v}}={\begin{pmatrix}v_{1}\\\vdots \\v_{n}\end{pmatrix}}$
and then this computation works.
    ${\begin{array}{rl}|{\vec {u}}+{\vec {v}}\,|^{2}+|{\vec {u}}-{\vec {v}}\,|^{2}&=(u_{1}+v_{1})^{2}+\cdots +(u_{n}+v_{n})^{2}\\&\quad +(u_{1}-v_{1})^{2}+\cdots +(u_{n}-v_{n})^{2}\\&={u_{1}}^{2}+2u_{1}v_{1}+{v_{1}}^{2}+\cdots +{u_{n}}^{2}+2u_{n}v_{n}+{v_{n}}^{2}\\&\quad +{u_{1}}^{2}-2u_{1}v_{1}+{v_{1}}^{2}+\cdots +{u_{n}}^{2}-2u_{n}v_{n}+{v_{n}}^{2}\\&=2({u_{1}}^{2}+\cdots +{u_{n}}^{2})+2({v_{1}}^{2}+\cdots +{v_{n}}^{2})\\&=2|{\vec {u}}\,|^{2}+2|{\vec {v}}\,|^{2}\end{array}}$

### Problem 17

Show that if ${\vec {x}}\cdot {\vec {y}}=0$ for every ${\vec {y}}$ then ${\vec {x}}={\vec {0}}$.

### Answer

We will prove this demonstrating that the contrapositive statement holds: if ${\vec {x}}\neq {\vec {0}}$ then there is a ${\vec {y}}$ with ${\vec {x}}\cdot {\vec {y}}\neq 0$.
Assume that ${\vec {x}}\in \mathbb {R} ^{n}$. If ${\vec {x}}\neq {\vec {0}}$ then it has a nonzero component, say the $i$-th one $x_{i}$. But the vector ${\vec {y}}\in \mathbb {R} ^{n}$ that is all zeroes except for a one in component $i$ gives ${\vec {x}}\cdot {\vec {y}}=x_{i}$. (A slicker proof just considers ${\vec {x}}\cdot {\vec {x}}$.)

### Problem 18

Is $|{\vec {u}}_{1}+\cdots +{\vec {u}}_{n}|\leq |{\vec {u}}_{1}|+\cdots +|{\vec {u}}_{n}|$? If it is true then it would generalize the Triangle Inequality.

### Answer

Yes; we can prove this by induction.
Assume that the vectors are in some $\mathbb {R} ^{k}$. Clearly the statement applies to one vector. The Triangle Inequality is this statement applied to two vectors. For an inductive step assume the statement is true for $n$ or fewer vectors. Then this
    $|{\vec {u}}_{1}+\cdots +{\vec {u}}_{n}+{\vec {u}}_{n+1}|\leq |{\vec {u}}_{1}+\cdots +{\vec {u}}_{n}|+|{\vec {u}}_{n+1}|$
follows by the Triangle Inequality for two vectors. Now the inductive hypothesis, applied to the first summand on the right, gives that as less than or equal to $|{\vec {u}}_{1}|+\cdots +|{\vec {u}}_{n}|+|{\vec {u}}_{n+1}|$.

### Problem 19

What is the ratio between the sides in the Cauchy-Schwarz inequality?

### Answer

By definition
    ${\frac {{\vec {u}}\cdot {\vec {v}}}{|{\vec {u}}\,|\,|{\vec {v}}\,|}}=\cos \theta$
where $\theta$ is the angle between the vectors. Thus the ratio is $|\cos \theta |$.

### Problem 20

Why is the zero vector defined to be perpendicular to every vector?

### Answer

So that the statement "vectors are orthogonal iff their dot product is zero" has no exceptions.

### Problem 21

Describe the angle between two vectors in $\mathbb {R} ^{1}$.

### Answer

The angle between $(a)$ and $(b)$ is found (for $a,b\neq 0$) with
    $\arccos({\frac {ab}{{\sqrt {a^{2}}}{\sqrt {b^{2}}}}}).$
If $a$ or $b$ is zero then the angle is $\pi /2$ radians. Otherwise, if $a$ and $b$ are of opposite signs then the angle is $\pi$ radians, else the angle is zero radians.

### Problem 22

Give a simple necessary and sufficient condition to determine whether the angle between two vectors is acute, right, or obtuse.

### Answer

The angle between ${\vec {u}}$ and ${\vec {v}}$ is acute if ${\vec {u}}\cdot {\vec {v}}>0$, is right if ${\vec {u}}\cdot {\vec {v}}=0$, and is obtuse if ${\vec {u}}\cdot {\vec {v}}<0$. That's because, in the formula for the angle, the denominator is never negative.
    This exercise is recommended for all readers.

### Problem 23

Generalize to $\mathbb {R} ^{n}$ the converse of the Pythagorean Theorem, that if ${\vec {u}}$ and ${\vec {v}}$ are perpendicular then $|{\vec {u}}+{\vec {v}}\,|^{2}=|{\vec {u}}\,|^{2}+|{\vec {v}}\,|^{2}$.

### Answer

Suppose that ${\vec {u}},{\vec {v}}\in \mathbb {R} ^{n}$. If ${\vec {u}}$ and ${\vec {v}}$ are perpendicular then
    $|{\vec {u}}+{\vec {v}}\,|^{2}=({\vec {u}}+{\vec {v}})\cdot ({\vec {u}}+{\vec {v}})={\vec {u}}\cdot {\vec {u}}+2\,{\vec {u}}\cdot {\vec {v}}+{\vec {v}}\cdot {\vec {v}}={\vec {u}}\cdot {\vec {u}}+{\vec {v}}\cdot {\vec {v}}=|{\vec {u}}\,|^{2}+|{\vec {v}}\,|^{2}$
(the third equality holds because ${\vec {u}}\cdot {\vec {v}}=0$).

### Problem 24

Show that $|{\vec {u}}\,|=|{\vec {v}}\,|$ if and only if ${\vec {u}}+{\vec {v}}$ and ${\vec {u}}-{\vec {v}}$ are perpendicular. Give an example in $\mathbb {R} ^{2}$.

### Answer

Where ${\vec {u}},{\vec {v}}\in \mathbb {R} ^{n}$, the vectors ${\vec {u}}+{\vec {v}}$ and ${\vec {u}}-{\vec {v}}$ are perpendicular if and only if $0=({\vec {u}}+{\vec {v}})\cdot ({\vec {u}}-{\vec {v}})={\vec {u}}\cdot {\vec {u}}-{\vec {v}}\cdot {\vec {v}}$, which shows that those two are perpendicular if and only if ${\vec {u}}\cdot {\vec {u}}={\vec {v}}\cdot {\vec {v}}$. That holds if and only if $|{\vec {u}}\,|=|{\vec {v}}\,|$.

### Problem 25

Show that if a vector is perpendicular to each of two others then it is perpendicular to each vector in the plane they generate. (Remark. They could generate a degenerate plane— a line or a point— but the statement remains true.)

### Answer

Suppose ${\vec {u}}\in \mathbb {R} ^{n}$ is perpendicular to both ${\vec {v}}\in \mathbb {R} ^{n}$ and ${\vec {w}}\in \mathbb {R} ^{n}$. Then, for any $k,m\in \mathbb {R}$ we have this.
    ${\vec {u}}\cdot (k{\vec {v}}+m{\vec {w}})=k({\vec {u}}\cdot {\vec {v}})+m({\vec {u}}\cdot {\vec {w}})=k(0)+m(0)=0$

### Problem 26

Prove that, where ${\vec {u}},{\vec {v}}\in \mathbb {R} ^{n}$ are nonzero vectors, the vector
    ${\frac {\vec {u}}{|{\vec {u}}\,|}}+{\frac {\vec {v}}{|{\vec {v}}\,|}}$
bisects the angle between them. Illustrate in $\mathbb {R} ^{2}$.

### Answer

We will show something more general: if $|{\vec {z}}_{1}|=|{\vec {z}}_{2}|$ for ${\vec {z}}_{1},{\vec {z}}_{2}\in \mathbb {R} ^{n}$, then ${\vec {z}}_{1}+{\vec {z}}_{2}$ bisects the angle between ${\vec {z}}_{1}$ and ${\vec {z}}_{2}$
(we ignore the case where ${\vec {z}}_{1}$ and ${\vec {z}}_{2}$ are the zero vector).
The ${\vec {z}}_{1}+{\vec {z}}_{2}={\vec {0}}$ case is easy. For the rest, by the definition of angle, we will be done if we show this.
    ${\frac {{\vec {z}}_{1}\cdot ({\vec {z}}_{1}+{\vec {z}}_{2})}{|{\vec {z}}_{1}|\,|{\vec {z}}_{1}+{\vec {z}}_{2}|}}={\frac {{\vec {z}}_{2}\cdot ({\vec {z}}_{1}+{\vec {z}}_{2})}{|{\vec {z}}_{2}|\,|{\vec {z}}_{1}+{\vec {z}}_{2}|}}$
But distributing inside each expression gives
    ${\frac {{\vec {z}}_{1}\cdot {\vec {z}}_{1}+{\vec {z}}_{1}\cdot {\vec {z}}_{2}}{|{\vec {z}}_{1}|\,|{\vec {z}}_{1}+{\vec {z}}_{2}|}}\qquad {\frac {{\vec {z}}_{2}\cdot {\vec {z}}_{1}+{\vec {z}}_{2}\cdot {\vec {z}}_{2}}{|{\vec {z}}_{2}|\,|{\vec {z}}_{1}+{\vec {z}}_{2}|}}$
and ${\vec {z}}_{1}\cdot {\vec {z}}_{1}=|{\vec {z}}_{1}|^{2}=|{\vec {z}}_{2}|^{2}={\vec {z}}_{2}\cdot {\vec {z}}_{2}$, so the two are equal.

### Problem 27

Verify that the definition of angle is dimensionally correct: (1) if $k>0$ then the cosine of the angle between $k{\vec {u}}$ and ${\vec {v}}$ equals the cosine of the angle between ${\vec {u}}$ and ${\vec {v}}$, and (2) if $k<0$ then the cosine of the angle between $k{\vec {u}}$ and ${\vec {v}}$ is the negative of the cosine of the angle between ${\vec {u}}$ and ${\vec {v}}$.

### Answer

We can show the two statements together. Let ${\vec {u}},{\vec {v}}\in \mathbb {R} ^{n}$, write
    ${\vec {u}}={\begin{pmatrix}u_{1}\\\vdots \\u_{n}\end{pmatrix}}\qquad {\vec {v}}={\begin{pmatrix}v_{1}\\\vdots \\v_{n}\end{pmatrix}}$
and calculate.
    $\cos \theta ={\frac {ku_{1}v_{1}+\cdots +ku_{n}v_{n}}{{\sqrt {{(ku_{1})}^{2}+\cdots +{(ku_{n})}^{2}}}{\sqrt {{b_{1}}^{2}+\cdots +{b_{n}}^{2}}}}}={\frac {k}{|k|}}{\frac {{\vec {u}}\cdot {\vec {v}}}{|{\vec {u}}\,|\,|{\vec {v}}\,|}}=\pm {\frac {{\vec {u}}\cdot {\vec {v}}}{|{\vec {u}}\,|\,|{\vec {v}}\,|}}$
    This exercise is recommended for all readers.

### Problem 28

Show that the inner product operation is linear: for ${\vec {u}},{\vec {v}},{\vec {w}}\in \mathbb {R} ^{n}$ and $k,m\in \mathbb {R}$, ${\vec {u}}\cdot (k{\vec {v}}+m{\vec {w}})=k({\vec {u}}\cdot {\vec {v}})+m({\vec {u}}\cdot {\vec {w}})$.

### Answer

Let
    ${\vec {u}}={\begin{pmatrix}u_{1}\\\vdots \\u_{n}\end{pmatrix}},\quad {\vec {v}}={\begin{pmatrix}v_{1}\\\vdots \\v_{n}\end{pmatrix}}\quad {\vec {w}}={\begin{pmatrix}w_{1}\\\vdots \\w_{n}\end{pmatrix}}$
and then
    ${\begin{array}{rl}{\vec {u}}\cdot {\biglk{\vec {v}}+m{\vec {w}}{\bigr )}&={\begin{pmatrix}u_{1}\\\vdots \\u_{n}\end{pmatrix}}\cdot {\bigl{\begin{pmatrix}kv_{1}\\\vdots \\kv_{n}\end{pmatrix}}+{\begin{pmatrix}mw_{1}\\\vdots \\mw_{n}\end{pmatrix}}{\bigr )}\\&={\begin{pmatrix}u_{1}\\\vdots \\u_{n}\end{pmatrix}}\cdot {\begin{pmatrix}kv_{1}+mw_{1}\\\vdots \\kv_{n}+mw_{n}\end{pmatrix}}\\&=u_{1}(kv_{1}+mw_{1})+\cdots +u_{n}(kv_{n}+mw_{n})\\&=ku_{1}v_{1}+mu_{1}w_{1}+\cdots +ku_{n}v_{n}+mu_{n}w_{n}\\&=(ku_{1}v_{1}+\cdots +ku_{n}v_{n})+(mu_{1}w_{1}+\cdots +mu_{n}w_{n})\\&=k({\vec {u}}\cdot {\vec {v}})+m({\vec {u}}\cdot {\vec {w}})\end{array}}$
as required.
    This exercise is recommended for all readers.

### Problem 29

The geometric mean of two positive reals $x,y$ is ${\sqrt {xy}}$. It is analogous to the arithmetic mean $(x+y)/2$. Use the Cauchy-Schwarz inequality to show that the geometric mean of any $x,y\in \mathbb {R}$ is less than or equal to the arithmetic mean.

### Answer

For $x,y\in \mathbb {R} ^{+}$, set
    ${\vec {u}}={\begin{pmatrix}{\sqrt {x}}\\{\sqrt {y}}\end{pmatrix}}\qquad {\vec {v}}={\begin{pmatrix}{\sqrt {y}}\\{\sqrt {x}}\end{pmatrix}}$
so that the Cauchy-Schwarz inequality asserts that (after squaring)
    ${\begin{array}{rl}({\sqrt {x}}{\sqrt {y}}+{\sqrt {y}}{\sqrt {x}})^{2}&\leq ({\sqrt {x}}{\sqrt {x}}+{\sqrt {y}}{\sqrt {y}})({\sqrt {y}}{\sqrt {y}}+{\sqrt {x}}{\sqrt {x}})\\(2{\sqrt {x}}{\sqrt {y}})^{2}&\leq (x+y)^{2}\\{\sqrt {xy}}&\leq {\frac {x+y}{2}}\end{array}}$
as desired.

### ? Problem 30

A ship is sailing with speed and direction ${\vec {v}}_{1}$; the wind blows apparently (judging by the vane on the mast) in the direction of a vector ${\vec {a}}$; on changing the direction and speed of the ship from ${\vec {v}}_{1}$ to ${\vec {v}}_{2}$ the apparent wind is in the direction of a vector ${\vec {b}}$.
Find the vector velocity of the wind (Ivanoff & Esty 1933).

### Answer

This is how the answer was given in the cited source.
The actual velocity ${\vec {v}}$ of the wind is the sum of the ship's velocity and the apparent velocity of the wind. Without loss of generality we may assume ${\vec {a}}$ and ${\vec {b}}$ to be unit vectors, and may write
    ${\vec {v}}={\vec {v}}_{1}+s{\vec {a}}={\vec {v}}_{2}+t{\vec {b}}$
where $s$ and $t$ are undetermined scalars. Take the dot product first by ${\vec {a}}$ and then by ${\vec {b}}$ to obtain
    ${\begin{array}{rl}s-t{\vec {a}}\cdot {\vec {b}}&={\vec {a}}\cdot ({\vec {v}}_{2}-{\vec {v}}_{1})\\s{\vec {a}}\cdot {\vec {b}}-t&={\vec {b}}\cdot ({\vec {v}}_{2}-{\vec {v}}_{1})\end{array}}$
Multiply the second by ${\vec {a}}\cdot {\vec {b}}$, subtract the result from the first, and find
    $s={\frac {[{\vec {a}}-({\vec {a}}\cdot {\vec {b}}){\vec {b}}]\cdot ({\vec {v}}_{2}-{\vec {v}}_{1})}{1-({\vec {a}}\cdot {\vec {b}})^{2}}}.$
Substituting in the original displayed equation, we get
    ${\vec {v}}={\vec {v}}_{1}+{\frac {[{\vec {a}}-({\vec {a}}\cdot {\vec {b}}){\vec {b}}]\cdot ({\vec {v}}_{2}-{\vec {v}}_{1}){\vec {a}}}{1-({\vec {a}}\cdot {\vec {b}})^{2}}}.$

### Problem 31

Verify the Cauchy-Schwarz inequality by first proving Lagrange's identity:
    $\left(\sum _{1\leq j\leq n}a_{j}b_{j}\right)^{2}=\left(\sum _{1\leq j\leq n}a_{j}^{2}\right)\left(\sum _{1\leq j\leq n}b_{j}^{2}\right)-\sum _{1\leq k<j\leq n}(a_{k}b_{j}-a_{j}b_{k})^{2}$
and then noting that the final term is positive. (Recall the meaning
    $\sum _{1\leq j\leq n}a_{j}b_{j}=a_{1}b_{1}+a_{2}b_{2}+\cdots +a_{n}b_{n}$
and
    $\sum _{1\leq j\leq n}{a_{j}}^{2}={a_{1}}^{2}+{a_{2}}^{2}+\cdots +{a_{n}}^{2}$
of the $\Sigma$ notation.) This result is an improvement over Cauchy-Schwarz because it gives a formula for the difference between the two sides. Interpret that difference in $\mathbb {R} ^{2}$.

### Answer

We use induction on $n$.
In the $n=1$ base case the identity reduces to
    $(a_{1}b_{1})^{2}=({a_{1}}^{2})({b_{1}}^{2})-0$
and clearly holds.
For the inductive step assume that the formula holds for the $0$, ..., $n$ cases. We will show that it then holds in the $n+1$ case. Start with the right-hand side
    ${\bigl\sum _{1\leq j\leq n+1}{a_{j}}^{2}{\bigr )}{\bigl\sum _{1\leq j\leq n+1}{b_{j}}^{2}{\bigr )}-\sum _{1\leq k<j\leq n+1}{\bigla_{k}b_{j}-a_{j}b_{k}{\bigr )}^{2}$
       ${\begin{aligned}&={\bigl(\sum _{1\leq j\leq n}{a_{j}}^{2})+{a_{n+1}}^{2}{\bigr ]}{\bigl(\sum _{1\leq j\leq n}{b_{j}}^{2})+{b_{n+1}}^{2}{\bigr ]}\\&\quad -{\bigl\sum _{1\leq k<j\leq n}{\bigla_{k}b_{j}-a_{j}b_{k}{\bigr )}^{2}+\sum _{1\leq k\leq n}{\bigla_{k}b_{n+1}-a_{n+1}b_{k}{\bigr )}^{2}{\bigr ]}\\&={\bigl\sum _{1\leq j\leq n}{a_{j}}^{2}{\bigr )}{\bigl\sum _{1\leq j\leq n}{b_{j}}^{2}{\bigr )}+\sum _{1\leq j\leq n}{b_{j}}^{2}{a_{n+1}}^{2}+\sum _{1\leq j\leq n}{a_{j}}^{2}{b_{n+1}}^{2}+{a_{n+1}}^{2}{b_{n+1}}^{2}\\&\qquad -{\bigl\sum _{1\leq k<j\leq n}{\bigla_{k}b_{j}-a_{j}b_{k}{\bigr )}^{2}+\sum _{1\leq k\leq n}{\bigla_{k}b_{n+1}-a_{n+1}b_{k}{\bigr )}^{2}{\bigr ]}\\&={\bigl\sum _{1\leq j\leq n}{a_{j}}^{2}{\bigr )}{\bigl\sum _{1\leq j\leq n}{b_{j}}^{2}{\bigr )}-\sum _{1\leq k<j\leq n}{\bigla_{k}b_{j}-a_{j}b_{k}{\bigr )}^{2}\\&\quad +\sum _{1\leq j\leq n}{b_{j}}^{2}{a_{n+1}}^{2}+\sum _{1\leq j\leq n}{a_{j}}^{2}{b_{n+1}}^{2}+{a_{n+1}}^{2}{b_{n+1}}^{2}\\&\qquad -\sum _{1\leq k\leq n}{\bigla_{k}b_{n+1}-a_{n+1}b_{k}{\bigr )}^{2}\end{aligned}}$
and apply the inductive hypothesis
    ${\begin{array}{rl}&={\bigl\sum _{1\leq j\leq n}a_{j}b_{j}{\bigr )}^{2}+\sum _{1\leq j\leq n}{b_{j}}^{2}{a_{n+1}}^{2}+\sum _{1\leq j\leq n}{a_{j}}^{2}{b_{n+1}}^{2}+{a_{n+1}}^{2}{b_{n+1}}^{2}\\&\qquad -{\bigl\sum _{1\leq k\leq n}{a_{k}}^{2}{b_{n+1}}^{2}-2\sum _{1\leq k\leq n}a_{k}b_{n+1}a_{n+1}b_{k}+\sum _{1\leq k\leq n}{a_{n+1}}^{2}{b_{k}}^{2}{\bigr ]}\\&={\bigl\sum _{1\leq j\leq n}a_{j}b_{j}{\bigr )}^{2}+2{\bigl\sum _{1\leq k\leq n}a_{k}b_{n+1}a_{n+1}b_{k}{\bigr )}+{a_{n+1}}^{2}{b_{n+1}}^{2}\\&={\bigl{\bigl\sum _{1\leq j\leq n}a_{j}b_{j}{\bigr )}+a_{n+1}b_{n+1}{\bigr ]}^{2}\end{array}}$
to derive the left-hand side.

## References

* O'Hanian, Hans (1985), Physics, vol. 1, W. W. Norton
* Ivanoff, V. F. (proposer); Esty, T. C. (solver) (February 1933), "Problem 3529", American Mathematical Monthly, 39 (2): 118