ELIAS EBNER

  • Home
  • Blog
  • Courses
  • About

Linear Algebra

  • Vectors
    • Scalars
    • Vectors vs Sets
    • Addition and Subtraction
    • Scalar Multiplication
    • Zero Vectors
    • Linear Combinations
    • Real Dot Product
    • Length of a Vector
    • Orthogonal Vectors
    • Parallel Vectors

Real Dot Product

Another important operation that can be performed on vectors is the real dot product (or often just β€œdot product”). The reason I specify that it’s a real dot product is because if the vectors contain complex numbers, many properties of the operation change and don’t hold in the same way.

From now on, I will call the real dot product just β€œdot product” for simplicity, since that’s the most common operation and most of the time context confirms that we’re only concerning ourselves with real numbers.

The dot product is sometimes called inner product, but I found that β€œdot product” is the more common naming convention.

Definition

The dot product of two real vectors vβƒ—=[v1v2]\vec{v} = \begin{bmatrix} v_1 \\ v_2 \end{bmatrix}v=[v1​v2​​] and wβƒ—=[w1w2]\vec{w} = \begin{bmatrix} w_1 \\ w_2 \end{bmatrix}w=[w1​w2​​] is denoted by the notation vβƒ—β‹…wβƒ—\vec{v} \cdot \vec{w}vβ‹…w and is defined as

vβƒ—β‹…wβƒ—=v1w1+v2w2.\vec{v} \cdot \vec{w} = v_1 w_1 + v_2 w_2.vβ‹…w=v1​w1​+v2​w2​.

As you can see, the result of a dot product operation - which is performed between two vectors - is a scalar.

Commutativity

The order of the operands makes no difference, since

vβƒ—β‹…wβƒ—=v1w1+v2w2=w1v1+w2v2=wβƒ—β‹…vβƒ—.\begin{align*} \vec{v} \cdot \vec{w} &= v_1 w_1 + v_2 w_2 \\ &= w_1 v_1 + w_2 v_2 \\ &= \vec{w} \cdot \vec{v}. \end{align*}vβ‹…w​=v1​w1​+v2​w2​=w1​v1​+w2​v2​=wβ‹…v.​

Multidimensional Vectors

The definition above applies similarly to vectors with more than two dimensions.

Here is the dot product of two three-dimensional vectors, for instance:

vβƒ—β‹…wβƒ—=[v1v2v3]β‹…[w1w2w3]=v1w1+v2w2+v3w3.\begin{align*} \vec{v} \cdot \vec{w} &= \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} \cdot \begin{bmatrix} w_1 \\ w_2 \\ w_3 \end{bmatrix} \\ &= v_1 w_1 + v_2 w_2 + v_3 w_3. \end{align*}vβ‹…w​=​v1​v2​v3​​​⋅​w1​w2​w3​​​=v1​w1​+v2​w2​+v3​w3​.​

More generally, if v⃗\vec{v}v and w⃗\vec{w}w have nnn components:

vβƒ—β‹…wβƒ—=βˆ‘i=1nviwi\vec{v} \cdot \vec{w} = \sum_{i = 1}^n v_i w_ivβ‹…w=i=1βˆ‘n​vi​wi​

Example

Let me illustrate via an example with two two-dimensional vectors

vβƒ—=[2βˆ’1],wβƒ—=[βˆ’36].\vec{v} = \begin{bmatrix} 2 \\ -1 \end{bmatrix}, \vec{w} = \begin{bmatrix} -3 \\ 6 \end{bmatrix}.v=[2βˆ’1​],w=[βˆ’36​].

Their dot product is then given by

vβƒ—β‹…wβƒ—=[2βˆ’1]β‹…[βˆ’36]=2β‹…(βˆ’3)+(βˆ’1)β‹…6=βˆ’6βˆ’6=βˆ’12\begin{align*} \vec{v} \cdot \vec{w} &= \begin{bmatrix} 2 \\ -1 \end{bmatrix} \cdot \begin{bmatrix} -3 \\ 6 \end{bmatrix}\\ &= 2 \cdot (-3) + (-1) \cdot 6 \\ &= -6 - 6 \\ &= -12 \end{align*} vβ‹…w​=[2βˆ’1​]β‹…[βˆ’36​]=2β‹…(βˆ’3)+(βˆ’1)β‹…6=βˆ’6βˆ’6=βˆ’12​
This website does not collect personal data, does not use cookies, and does not perform any tracking.