Dot Product Intuition

I’m searching to develop the intuition (rather than memorization) in relating the two forms of a dot product (by an angle theta between the vectors and by the components of the vector ).

For example, suppose I have vector $\mathbf{a} = (a_1,a_2)$ and vector $\mathbf{b}=(b_1,b_2)$. What’s the physical or geometrical meaning that

$$a_1b_1 + a_2b_2 = |\mathbf{a}||\mathbf{b}|\cos(\theta)\;?$$

Why is multiplying $|\mathbf{b}|$ times $|\mathbf{a}|$ in direction of $\mathbf{b}$ the same as multiplying the first and second components of $\mathbf{a}$ and $\mathbf{b}$ and summing ?

I know this relationship comes out when we use the law of cosines to prove, but even then i cant get a intuition in this relationship.

This image clarifies my doubt:

Thanks

(with a negative dot product when the projection is onto $-\mathbf{b}$)

This implies that the dot product of perpendicular vectors is zero and the dot product of parallel vectors is the product of their lengths.

Now take any two vectors $\mathbf{a}$ and $\mathbf{b}$.

They can be decomposed into horizontal and vertical components $\mathbf{a}=a_x\mathbf{i}+a_y\mathbf{j}$ and $\mathbf{b}=b_x\mathbf{i}+b_y\mathbf{j}$:

and so

\begin{align*} \mathbf{a}\cdot \mathbf{b}&=(a_x\mathbf{i}+a_y\mathbf{j})\cdot(b_x\mathbf{i}+b_y\mathbf{j}), \end{align*}

but the perpendicular components have a dot product of zero while the parallel components have a dot product equal to the product of their lengths.

Therefore

$$\mathbf{a}\cdot\mathbf{b}=a_xb_x+a_yb_y.$$