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.
Note1.7.
If we assume that \(\vect x\) and \(\vect y\) are ‘column vectors’, that is, \(1\times N\)-matrices, then
Here, as usual, \(\vect x^T\) means the transposed matrix to \(\vect
x\text{.}\)
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{.}\)
Proposition1.8.
If \(\theta\in[0,\pi]\) is the angle between the vectors \(\vect x\) and \(\vect y\) then
\begin{equation}
\vect x\cdot\vect y
=\|\vect x\|\|\vect y\|\cos \theta.\tag{1.1}
\end{equation}
If \(\vect x\neq\vect 0\) and \(\vect y\neq\vect 0\) then
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.9 we deduce that
One important consequence of Figure 1.9, 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.11). We call \(\|\vect p\|\) the component of \(\vect y\) in the direction of \(\vect x\).
It is tempting to define the angle between two vectors in \(\mathbb R^N\) (\(N>3\)) by
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*}
A geometric interpretation of \(\vect n\) is shown in Figure 1.13.
Using the algebraic rules Note 1.6 of the scalar product and the definition of the norm we get
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.
Definition1.14.Angles, orthogonal vectors.
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.6, 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.