3.6. Dot and cross products#
There are two ways in which we calculate the product of two vectors, these are known as the dot product and the cross product.
3.6.1. Dot product#
(The dot product)
The dot product (also known as the scalar product) of two vectors \(\vec{a}\) and \(\vec{b}\) in \(\mathbb{R}^n\), is defined by
The dot product of two vectors \(\vec{a}\) and \(\vec{b}\), can be defined in geometric terms by
where \(\theta\) is the angle between \(\vec{a}\) and \(\vec{b}\) (Fig. 3.9).
From the definition of the dot product, we can observe the following:
The dot product produces is a scalar quantity (an element of \(\mathbb{R}\))
The dot product of two perpendicular vectors is zero, we write \(\vec{a}\perp\vec{b}\) if \(\vec{a}\cdot\vec{b}=0\)
The dot product of two co-directional (parallel) vectors \(\vec{a}\) and \(\vec{b}\) is equal to \(\|\vec{a}\| \|\vec{b}\|\)
(Properties of the dot product)
For any vectors \(\vec{a},\vec{b},\vec{c}\) in \(\mathbb{R}^n\) and any scalar \(k\) in \(\mathbb{R}\):
The dot product is distributive over vector addition, i.e., \((\vec{a} + \vec{b})\cdot \vec{c} = \vec{a} \cdot \vec{c} + \vec{b} \cdot \vec{c}\)
For any scalar \(k\), \((k \vec{a})\cdot \vec{b} = \vec{a} \cdot (k \vec{b})= k (\vec{a} \cdot \vec{b})\)
The dot product is commutative, i.e., \(\vec{a} \cdot \vec{b} = \vec{b} \cdot \vec{a}\);
\(\vec{a} \cdot \vec{a} = \|\vec{a}\|^2 \geq 0 \text{ and } \vec{a} \cdot \vec{a} = 0 \iff \vec{a} = \vec{0}\)
Given the vectors \(\vec{a} = (1, 2, 3)^\mathsf{T}\) and \(\vec{b} = (3, -1, 0)^\mathsf{T}\). Calculate:
(i) \(\vec{a} \cdot \vec{b}\)
Solution
Using equation (3.3)
(ii) the angle between \(\vec{a}\) and \(\vec{b}\)
Solution
Using equation (3.4)
Note: angles should be expressed in radians at all times.
3.6.1.1. Matrix multiplication#
We have already seen that the multiplication of two matrices is defined by
You may note that the term in the summation is similar to the dot product. In fact, when we multiply two matrices together we are calculating the dot product between the rows of the left-hand matrix and the columns of the right-hand matrix, i.e.,
where \(\vec{a}_i\) is row \(i\) of \(A\) and \(\vec{b}_j\) is column \(j\) of \(B\).
3.6.2. The cross product#
(The cross product)
The cross product (also known as the vector product) of two vectors in \(\mathbb{R}^3\), \(\vec{a}=(a_1,a_2,a_3)^\mathsf{T}\) and \(\vec{b}=(b_1,b_2,b_3)^\mathsf{T}\) can be calculated using a determinant where
and \(\vec{i} = (1, 0, 0)^\mathsf{T}\), \(\vec{j} = (0, 1, 0)^\mathsf{T}\) and \(\vec{k} = (0, 0, 1)^\mathsf{T}\). The cross product between two vectors \(\vec{a}\) and \(\vec{b}\) returns a vector that is perpendicular to both \(\vec{a}\) and \(\vec{b}\).
(Properties of the cross product)
The cross product has the following properties:
\(\vec{a}\times \vec{b}\) produces a vector in the same space as \(\vec{a}\) and \(\vec{b}\)
\(\vec{a}\times \vec{b}\) produces a vector that is perpendicular to both \(\vec{a}\) and \(\vec{b}\)
\(\vec{a} \times \vec{b} = -(\vec{b} \times \vec{a})\) (i.e., there are two vectors perpendicular to \(\vec{a}\) and \(\vec{b}\) pointing in opposite directions)
If \(\vec{a}\) and \(\vec{b}\) are parallel vectors, then \(\vec{a}\times \vec{b} = \vec{0}\)
The self cross product of a vector is the zero vector, i.e., \(\vec{a} \times \vec{a} = \vec{0}\)
The cross product is not commutative, i.e., \(\vec{a} \times \vec{b} \neq \vec{b} \times \vec{a}\)
The cross product is distributive over addition, i.e., \(\vec{a} \times (\vec{b} + \vec{c}) = (\vec{a} \times \vec{b}) + (\vec{a} \times \vec{c})\)
The cross product is not associative, i.e., \(\vec{a} \times (\vec{b} \times \vec{c}) \neq (\vec{a} \times \vec{b}) \times \vec{c}\)
Calculate the cross product between the vectors \(\vec{a} = (1, 2, 3)^\mathsf{T}\) and \(\vec{b} = (4, 5, 6)^\mathsf{T}\) and show that it is perpendicular to both \(\vec{a}\) and \(\vec{b}\).
Solution
To show that \(\vec{a} \times \vec{b} \perp \vec{a}, \vec{b}\) we calculate the dot product
therefore \(\vec{a} \times \vec{b}\) is perpendicular to both \(\vec{a}\) and \(\vec{b}\).