After undergrads, many of my knowledge have lost, recently I’m reviewing some of the concepts. Here I show an example of dot products for 2 vectors with length 2 to help understand the idea of dot product (not a proof).
Given $\mathbf{v_1} = \begin{bmatrix} i_1 \\ j_1 \end{bmatrix}, \mathbf{v_2} = \begin{bmatrix} i_2 \\ j_2 \end{bmatrix}$
Shown below:
V1 | V2 |
---|---|
So that dot product is
$$ \begin{align*} \mathbf{v_1} \cdot \mathbf{v_2} & = i_1\cdot i_2 + j_1\cdot j_2 \\ & = |\mathbf{v_1}|\sin\theta_1\cdot|\mathbf{v_2}|\sin \theta_2 + |\mathbf{v_1}|\cos\theta_1\cdot|\mathbf{v_2}|\cos \theta_2 \\ & = |\mathbf{v_1}||\mathbf{v_2}|(\sin\theta_1\cdot\sin\theta_2+\cos\theta_1\cdot\cos\theta_2) \end{align*} $$Then by cosine identity, which is $\cos(\theta_1-\theta_2) = \cos\theta_1\cdot\cos\theta_2+\sin\theta_1\cdot\sin\theta_2$, we get
$$\begin{align} \mathbf{v_1} \cdot \mathbf{v_2} & = |\mathbf{v_1}||\mathbf{v_2}|\cos(\theta_1-\theta_2) \\ & = |\mathbf{v_1}||\mathbf{v_2}|\cos(\Delta\theta) \\ & = |\mathbf{v_1}|\cos(\Delta\theta)\cdot|\mathbf{v_2}|\end{align}$$When put two vectors together, we see the intuitive meaning of it, which is multiplication of the length of projection of $\mathbf{v_1}$ on $\mathbf{v_2}$ with the length of $\mathbf{v_2}$.
Which is a scale related to the angle between two vectors (more specifically, in what degree they are in the same line) and the length between them. So when people only care about the level of parallel, they do cosine similarity:
Hope this example help you feel more trivia about the operation, it does for me a little bit. If not, let’s go through an real life example:
Say MJ is performing his Anti-Gravity Lean toward a line on the ground. Let MJ be $\mathbf{v_1}$ and the line be $\mathbf{v_2}$ (we view from aside), there’s sunshine above MJ head. We observe this performance from a location orthogonal to the plane formed by standing MJ and the line. $\cos\Delta\theta\cdot\mathbf{v_1}$ is the shadow of MJ on the line, the more parallel MJ is to the line, the longer his shadow is, and therefore the larger the dot product of MJ and the line would be.
To MJ, the dot product might be something correlated to his sense of the length of the line (when the line is beneath him). Since the more parallel they are, the longer the line is in his eyes.
Note: this is not a formal proof, for formal proof you can see here