Definition:Dot Product/General Context

Definition
Let $\mathbf a$ and $\mathbf b$ be vectors in the real Euclidean space $\R^n$.

The dot product of $\mathbf a$ and $\mathbf b$ is defined as:


 * $\displaystyle \mathbf a \cdot \mathbf b = a_1 b_1 + a_2 b_2 + \cdots + a_n b_n = \sum_{i \mathop = 1}^n a_i b_i$

If the vectors are represented as column matrices:
 * $\mathbf a = \begin{bmatrix} a_1 \\ a_2 \\ \vdots \\ a_n \end{bmatrix}, \mathbf b = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_n \end{bmatrix}$

we can express the dot product as:
 * $\mathbf a \cdot \mathbf b = \mathbf a^\intercal \mathbf b$

where:
 * $\mathbf a^\intercal = \begin{bmatrix} a_1 & a_2 & \cdots & a_n \end{bmatrix}$ is the transpose of $\mathbf a$
 * the operation between the matrices is the matrix product.

Also see

 * Equivalence of Definitions of Dot Product