Basic Concepts of Quadratic Forms

Definition of a Quadratic Form

The Concept of a Quadratic Form

Quadratic Form

Let x1,x2,…,xnx_1, x_2, \dots, x_n be nn variables. A function of the form Q(x1,x2,…,xn)=∑i=1n∑j=1naijxixjQ(x_1, x_2, \dots, x_n) = \sum_{i=1}^n \sum_{j=1}^n a_{ij}x_ix_j

is called a quadratic form, where aija_{ij} are real numbers satisfying aij=ajia_{ij} = a_{ji} (symmetry).

Examples of Quadratic Forms

Example 1: Q(x1,x2)=2x12+4x1x2+3x22Q(x_1, x_2) = 2x_1^2 + 4x_1x_2 + 3x_2^2 is a quadratic form.

Example 2: Q(x1,x2,x3)=x12+2x22+3x32+2x1x2+2x1x3+4x2x3Q(x_1, x_2, x_3) = x_1^2 + 2x_2^2 + 3x_3^2 + 2x_1x_2 + 2x_1x_3 + 4x_2x_3 is a quadratic form.

Matrix Representation of a Quadratic Form

Definition of the Matrix Representation

Matrix Representation of a Quadratic Form

Every quadratic form can be represented as Q(x)=xTAxQ(x) = x^TAx

where x=(x1x2⋮xn)x = \begin{pmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{pmatrix} and AA is a symmetric matrix.

How to Build the Matrix

Steps:

  1. The diagonal entry aiia_{ii} is the coefficient of xi2x_i^2
  2. The off-diagonal entry aij=ajia_{ij} = a_{ji} is half of the coefficient of xixjx_ix_j

Example

Example 3: Write the quadratic form Q(x1,x2)=2x12+4x1x2+3x22Q(x_1, x_2) = 2x_1^2 + 4x_1x_2 + 3x_2^2 in matrix form.

Solution:

  1. Diagonal entries: a11=2a_{11} = 2, a22=3a_{22} = 3
  2. Off-diagonal entries: a12=a21=42=2a_{12} = a_{21} = \frac{4}{2} = 2
  3. Matrix representation: A=(2223)A = \begin{pmatrix} 2 & 2 \\ 2 & 3 \end{pmatrix}
  4. The quadratic form: Q(x)=xTAx=(x1x2)(2223)(x1x2)Q(x) = x^TAx = \begin{pmatrix} x_1 & x_2 \end{pmatrix} \begin{pmatrix} 2 & 2 \\ 2 & 3 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}

Basic Properties of Quadratic Forms

Symmetry

Property 1: The matrix representation of a quadratic form is a symmetric matrix.

Proof: Since aij=ajia_{ij} = a_{ji}, we have AT=AA^T = A.

Behaviour Under a Linear Change of Variables

Property 2: If x=Pyx = Py is a linear change of variables, then Q(x)=xTAx=(Py)TA(Py)=yT(PTAP)yQ(x) = x^TAx = (Py)^TA(Py) = y^T(P^TAP)y

Classification of Quadratic Forms

Classification of Quadratic Forms
  • Positive definite quadratic form: Q(x)>0Q(x) > 0 for every nonzero vector xx
  • Negative definite quadratic form: Q(x)<0Q(x) < 0 for every nonzero vector xx
  • Positive semidefinite quadratic form: Q(x)≥0Q(x) \geq 0 for every vector xx
  • Negative semidefinite quadratic form: Q(x)≤0Q(x) \leq 0 for every vector xx
  • Indefinite quadratic form: neither positive definite nor negative definite

Geometric Meaning of Quadratic Forms

Quadratic Forms in Two Dimensions

Geometric meaning: A quadratic form Q(x1,x2)=ax12+2bx1x2+cx22Q(x_1, x_2) = ax_1^2 + 2bx_1x_2 + cx_2^2 in two variables describes a conic section in the plane.

Classification:

  • Positive definite: ellipse
  • Negative definite: imaginary ellipse
  • Indefinite: hyperbola
  • Degenerate: parabola or straight line

Quadratic Forms in Three Dimensions

Geometric meaning: A quadratic form in three variables describes a quadric surface in space.

Classification:

  • Positive definite: ellipsoid
  • Negative definite: imaginary ellipsoid
  • Indefinite: hyperboloid or paraboloid

Reducing a Quadratic Form

Completing the Square

Method: Reduce a quadratic form to a standard form by completing the square.

Example 4: Reduce the quadratic form Q(x1,x2)=x12+4x1x2+4x22Q(x_1, x_2) = x_1^2 + 4x_1x_2 + 4x_2^2.

Solution:

  1. Q(x1,x2)=x12+4x1x2+4x22Q(x_1, x_2) = x_1^2 + 4x_1x_2 + 4x_2^2
  2. =x12+4x1x2+4x22= x_1^2 + 4x_1x_2 + 4x_2^2
  3. =(x1+2x2)2= (x_1 + 2x_2)^2
  4. Put y1=x1+2x2y_1 = x_1 + 2x_2, y2=x2y_2 = x_2
  5. Then Q=y12Q = y_1^2

The Orthogonal Transformation Method

Method: Reduce a quadratic form to a standard form by an orthogonal transformation.

Steps:

  1. Write down the matrix AA of the quadratic form
  2. Compute the eigenvalues and eigenvectors of AA
  3. Build the orthogonal matrix QQ
  4. Make the change of variables x=Qyx = Qy
  5. Obtain the standard form Q=λ1y12+λ2y22+⋯+λnyn2Q = \lambda_1y_1^2 + \lambda_2y_2^2 + \dots + \lambda_ny_n^2

Exercises

Exercise 1

