Test whether two vectors are orthogonal
Compute the dot product and conclude orthogonality only when it is exactly zero. The idea in plain words, a worked example, and a check with the answers shown — part of the free Linear Algebra guides.
> Two vectors are perpendicular (orthogonal) exactly when their dot product is > exactly zero.
Not "small". Not "close to zero". Zero.
The reason comes from the cosine formula:. Both lengths are positive, so the cosine is zero exactly when the numerator is zero — and is precisely.
The test is an equality because that is what the cosine formula produces. Set: the right-hand side is zero, and, exactly. Every step is exact arithmetic — no approximation enters.
Now consider what happens if you treat a small product as zero. Say and both lengths are. Then, so is about — visually indistinguishable from a right angle. But it is not one, and the consequences are not small:
- Pythagoras needs the cross term to vanish exactly; here it does not, and is off by. - A projection formula assumes orthogonality; the error propagates. - In exact arithmetic, "nearly perpendicular" is simply a different case.
The lesson is not to distrust intuition — it is that the algebraic test is a single equality, and it is cheaper to check than any judgement of closeness.
Perpendicular.,:. Zero, so perpendicular.
Not perpendicular, and the reason is one term. The same with:. One entry moved by one, and the verdict flipped. Orthogonality is fragile in exactly this way.
Several perpendicular partners. For, both and give product. The second works because has no third component to pair with. There is no shortage of perpendicular vectors — a whole plane of them, in fact.
A pair that looks perpendicular but is not. and really are:. But and give, so no. Pictures cannot tell these apart reliably.
- Compute the dot product and conclude orthogonality only when it is exactly zero
- Reject 'small', 'nearly zero' and 'the picture looks square' as evidence
- Judge several candidates separately, since more than one can pass
- Recognise that a zero dot product never implies a zero vector
(a),. Perpendicular?
(b) and. Perpendicular?
(c) Is the zero vector perpendicular to every vector?
Answers
(a), so no.
(b), so yes — and note the lengths are and. Different lengths, still a right angle.
(c) Yes: for every. That is true but rarely what a question means — if you are testing orthogonality, check both vectors are nonzero first, or the answer carries no information.