Course contentsShow
← Mathematics
Lesson 2291 of 3,12147. Linear Algebra — Applications and Advanced TopicsFree lesson

Quadratic Forms and Their Matrix Representation

Express quadratic expressions as matrix products x^T A x and identify the associated symmetric matrix.

Quadratic Forms and Their Matrix Representation

What You'll Learn

You'll learn how to express any quadratic expression in multiple variables as a compact matrix product involving a symmetric matrix.

The Core Idea

A quadratic form is an expression where every term has degree 2. For example:

  • In two variables: Q(x, y) = ax² + bxy + cy²
  • In three variables: Q(x, y, z) = ax² + by² + cz² + dxy + exz + fyz

The key insight: any quadratic form can be written as x^T A x, where x is a column vector of variables and A is a symmetric matrix.

How It Works

For two variables, if you have Q(x, y) = 3x² + 4xy + 5y², you can write:

x = [x]
    [y]

A = [3   2]
    [2   5]

Q = x^T A x = [x  y] [3   2] [x]
                      [2   5] [y]

Notice that the off-diagonal elements share the coefficient of the mixed term: the xy coefficient (4) is split equally between positions (1,2) and (2,1) of matrix A, giving us 2 in each spot. This makes A symmetric.

Why Symmetry?

When you expand x^T A x, the (i,j) and (j,i) entries of A both contribute to the x_i·x_j term. To represent a quadratic form uniquely, we use a symmetric matrix where A_ij = A_ji, distributing each mixed-term coefficient equally.

Three-Variable Example

For Q(x, y, z) = 2x² + 3y² + z² + 4xy - 2xz + 6yz:

A = [2    2   -1]
    [2    3    3]
    [-1   3    1]

Each mixed term's coefficient is split: the 4xy becomes 2 in positions (1,2) and (2,1), and so on.

Key Takeaway: Every quadratic form can be expressed as x^T A x with a unique symmetric matrix A, where diagonal entries are pure-term coefficients and off-diagonals are half the mixed-term coefficients.