Prove that the Dot Product is Commutative: $\mathbf{v}\cdot \mathbf{w}= \mathbf{w} \cdot \mathbf{v}$
Problem 637
Let $\mathbf{v}$ and $\mathbf{w}$ be two $n \times 1$ column vectors.
(a) Prove that $\mathbf{v}^\trans \mathbf{w} = \mathbf{w}^\trans \mathbf{v}$.
(b) Provide an example to show that $\mathbf{v} \mathbf{w}^\trans$ is not always equal to $\mathbf{w} \mathbf{v}^\trans$.
Sponsored Links
Contents
Solution.
(a) Prove that $\mathbf{v}^\trans \mathbf{w} = \mathbf{w}^\trans \mathbf{v}$.
Suppose the vectors have component
\[\mathbf{v} = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix} \, \mbox{ and } \mathbf{w} = \begin{bmatrix} w_1 \\ w_2 \\ \vdots \\ w_n \end{bmatrix}.\]
Then,
\[\mathbf{v}^\trans \mathbf{w} = \begin{bmatrix} v_1 & v_2 & \cdots & v_n \end{bmatrix} \begin{bmatrix} w_1 \\ w_2 \\ \vdots \\ w_n \end{bmatrix} = \sum_{i=1}^n v_i w_i,\]
while
\[\mathbf{w}^\trans \mathbf{v} = \begin{bmatrix} w_1 & w_2 & \cdots & w_n \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix} = \sum_{i=1}^n w_i v_i.\]
We can see that they are equal because $v_i w_i = w_i v_i$.
(b) Provide an example to show that $\mathbf{v} \mathbf{w}^\trans$ is not always equal to $\mathbf{w} \mathbf{v}^\trans$.
For the counterexample, let $\mathbf{v} = \begin{bmatrix} 1 \\ 0 \end{bmatrix}$ and $\mathbf{w} = \begin{bmatrix} 0 \\ 1 \end{bmatrix}$. Then
\[\mathbf{v} \mathbf{w}^\trans = \begin{bmatrix} 1 \\ 0 \end{bmatrix} \begin{bmatrix} 0 & 1 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\] while
\[\quad \mathbf{w} \mathbf{v}^\trans = \begin{bmatrix} 0 \\ 1 \end{bmatrix} \begin{bmatrix} 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}.\]
Comment.
Recall that for two vectors $\mathbf{v}, \mathbf{w} \in \R^n$, the dot product (or inner product) of $\mathbf{v}, \mathbf{w}$ is defined to be
\[\mathbf{v}\cdot \mathbf{w}:=\mathbf{v}^{\trans} \mathbf{w}.\]
Part (a) of the problem deduces that the dot product is commutative. This means that we have
\[\mathbf{v}\cdot \mathbf{w}= \mathbf{w} \cdot \mathbf{v}.\]
In fact, we have
\begin{align*}
\mathbf{v}\cdot \mathbf{w}= \mathbf{v}^\trans \mathbf{w} \stackrel{\text{(a)}}{=} \mathbf{w}^\trans \mathbf{v} \mathbf{w} \cdot \mathbf{v}.
\end{align*}
Also, notice that while $\mathbf{v} \mathbf{w}^\trans$ is not always equal to $\mathbf{w} \mathbf{v}^\trans$, we know that $(\mathbf{v} \mathbf{w}^\trans)^\trans = \mathbf{w} \mathbf{v}^\trans$.
Add to solve later
Sponsored Links