Dot product

.....

Dot product as correlation

Here’s how the dot product acts like a measure of “correlation” or alignment between two vectors v and w. Recall

v⋅w=∑i=1nviwi.

To illustrate, we’ll use

v1=[−3,−2,−1,0,1,2,3]

and three choices of v2:

  1. Positive Correlation
    v2=[−3,−2,−1,0,1,2,3]
    v1⋅v2=28
    points roughly along the same “trend.”

  2. Negative Correlation
    v2=[3,2,1,0,−1,−2,−3]
    v1⋅v2=−28
    one increases while the other decreases.

  3. Zero Correlation
    v2=[1,1,1,1,1,1,1]
    v1⋅v2=0
    balanced ups and downs cancel out—no net alignment.