Answers · The mathematics underneath
What does a negative dot product tell you about two vectors?
In shortA negative dot product means the angle between the vectors is greater than a right angle, so they point broadly apart rather than together.
A negative dot product means the angle between the two vectors is obtuse: greater than a right angle and less than a straight line. In ordinary language the vectors point broadly apart, not broadly together, and the negative sign is the arithmetic way of saying that one of them has a component running against the other. It is a statement about direction, not about the distance between any points the vectors might represent.
The right-hand side has two lengths and a cosine. Lengths are never negative, so after dividing by , assuming neither vector is zero, the sign of is exactly the sign of . The cosine is positive for angles below , zero at , and negative for angles between and . A negative dot product therefore places the angle in that last interval. It does not say the angle is exactly : that extreme is reached only when the vectors are exact opposites and the dot product equals .
Take and . The coordinatewise products are and , so . The lengths are and . Dividing gives , and . The vectors are not pointing in exactly opposite directions, but the angle is past a right angle, which is what the negative sign reports.
You can also read the calculation as a tally of agreement and disagreement coordinate by coordinate. Matching signs contribute positive products; opposing signs contribute negative products. The total is net agreement, so a negative total means the opposing contributions outweigh the aligned ones. That is why a single strongly opposing coordinate can make the whole dot product negative even when another coordinate agrees, as with and , whose products are and and whose sum is .
The common misreading is to treat a negative value as "no similarity" or as a failed comparison. Zero is the value that means perpendicular, and perpendicular is the usual arithmetic picture of two unrelated directions. Negative is stronger and more specific: the vectors are on opposite sides of perpendicular. Nor does a negative sum require every coordinate pair to oppose. One coordinate can agree and another can disagree strongly enough to make the total negative, so the sign describes the net direction of the pair, not a uniform opposition in every coordinate.
The sign survives scaling; the magnitude does not. Keep and replace by . Then , twice as negative as before. But , so , the same cosine and the same angle. The extra negative size came from the longer second vector, not from a more opposite direction. This is why the sign is safe to read as a side of perpendicular while the raw number is not safe to compare across vectors of different lengths.
The reading fails when either vector is zero, because the angle is undefined and the formula divides by a zero length. It also cannot occur if every coordinate in both vectors is non-negative: every product is then non-negative and the sum is non-negative, so no obtuse angle is available. In many dimensions, two unrelated vectors tend to have a dot product near zero rather than clearly negative; a negative value is evidence of opposition, not merely evidence of dissimilarity.
If both vectors have length one, the division by lengths does nothing and the dot product is the cosine itself. A negative dot product then has magnitude at most one, and its value is the cosine of the obtuse angle. For general vectors, recover the angle with . The sign of the inside decides the answer: negative inside means obtuse, zero means right, positive means acute.
Worth keeping
- A negative dot product means the angle between the vectors is obtuse, so they point broadly apart.
- Zero dot product means perpendicular, not negative; negative is more specific than merely unrelated.
- For unit vectors the dot product is the cosine, so its sign is the sign of the cosine.
Where this goes next
This question is one step of Vectors, Distance and Similarity, a course that works through its subject from the beginning. The page that teaches this part of it is One Number From Two Vectors, and it reads the whole way through whether or not you have an account.
What an account changes is the practice: problems standing under every idea, marked with a reason rather than a tick, in a copy of the course that is yours.
Read that pageThe whole courseOther questions people ask about this
- Why does cosine similarity ignore how long the vectors are?Cosine similarity compares direction only because dividing by both vector lengths cancels their size exactly, leaving the angle between them.
- Why does Manhattan distance give a different answer from straight-line distance?They measure different things: one is the straight gap, the other is the total along a grid, so they disagree whenever the points differ in more than one coordinate.
- Why do distances between random points become almost equal in high dimensions?Each coordinate adds a small independent amount to the squared distance, and many such amounts average out, so typical distances grow while their spread does not keep up.
- What's the difference between a vector as a point and a vector as a direction?A vector as a point is a location, while a vector as a direction is an arrow from the origin whose length and orientation matter; the same numbers can be read either way.
- What is the difference between variance and standard deviation?They measure the same spread: variance is the average squared distance from the mean, standard deviation is its square root, so you report the standard deviation and calculate with the variance.
- How do you make a vague claim precise enough to tell whether it's true?Fix what is being talked about, what is asserted, which cases are covered and the cut-off, then name an observation that would prove it false.