Alternatively we say \(\|\vect x\|\) is the length or the magnitude of the vector \(\vect x\text{.}\) As a sum of squares \(\vect x\cdot\vect x\) is always nonnegative, and zero if and only if \(\vect x\) is the zero vector. If \(\|\vect x\|=1\) we call \(\vect x\) a unit vector.
For vectors in the plane and in space it follows from Pythagorasβ theorem that \(\|\vect x\|\) is the length of \(\vect x\text{.}\) Even for \(N\geq 3\) we still talk about the βlengthβ of the vector \(\vect x\text{,}\) meaning its norm.
There is another formula for the scalar product, giving it a geometric interpretation. It is often used to define the dot product for vectors in \(\mathbb R^2\) and \(\mathbb R^3\text{.}\)
The formula follows from the cosine rule in a triangle. Indeed, applying the cosine rule to the triangle with side lengths \(\|\vect x\|\text{,}\)\(\|\vect y\|\) and \(\|\vect y-\vect x\|\) as shown in FigureΒ 1.8 we deduce that
One important consequence of FigureΒ 1.8, which we will use extensively later, is, that the scalar product allows us to compute the projection of one vector in the direction of another vector. More precisely,
is the projection of \(\vect y\) into the direction of \(\vect x\) as shown in FigureΒ 1.10). We call \(\|\vect p\|\) the component of \(\vect y\) in the direction of \(\vect x\).
Note however that \(\cos(\theta)\) needs to be between \(-1\) and \(1\text{.}\) If we can show that \(|\vect x\cdot\vect y|\leq \|\vect x\|\|\vect y\|\) in general then we can indeed define angles between \(N\)-vectors. The above inequality turns out to be true always and is often called the Cauchy-Schwarz inequality.
If \(\vect x=\vect 0\) or \(\vect y=\vect 0\) the inequality is obvious and \(\vect x\) and \(\vect y\) are linearly dependent. Hence assume that \(\vect x\neq\vect 0\) and \(\vect y\neq\vect0\text{.}\) We can then define
\begin{equation*}
\vect n
=\vect y -\frac{\vect x\cdot\vect y}{\|\vect x\|^2}\;\vect x\text{.}
\end{equation*}
Therefore \((\vect x\cdot\vect y)^2\leq\|\vect x\|^2\|\vect y\|^2\text{,}\) and by taking square roots we find (1.5). Clearly \(\|\vect n\|=0\) if and only if
that is, \(\vect y=\alpha\vect x\) for some \(\alpha\in\mathbb R\text{,}\) that is, \(\vect x\) and \(\vect y\) are linearly independent. This completes the proof of the theorem.
It is common practice in mathematics to make a fact in some particular situation a definition in a more general situation. Here we proved that in the plane or in space the cosine of the angle between two vectors is given by (1.2). For higher dimension no angles are defined, so we take (1.2) as a definition of the angle.
If \(\vect x\) and \(\vect y\) are two (non-zero) vectors in \(\mathbb R^N\) (\(N\) arbitrary) we define the angle, \(\theta\text{,}\) between \(\vect x\) and \(\vect y\) by
The first two properties follow easily from the definition of the norm. To prove the last one we use NoteΒ 1.5, the definition of the norm and the Cauchy-Schwarz inequality (1.5) to see that
The last of the above properties reflects the fact that the total length of two edges in a triangle is bigger than the length of the third edge. For this reason it is called the triangle inequality.