# Linear Algebra/Length and Angle Measures

|current=Length and Angle Measures
|previous=Vectors in Space
translated the first section\'s results about solution sets into
geometric terms for insight into how those sets look. But we must watch
out not to be mislead by our own terms; labeling subsets of
$\mathbb{R}^k$ of the forms
$\{\vec{p}+t\vec{v}\,\big|\, t\in\mathbb{R}\}$ and
$\{\vec{p}+t\vec{v}+s\vec{w}\,\big|\, t,s\in\mathbb{R}\}$ as \"lines\"
and \"planes\" doesn\'t make them act like the lines and planes of our
prior experience. Rather, we must ensure that the names suit the sets.
While we can\'t prove that the sets satisfy our intuition--- we can\'t
prove anything about intuition--- in this subsection we\'ll observe that
a result familiar from $\mathbb{R}^2$ and $\mathbb{R}^3$, when
generalized to arbitrary $\mathbb{R}^k$, supports the idea that a line
is straight and a plane is flat. Specifically, we\'ll see how to do
Euclidean geometry in a \"plane\" by giving a definition of the angle
between two $\mathbb{R}^n$ vectors in the plane that they generate.

We can use that definition to derive a formula for the angle between two
vectors. For a model of what to do, consider two vectors in
$\mathbb{R}^3$.

```{=html}
<center>
```
![](Linalg_two_vectors_in_R3.png "Linalg_two_vectors_in_R3.png"){width=""
height="200"}

```{=html}
</center>
```
Put them in canonical position and, in the plane that they determine,
consider the triangle formed by $\vec{u}$, $\vec{v}$, and
$\vec{u}-\vec{v}$.

```{=html}
<center>
```
![](Linalg_triangle_formed_by_two_vectors.png "Linalg_triangle_formed_by_two_vectors.png"){width=""
height="200"}

```{=html}
</center>
```
Apply the Law of Cosines, $|\vec{u}-\vec{v}\,|^2
=
|\vec{u}\,|^2+|\vec{v}\,|^2-
2\,|\vec{u}\,|\,|\vec{v}\,|\cos\theta$, where $\theta$ is the angle
between the vectors. Expand both sides

$$(u_1-v_1)^2+(u_2-v_2)^2+(u_3-v_3)^2$$

$$=(u_1^2+u_2^2+u_3^2)+(v_1^2+v_2^2+v_3^2)-
2\,|\vec{u}\,|\,|\vec{v}\,|\cos\theta$$

and simplify.

$$\theta
=
\arccos(\,\frac{u_1v_1+u_2v_2+u_3v_3}{
|\vec{u}\,|\,|\vec{v}\,| }\,)$$

In higher dimensions no picture suffices but we can make the same
argument analytically. First, the form of the numerator is clear--- it
comes from the middle terms of the squares $(u_1-v_1)^2$, $(u_2-v_2)^2$,
etc.

Note that the dot product of two vectors is a real number, not a vector,
and that the dot product of a vector from $\mathbb{R}^n$ with a vector
from $\mathbb{R}^m$ is defined only when $n$ equals $m$. Note also this
relationship between dot product and length: dotting a vector with
itself gives its length squared
$\vec{u}\cdot\vec{u}=u_1u_1+\cdots+u_nu_n=|\vec{u}\,|^2$.

Still reasoning with letters, but guided by the pictures, we use the
next theorem to argue that the triangle formed by $\vec{u}$, $\vec{v}$,
and $\vec{u}-\vec{v}$ in $\mathbb{R}^n$ lies in the planar subset of
$\mathbb{R}^n$ generated by $\vec{u}$ and $\vec{v}$.

This inequality is the source of the familiar saying, \"The shortest
distance between two points is in a straight line.\"

```{=html}
<center>
```
![](Linalg_triangle_inequality.png "Linalg_triangle_inequality.png"){width=""
height="150"}

```{=html}
</center>
```
This result supports the intuition that even in higher-dimensional
spaces, lines are straight and planes are flat. For any two points in a
linear surface, the line segment connecting them is contained in that
surface (this is easily checked from the definition). But if the surface
has a bend then that would allow for a shortcut (shown here grayed,
while the segment from $P$ to $Q$ that is contained in the surface is
solid).

```{=html}
<center>
```
![](Linalg_shortest_path_on_surface.png "Linalg_shortest_path_on_surface.png"){width=""
height="150"}

```{=html}
</center>
```
Because the Triangle Inequality says that in any $\mathbb{R}^n$, the
shortest cut between two endpoints is simply the line segment connecting
them, linear surfaces have no such bends.

