Skip to content

Quadratic Form

Definition

A quadratic form on Rn\mathbb{R}^n is a function Q ⁣:Rn→RQ\colon\mathbb{R}^n\to\mathbb{R} of the form

Q(v)=v⊤Av=∑i=1n∑j=1naijvivj,Q(\boldsymbol{v})=\boldsymbol{v}^{\top}\boldsymbol{A}\boldsymbol{v}=\sum_{i=1}^n\sum_{j=1}^n a_{ij}v_iv_j,

where A=(aij)\boldsymbol{A}=(a_{ij}) is a real n×nn\times n matrix and v\boldsymbol{v} a column vector. Equivalently, QQ is a polynomial in v1,…,vnv_1,\ldots,v_n whose terms all have degree exactly two (a homogeneous polynomial of degree two, the zero polynomial included, which comes from A=0\boldsymbol{A}=\boldsymbol{0}). The matrix can always be chosen symmetric, and the symmetric choice is unique: it is called the matrix of QQ.


Interpretation

A quadratic form is the many-variable version of ax2ax^2: every term has degree exactly two, so Q(cv)=c2Q(v)Q(c\boldsymbol{v})=c^2Q(\boldsymbol{v}), and a symmetric matrix stores the coefficients. The main question about a quadratic form is its sign in different directions.

Two panels of level curves: nested ellipses of x1 squared plus 2 x2 squared, positive definite, and hyperbolas of x1 squared minus x2 squared with asymptotes, indefinite.

The figure shows curves on which the form is constant. For x12+2x22x_1^2+2x_2^2, with matrix diag⁡(1,2)\operatorname{diag}(1,2), they are nested ellipses: the value is positive in every direction. For x12−x22x_1^2-x_2^2, with matrix diag⁡(1,−1)\operatorname{diag}(1,-1), they are hyperbolas: the form is positive near the x1x_1-axis, negative near the x2x_2-axis and zero on the dashed lines x2=±x1x_2=\pm x_1. Because Q(cv)=c2Q(v)Q(c\boldsymbol{v})=c^2Q(\boldsymbol{v}), the sign is the same along each line through the origin, apart from the origin itself.

The shading shows v⊤Av\boldsymbol{v}^{\top}\boldsymbol{A}\boldsymbol{v} over the plane: colour for positive values, the other colour for negative ones. Change the entries of the symmetric matrix and drag v\boldsymbol{v}.

Change a11a_{11}, a12a_{12}, a22a_{22} and turn the surface: the sign of v⊤Av\boldsymbol{v}^{\top}\boldsymbol{A}\boldsymbol{v} in each direction shows up as a bowl, a cap, a saddle, a ridge or trough with a flat direction, or the flat plane for the zero form.

The transpose turns the column vector v\boldsymbol{v} into a row, so the matrix products in v⊤Av\boldsymbol{v}^{\top}\boldsymbol{A}\boldsymbol{v} have sizes 1×n1\times n, n×nn\times n and n×1n\times1 and produce a number. For n=2n=2 and a symmetric A=(abbd)\boldsymbol{A}=\begin{pmatrix}a&b\\b&d\end{pmatrix}, expanding gives av12+2bv1v2+dv22av_1^2+2bv_1v_2+dv_2^2: the diagonal entries are the coefficients of the squares, and each off-diagonal entry carries half of a mixed term.

Sorting forms by their signs gives the definiteness of the matrix. Quadratic forms return in calculus of several variables, where the second-order term of a Taylor approximation is a quadratic form in the displacement.

A common slip is to put the whole coefficient of a mixed term into the matrix. The form 3x2+4xy+5y23x^2+4xy+5y^2 has the symmetric matrix (3225)\begin{pmatrix}3&2\\2&5\end{pmatrix}; the matrix (3445)\begin{pmatrix}3&4\\4&5\end{pmatrix} would give 8xy8xy.


Key Results

  • Different matrices can give the same form: v⊤Av=v⊤Aˉv\boldsymbol{v}^{\top}\boldsymbol{A}\boldsymbol{v}=\boldsymbol{v}^{\top}\bar{\boldsymbol{A}}\boldsymbol{v} for Aˉ=12(A+A⊤)\bar{\boldsymbol{A}}=\tfrac{1}{2}(\boldsymbol{A}+\boldsymbol{A}^{\top}), because v⊤Av=v⊤A⊤v\boldsymbol{v}^{\top}\boldsymbol{A}\boldsymbol{v}=\boldsymbol{v}^{\top}\boldsymbol{A}^{\top}\boldsymbol{v}. The symmetric matrix Aˉ\bar{\boldsymbol{A}} is the only symmetric one with this form.
  • In terms of the symmetric matrix, the coefficient of vi2v_i^2 is aiia_{ii} and the coefficient of vivjv_iv_j (i≠ji\ne j) is 2aij2a_{ij}.
  • Quadratic forms are used to define definiteness of symmetric matrices.

Examples

  • If A=In\boldsymbol{A}=\boldsymbol{I}_n, then v⊤Av=∥v∥2\boldsymbol{v}^{\top}\boldsymbol{A}\boldsymbol{v}=\|\boldsymbol{v}\|^2.
  • For A=(100−1)\boldsymbol{A}=\begin{pmatrix}1&0\\0&-1\end{pmatrix}, v⊤Av=x2−y2\boldsymbol{v}^{\top}\boldsymbol{A}\boldsymbol{v}=x^2-y^2.
  • Q(x,y)=3x2+4xy+5y2Q(x,y)=3x^2+4xy+5y^2 has the symmetric matrix (3225)\begin{pmatrix}3&2\\2&5\end{pmatrix}; the non-symmetric (3405)\begin{pmatrix}3&4\\0&5\end{pmatrix} gives the same form.

Prerequisites

Sources

Aliases: homogeneous quadratic polynomial Symbols: real numbers, sum

Last updated: 27 October 2026 11:52