Geometry and algebra of linear maps, vectors, and matrices
The dot product takes two vectors and returns a single number. The recipe is simple: multiply matching components and add up the results. That plain arithmetic carries a geometric meaning. The dot product measures how much two arrows point the same way.
The right-hand form is the one to lean on. |a| and |b| are the lengths, and θ is the angle between the arrows. So the sign of the dot product reads off the geometry instantly: positive means the arrows lean the same way (θ < 90°), negative means they oppose (θ > 90°), and exactly zero means they are perpendicular. That last case comes up again and again.
Picture pushing a shopping cart while the wind blows. The dot product of your push and the wind tells you how aligned the two arrows are: it is large and positive when the wind helps you along, zero when the wind blows straight across your path doing no work, and negative when it shoves back against you. Read as a similarity score, a bigger dot product simply means "these two arrows agree more."