Write the matrix representation of the quadratic form Q(x1,x2)=2x12+4x1x2+3x22Q(x_1,x_2) = 2x_1^2 + 4x_1x_2 + 3x_2^2.

quadratic formmatrix representationsymmetric matrix

Approach: Build the symmetric matrix of the quadratic form by the standard rule: the diagonal entry collects the coefficient of the squared variable, and each off-diagonal entry collects half of the coefficient of the mixed term.

Steps:

  1. Diagonal entries: a11=2a_{11} = 2, a22=3a_{22} = 3
  2. Off-diagonal entries: a12=a21=42=2a_{12} = a_{21} = \frac{4}{2} = 2
  3. Matrix representation: A=(2223)A = \begin{pmatrix} 2 & 2 \\ 2 & 3 \end{pmatrix}

Answer:A=(2223)A = \begin{pmatrix} 2 & 2 \\ 2 & 3 \end{pmatrix}

Exercise 2

Write the quadratic form Q(x1,x2,x3)=x12+2x22+3x32+2x1x2+2x1x3+4x2x3Q(x_1, x_2, x_3) = x_1^2 + 2x_2^2 + 3x_3^2 + 2x_1x_2 + 2x_1x_3 + 4x_2x_3 in matrix form.

quadratic formmatrix representationcoefficient extraction

Approach: Again build the symmetric matrix directly from the coefficients: diagonal entries come from the squared terms, and every off-diagonal entry is half of the corresponding mixed-term coefficient.

Steps:

  1. Diagonal entries: a11=1a_{11} = 1, a22=2a_{22} = 2, a33=3a_{33} = 3
  2. Off-diagonal entries: a12=a21=22=1a_{12} = a_{21} = \frac{2}{2} = 1, a13=a31=22=1a_{13} = a_{31} = \frac{2}{2} = 1, a23=a32=42=2a_{23} = a_{32} = \frac{4}{2} = 2
  3. Matrix representation: A=(111122123)A = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 2 & 2 \\ 1 & 2 & 3 \end{pmatrix}

Answer:A=(111122123)A = \begin{pmatrix} 1 & 1 & 1 \\ 1 & 2 & 2 \\ 1 & 2 & 3 \end{pmatrix}

Exercise 3

Reduce the quadratic form Q(x1,x2)=x12+6x1x2+9x22Q(x_1, x_2) = x_1^2 + 6x_1x_2 + 9x_2^2 to standard form by completing the square.

quadratic formcompleting the squarestandard form

Approach: Group the cross term with the squares so that the whole expression becomes a single perfect square, then rename the new combination as a new variable.

Steps:

  1. Q(x1,x2)=x12+6x1x2+9x22Q(x_1, x_2) = x_1^2 + 6x_1x_2 + 9x_2^2
  2. =x12+6x1x2+9x22= x_1^2 + 6x_1x_2 + 9x_2^2
  3. =(x1+3x2)2= (x_1 + 3x_2)^2
  4. Put y1=x1+3x2y_1 = x_1 + 3x_2, y2=x2y_2 = x_2
  5. Then Q=y12Q = y_1^2

Answer:Q=y12Q = y_1^2, where y1=x1+3x2y_1 = x_1 + 3x_2, y2=x2y_2 = x_2

Exercise 4

Decide whether the quadratic form Q(x1,x2)=x12+2x22Q(x_1, x_2) = x_1^2 + 2x_2^2 is positive definite.

quadratic formpositive definitenesssymmetric matrix

Approach: Check the sign of the quadratic form for an arbitrary nonzero vector, using the matrix representation to keep the computation tidy.

Steps:

  1. Matrix representation: A=(1002)A = \begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}
  2. For any nonzero vector x=(x1x2)x = \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}, Q(x)=x12+2x22>0Q(x) = x_1^2 + 2x_2^2 > 0
  3. Hence the form is positive definite

Answer:It is a positive definite quadratic form

Exercise 5

Write the matrix representation of the quadratic form Q(x1,x2)=−x12−2x22Q(x_1, x_2) = -x_1^2 - 2x_2^2 and decide its definiteness.

quadratic formmatrix representationnegative definiteness

Approach: First build the symmetric matrix of the form, then test the sign of the quadratic expression for an arbitrary nonzero vector.

Steps:

  1. Matrix representation: A=(−100−2)A = \begin{pmatrix} -1 & 0 \\ 0 & -2 \end{pmatrix}
  2. For any nonzero vector x=(x1x2)x = \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}, Q(x)=−x12−2x22<0Q(x) = -x_1^2 - 2x_2^2 < 0
  3. Hence the form is negative definite

Answer:A=(−100−2)A = \begin{pmatrix} -1 & 0 \\ 0 & -2 \end{pmatrix}, and it is a negative definite quadratic form

Summary

Symbols Used in This Article

SymbolTypePronunciation / NoteMeaning in This Article
Q(x1,…,xn)Q(x_1, \dots, x_n)Mathematical symbolQ of xA quadratic form, a homogeneous quadratic function of the shape ∑i,jaijxixj\sum_{i,j} a_{ij}x_ix_j
aija_{ij}Mathematical symbola i jA coefficient of the quadratic form matrix, satisfying the symmetry aij=ajia_{ij}=a_{ji}
xTAxx^TAxMathematical symbolx transpose A xThe matrix representation of a quadratic form, with AA symmetric
AAMathematical symbolmatrix AThe symmetric matrix representing the quadratic form
AT=AA^T = AMathematical symbolA transpose equals AThe symmetry of the quadratic form matrix
x=Pyx = PyMathematical symbolx equals P yA linear change of variables, reducing the form to yT(PTAP)yy^T(P^TAP)y
λi\lambda_iGreek letterLambdaThe coefficient of each squared term in the standard form, that is, an eigenvalue of AA

Found an issue with this content?

Tell us what could be improved.