Quant GT
Browse all lessons
Section 17 · Lesson 17.1

Vectors, Norms, and Inner Products

The geometry of vectors and what 'distance' means.

A vector in Rn\mathbb{R}^n is an ordered tuple of real numbers. Norms measure length and inner products measure alignment.

The Euclidean (L2L_2) norm is ∥x∥2=∑ixi2\|x\|_2 = \sqrt{\sum_i x_i^2}. Other useful norms include the L1L_1 norm ∑i∣xi∣\sum_i |x_i| (used in Lasso) and the L∞L_\infty norm max⁡i∣xi∣\max_i |x_i| (max absolute deviation).

The inner product ⟨x,y⟩=∑ixiyi\langle x, y \rangle = \sum_i x_i y_i measures alignment. Cosine similarity ⟨x,y⟩/(∥x∥∥y∥)\langle x, y\rangle / (\|x\| \|y\|) ignores magnitude and just captures direction. The Cauchy-Schwarz inequality bounds ∣⟨x,y⟩∣≤∥x∥ ∥y∥|\langle x, y\rangle| \le \|x\|\, \|y\|, with equality iff the vectors are colinear.

In finance, vectors of asset weights, returns, and factor loadings live in Rn\mathbb{R}^n. Norms quantify portfolio risk and turnover; inner products underlie portfolio variance and correlation calculations.