Quadratic Functions
A quadratic function on has every term of degree exactly two. That means terms like (a variable squared) or (a product of two different variables). The general quadratic function can be written using a matrix: where is an matrix.
Expanding the matrix product: . The diagonal terms contribute the squared terms, while the off-diagonal terms (for ) contribute the cross terms. For example, if :
A general second-degree function includes a quadratic part, a linear part, and a constant: . This is the most general polynomial of degree on .
Formal View
Example: is a quadratic form in three variables.
Why This Matters
Quadratic functions are the simplest non-trivial functions to optimize — they appear everywhere energy, error, or curvature is measured.
- Least-squares regression: is a quadratic function of .
- Elastic potential energy: where is the stiffness matrix.
- Portfolio variance: is a quadratic function of portfolio weights.
Quiz
For the quadratic form with , what is ?
The function is a pure quadratic form (no linear or constant terms).
Common Mistakes
- Forgetting that sums over ALL pairs , including both and when .
- Confusing a quadratic function with a quadratic equation — the function itself is not an equation.