# Matrix Form of Vectors and The Dot Product

So far we have looked at vectors in $\mathbb{R}^n$ in the form $\vec{u} = (u_1, u_2, ..., u_n)$, however, we can also write a vector as either a $1 \times n$ row matrix or an $n \times 1$ column matrix (omitting the vector arrows to denote a vector in matrix form)

(1)Sometimes this notation is useful as many vector operations are illustrated the same way if the vectors are in matrix form, for example consider the vector operation of addition, that is $\vec{u} + \vec{v} = (u_1 + v_1, u_2 + v_2, ..., u_n + v_n)$ in matrix form:

(2)# The Dot Product in Matrix Form

Let $\vec{u}, \vec{v} \in \mathbb{R}^n$, and write $u = \begin{bmatrix}u_1 \\ u_2 \\ \vdots \\ u_n\end{bmatrix}$ and $v = \begin{bmatrix}v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix}$. The dot product $\vec{u} \cdot \vec{v}$ can be obtained by the following formula:

(3)Therefore we obtain that $\vec{u} \cdot \vec{v} = v^T u$.

Furthermore, consider an $n \times n$ matrix $A$ and the following equivalences:

(4)We thereby get the formulas $Au \cdot v = u \cdot A^T v$ and $u \cdot Av = A^T u \cdot v$.