Background
Compact preliminaries the main sections rely on. This is a reference card, not a course: each entry states facts and proves the short ones, so that no section ever has to interrupt its subject to re-teach them. Entries are added when a section first needs them.
The dot product
For , the dot product (inner product) is
and the Euclidean norm is .
Facts (each immediate from the definition):
- Symmetry: .
- Linearity in each argument: for any scalar .
- Positivity: , with equality iff .
- Expansion of a sum (used constantly; it is the law of cosines in disguise):
Proof of 4. Expand using linearity in each argument and symmetry: . ∎
Geometrically, where is the angle between the vectors — the dot product measures alignment. This reading is justified by the next entry, which shows the ratio always lies in .
The Cauchy-Schwarz inequality
Theorem. For all ,
with equality iff one vector is a scalar multiple of the other.
Proof. If both sides are zero. Otherwise, for every , positivity and the expansion identity give
The right-hand side is a quadratic in that is never negative, so its discriminant is at most zero:
which is the claim after rearranging and taking square roots. Equality of the discriminant means the quadratic has a real root , i.e. , i.e. . ∎
Used in: the perceptron convergence theorem (Step 3 — alignment cannot exceed length).
Calculus
Planned. Partial derivatives, the gradient, the chain rule, and first-order Taylor approximation — added when The logistic-loss gradient and Gradient descent land.
Probability
Planned. Random variables, expectation and variance, independence, the Bernoulli and Gaussian distributions, and Bayes' rule — added when The data-generating process and Maximum likelihood estimation land.
Convexity and Lagrange duality
Planned. Convex sets and functions, Lagrange multipliers, and the duality facts needed by Duality and the kernel SVM — added before that note is written.