Inner Products and Orthogonality
A way to measure angle and length between vectors using pure arithmetic — and the special case of orthogonality, where two directions carry completely unrelated information.
Prerequisites: Vector Spaces and Bases
Two trading signals might overlap heavily in what they capture, or might be measuring completely independent things — and correlation, the number analysts use to check this, is secretly a rescaled inner product. Inner products give vectors a notion of angle and length using nothing but multiplication and addition, and the special case of a zero inner product — orthogonality — is the mathematical meaning of "these two directions share nothing in common."
An analogy: how much two flashlights overlap
Point two flashlights at a wall from the same spot. If they point in exactly the same direction, their beams overlap completely. If they point at right angles to each other, their beams don't overlap at all — knowing where one beam hits tells you nothing about where the other hits. Anywhere in between, the beams partially overlap, and the amount of overlap can be measured precisely. The inner product of two vectors captures exactly this idea of overlap: large and positive when vectors point the same way, zero when they point in genuinely unrelated ("perpendicular") directions, negative when they point opposite ways.
The mathematics, one symbol at a time
For vectors and , the standard inner product (dot product) is
where and are the vectors' lengths and is the angle between them. In words: multiply corresponding entries and sum them, and the result equals the product of the two lengths scaled by how aligned they are (via the cosine of the angle between them) — fully aligned vectors () give the largest possible positive value, and perpendicular vectors give zero regardless of their lengths. Two vectors are orthogonal when , meaning : they point in genuinely independent directions, and neither has any component lying along the other. Correlation between two return series is exactly this cosine, computed on the vectors after subtracting their means — correlation is the cosine of the angle between two (mean-centered) data vectors.
Worked example 1: computing an inner product and checking orthogonality
Let and . Inner product: . These two vectors are exactly orthogonal — perpendicular in the plane — which you can also see by noting 's direction is "3 right, 4 up" and 's is "4 right, 3 down," a 90° rotation of the first. Now check against : , so and are not orthogonal — they share some common direction.
Worked example 2: correlation as a cosine
Two mean-centered daily return series (deviations from their own averages) are and . Inner product: . Lengths: , . Correlation . A correlation of 0.866 corresponds to an angle of about between the two return vectors — strong alignment, far from the 90° that would signal orthogonal (uncorrelated) signals.
Drag the correlation slider above: as moves toward 1 or −1, the scatter tightens into a line — the two variables' underlying vectors are nearly aligned or nearly opposite — and as approaches 0, the cloud rounds out, matching two vectors sitting near 90° apart.
What this means in practice
Orthogonality is the goal behind constructing "clean," non-overlapping factors or signals — a signal orthogonalized against known market factors carries genuinely new information rather than repackaging an existing exposure (see Orthogonalising a Signal Against Known Factors). Inner products also underlie projection, least-squares fitting, and the Gram-Schmidt process for building an orthogonal basis from any starting set of vectors.
The inner product measures both length and alignment between two vectors at once, equaling ; two vectors are orthogonal exactly when this is zero, meaning they point in genuinely unrelated directions — and correlation between return series is precisely this cosine computed on mean-centered data.
Orthogonal (zero linear correlation) does not mean unrelated in every sense. Two vectors, or two return series, can have zero inner product yet still be strongly related through a nonlinear pattern — for instance, and (a perfect parabola) have an inner product of , orthogonal by this measure, despite being an exact deterministic function of . Orthogonality only rules out linear relationships; always ask whether a nonlinear dependence could still be hiding behind a zero inner product.
Related concepts
Practice in interviews
Further reading
- Strang, Introduction to Linear Algebra, ch. 4
- Axler, Linear Algebra Done Right, ch. 6