Quadratic Forms Explained with Worked Examples

A quadratic form is for a symmetric matrix . In two variables, has matrix with rows and . The signs of the eigenvalues decide whether it is positive definite, negative definite or indefinite.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Quadratic forms means

Expanding gives squared terms from the diagonal and cross terms from the off-diagonal entries, each counted twice. All eigenvalues positive means for every non-zero : positive definite.

By the spectral theorem, rotating to the eigenvector axes removes the cross terms, so . The sign pattern then follows from the eigenvalues.

Quadratic forms describe conic sections, energy in physics, and the second-order behaviour of functions (see the second derivative test). The Rayleigh quotient is the form divided by the squared length.

What is it used for?

A quadratic form is a sum of squared and cross terms. Its sign pattern says whether a function has a minimum, a maximum or a saddle at a point.

How to use quadratic forms

  1. Write the form with its symmetric matrix (half the cross-term coefficient off the diagonal).
  2. Find the eigenvalues.
  3. Classify using their signs.
  4. Or test by completing the square.

Graph

The level curve 2x² + 2xy + 2y² = 4 is an ellipse-2.5-2-1.5-1-0.500.511.522.5-2-1012The level curve 2x² + 2xy + 2y² = 4 is an ellipsexyupper halflower halfGraph with x from -2.5 to 2.5 and y from -2.5 to 2.5. Shows the curve upper half; the curve lower half.

Positive eigenvalues 1 and 3 give a closed ellipse; an indefinite form would give a hyperbola.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: positive definite

Classify .

Worked example
Answer
positive definite\text{positive definite}
  1. Matrix
  2. Eigenvalues

Example 2: indefinite

Classify .

Worked example
Answer
indefinite\text{indefinite}
  1. Matrix
  2. Eigenvalues

Example 3: evaluating a form

Evaluate at .

Worked example
Answer
1111
  1. Substitute

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

x² + 4xy + 3y²

matrix (1 2; 2 3), det

−1 (indefinite).

same at (1, 1)

Q

8.

2x² + 2xy + 2y²

matrix (2 1; 1 2), det

3 (positive definite).

same at (1, −1)

Q

2.

Word problems

Q(x) = xᵀAx for symmetric A; ax² + 2bxy + cy² has matrix (a b; b c). Positive eigenvalues mean positive definite, mixed signs indefinite.

Determinant

x² + 4xy + 3y²: matrix (1 2; 2 3).

  1. 3 − 4
  2. Check: negative, so indefinite ✓-1

Value

At (1, 1).

  1. 1 + 4 + 3
  2. Check: ✓8

Positive definite Higher

(2 1; 1 2): 4 − 1.

  1. 3
  2. Check: a = 2 > 0 too ✓3

Value Higher

At (1, −1).

  1. 2 − 2 + 2
  2. Check: ✓2

Common mistakes

Middle term 2b not b

b ✗

2b ✓

Off-diagonal b appears twice.

det > 0 alone gives positive definite

alone ✗

also a > 0 ✓

Both needed.

Nonsymmetric A

any A ✗

symmetrise first ✓

Use (A + Aᵀ)/2.

Sign of det decides nothing

nothing ✗

det < 0 ⇒ indefinite (2 × 2) ✓

Mixed eigenvalues.

Exam tips

  1. Matrix of ax² + 2bxy + cy² is (a b; b c).
  2. det > 0, a > 0: positive definite.
  3. det < 0: indefinite.
  4. Eigenvalues decide the sign.
  5. Evaluate at test points.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. det for x² + 6xy + y²: (1 3; 3 1) Foundation

-8

2. Q(1, 1) for x² + 6xy + y² Foundation

8

3. det for 3x² + 2xy + 3y² Foundation

8

4. Q(1, 2) for 3x² + 2xy + 3y² Higher

19

5. det for x² + y² Higher

1

6. Q(3, 4) for x² + y² Higher

25

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Quadratic form
xᵀAx.
Positive definite
Q > 0 for x ≠ 0.
Indefinite
Takes both signs.
Negative definite
Q < 0.
Symmetric matrix
A = Aᵀ.
Principal axes
Eigenvector directions.

Frequently asked questions

What is a quadratic form?

Q(x) = xᵀAx with A symmetric.

What is the matrix of ax² + 2bxy + cy²?

(a b; b c).

When is it positive definite?

When all eigenvalues are positive (a > 0 and ac − b² > 0 in 2D).

What does det < 0 mean for a 2 × 2 form?

It is indefinite.

Which page covers symmetric matrices?

symmetric matrices.

Which page covers the Rayleigh quotient?

Rayleigh quotient.

More in Vectors and matrices and the formula sheets.