Definition:Dot Product/General Context

Definition
Let $\mathbf a$ and $\mathbf b$ be vectors in a vector space $\mathbf V$ of $n$ dimensions:

where $\tuple {\mathbf e_1, \mathbf e_2, \ldots, \mathbf e_n}$ is the standard ordered basis of $\mathbf V$.

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


 * $\ds \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