Dotproduct of two vectors

Two vectors in 2-dimensional space:

$$ \begin{aligned} \mathbf{a} &= (a_1, a_2), \text{ in }\mathbb{R}^2\\ \mathbf{b} &= (b_1, b_2), \text{ in }\mathbb{R}^2 \end{aligned}$$

The dot-product is the scalar (a real number) resulting of taking the sum of the products of the corresponding components of the two vectors:

$$ \begin{aligned} c &= \mathbf{a} \cdot \mathbf{b}\\ &= a_1 b_1 + a_2 b_2\\ &= {\lvert\lvert{a}\lvert\lvert}\text{ }{\lvert\lvert{b}\lvert\lvert}\text{ }cos(\alpha)\\ \end{aligned}$$

A sample:


$${}$$
You can drag the two red dots to change the vectors $a$ and $b$ and see how this affects the result of the dot product

The Dotproduct of two vectors is commutative

Two vectors in 2-dimensional space:

$$ \begin{aligned} \mathbf{a} &= (a_1, a_2), \text{ in }\mathbb{R}^2\\ \mathbf{b} &= (b_1, b_2), \text{ in }\mathbb{R}^2 \end{aligned}$$

The dot-product is commutative:

$$ \begin{aligned} c &= \mathbf{a} \cdot \mathbf{b}\\ &= a_1 b_1 + a_2 b_2\\ &= b_1 a_1 + b_2 a_2\\ &= \mathbf{b} \cdot \mathbf{a}\\ \end{aligned}$$

A sample:

$${}$$

The Dotproduct is distributive

Three vectors in 2-dimensional space:

$$ \begin{aligned} \mathbf{a} &= (a_1, a_2), \text{ in }\mathbb{R}^2\\ \mathbf{b} &= (b_1, b_2), \text{ in }\mathbb{R}^2\\ \mathbf{c} &= (c_1, c_2), \text{ in }\mathbb{R}^2 \end{aligned}$$

The dot-product is distributive:

$$ \begin{aligned} d &= \mathbf{a} \cdot (\mathbf{b}+\mathbf{c})\\ &= a_1 (b_1 + c_1) + a_2 (b_2 + c_2)\\ &= a_1 b_1 + a_1 c_1 + a_2 b_2 + a_2 c_2\\ &= a_1 b_1 + a_2 b_2 + a_1 c_1 + a_2 c_2\\ &= \mathbf{a} \cdot \mathbf{b} + \mathbf{a} \cdot \mathbf{c}\\ \end{aligned}$$

A sample:

$${}$$