Dot product

… angle between and
equivalent to:

The dot product is the unnormalized version of cosine similarity (equivalent up to scale).
It measures how parallel two vectors are. As opposed to the cross product, which measures how perpendicular two vectors are.

The dot product measures the similarity/overlap between two vectors.

Naturally, it shows up everywhere you have similarity-weighted readouts, like associative memory.
It also shows up every time a neuron computes a weighted sum of its inputs , which leads to the interpretation of neurons as feature detectors, i.e. we can view the neurons weights as a prototype/template the neuron is looking for.

The relation to the cosine and many of the dot product's properties become clear geometrically

“Project” one vector onto another and multiply the length of the other with the resulting vector.
The head of the projected vector follows from drawing an orthogonal line from the head of one vector to another.
Order does not matter.

Dot product is positive if they point into the same direction, negative for opposing directions:

The projected vector has length if the vectors are perpendicular:

Indifference of order:

→ For two vectors on the unit circle, this projection is the cosine of the angle between them.

Scaling one of those vectors by 2 → dot product is exactly 2x bigger:

Dot product is a type of inner product



Intuition for the cosine formula
khan ac yt

Multiplying the length of times the amount of thats going in the same direction as

If they are perfectly parallel, the dot-product is simply , so simply their lengths multiplied!

TODO go through this rq on paper

https://youtu.be/tdwFdzVqito (cosine formula, dot vs cross) 3b1b

See also Matrix Vector Product Intuition