Back to the definition of angle measure. The heart of the Triangle
Inequality\'s proof is the
\"$\vec{u}\cdot\vec{v}\leq |\vec{u}\,|\,|\vec{v}\,|$\" line. At first
glance, a reader might wonder if some pairs of vectors satisfy the
inequality in this way: while $\vec{u}\cdot\vec{v}$ is a large number,
with absolute value bigger than the right-hand side, it is a negative
large number. The next result says that no such pair of vectors exists.

The Cauchy-Schwarz inequality assures us that the next definition makes
sense because the fraction has absolute value less than or equal to one.

{ \|\\vec{u}\\,\|\\,\|\\vec{v}\\,\| }\\,) `</math>`{=html}

(the angle between the zero vector and any other vector is defined to be
a right angle). }}

Thus vectors from $\mathbb{R}^n$ are orthogonal (or perpendicular) if
and only if their dot product is zero.

) =\\arccos(\\frac{3}{\\sqrt{2}\\sqrt{13}}) `</math>`{=html}

approximately $0.94 \text{radians}$. Notice that these vectors are not
orthogonal. Although the $yz$-plane may appear to be perpendicular to
the $xy$-plane, in fact the two planes are that way only in the weak
sense that there are vectors in each orthogonal to all vectors in the
other. Not every vector in each is orthogonal to all vectors in the
other. }}

## Exercises

{\|\\vec{u}\\,\| }+\\frac{\\vec{v}}{\|\\vec{v}\\,\| } `</math>`{=html}

bisects the angle between them. Illustrate in $\mathbb{R}^2$. }}
`{{TextBox|1=
;Problem 27:
Verify that the definition of angle is dimensionally correct:
(1) if <math> k>0 </math> then the cosine of the angle between <math> k\vec{u} </math>
and <math> \vec{v} </math> equals the cosine of the angle between <math> \vec{u} </math>
and <math> \vec{v} </math>, and (2) if <math> k<0 </math> then the cosine of the angle
between <math> k\vec{u} </math> and <math> \vec{v} </math> is the negative of the cosine
of the angle between <math> \vec{u} </math> and <math> \vec{v} </math>.
}}`{=mediawiki} 
`{{TextBox|1=
;Problem 28:
Show that the inner product operation is '''linear''': for
<math> \vec{u},\vec{v},\vec{w}\in\mathbb{R}^n </math> and <math> k,m\in\mathbb{R} </math>,
<math>\vec{u}\cdot(k\vec{v}+m\vec{w})=
k(\vec{u}\cdot\vec{v})+m(\vec{u}\cdot\vec{w})</math>.
}}`{=mediawiki} 
`{{TextBox|1=
;Problem 29{{anchor|arithmetic geometric mean inequality}}:
The '''geometric mean'''
of two positive reals <math> x, y </math> is <math> \sqrt{xy} </math>.
It is analogous to the '''arithmetic mean'''
<math> (x+y)/2 </math>.
Use the Cauchy-Schwarz inequality to show that
the geometric mean of any <math> x,y\in\mathbb{R} </math> is less
than or equal to the arithmetic mean.
}}`{=mediawiki} `{{TextBox|1=
;? Problem 30:
A ship is sailing with speed and direction <math> \vec{v}_1 </math>; the wind blows
apparently (judging by the vane on the mast) in the direction of a vector
<math> \vec{a} </math>; on changing the direction and speed of the ship from
<math> \vec{v}_1 </math> to <math> \vec{v}_2 </math> the apparent wind is in the direction
of a vector <math> \vec{b} </math>.

Find the vector velocity of the wind {{harv|Ivanoff|Esty|1933}}.
}}`{=mediawiki} `{{TextBox|1=
;Problem 31:
Verify the Cauchy-Schwarz inequality by first proving
Lagrange's identity:

:<math>
\left(\sum_{1\leq j\leq n} a_jb_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_kb_j-a_jb_k)^2
</math>

and then noting that the final term is positive.
(Recall the meaning

:<math>
\sum_{1\leq j\leq n}a_jb_j=
a_1b_1+a_2b_2+\cdots+a_nb_n
</math>

and

:<math>
\sum_{1\leq j\leq n}{a_j}^2=
{a_1}^2+{a_2}^2+\cdots+{a_n}^2
</math>

of the <math> \Sigma </math> 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 <math> \mathbb{R}^2 </math>.
/Solutions/

## References

-   
-   
-   
