Hexa Scholar

Quadratic forms: bowls, saddles and valleys

A gold clay bowl with a brass marble at its bottom, beside a gold clay saddle with a brass marble balanced at its center.
A bowl and a saddle, each holding a marble.

The question

The form x² + 4xy + y² has only positive coefficients. Does its graph rise in every direction from 0, like a bowl?

Set three numbers yourself; the page reads the shape.

  1. 1 SeeSet three entries to build a shape.
  2. 2 TryPredict where the form is largest.
  3. 3 ProveBuild the proof, line by line.
  4. 4 ApplyProblems to check yourself.
Before you start · 3 quick checks on a matrix times a vector, eigenvectors and the determinant, about 3 min

Two ideas before you start

2 ideas

A matrix turns a vector into one number

Figure: a vector v, dashed, and the vector Av, solid, both drawn from 0, for the matrix with rows (3, 1) and (1, −1). It needs JavaScript.

v:

q(1, 0) = 3 + 0 + 0 = 3

v · Av = (1, 0) · (3, 1) = 3

For the matrix with rows (3, 1) and (1, −1), the form is q(x, y) = 3x² + 2xy − y². Its value at v is the dot product v · Av: positive when Av makes an angle under 90° with v, negative when the angle is over 90°.

Exact definition

The form of a matrix. For a symmetric matrix \(A\) with rows \((a, b)\) and \((b, c)\) and a vector \(v = (x, y)\), the quadratic form of \(A\) is

\[\begin{aligned} q(v) &= v^\mathsf{T}Av = v \cdot Av \\ &= ax^2 + 2bxy + cy^2. \end{aligned}\]

Every term has degree 2 in \(x\) and \(y\), and every expression \(\alpha x^2 + \beta xy + \gamma y^2\) is the form of exactly one symmetric matrix, the one with \(a = \alpha\), \(b = \beta/2\) and \(c = \gamma\). A matrix that is not symmetric gives the same form as its symmetric part \((A + A^\mathsf{T})/2\), so nothing is lost by taking \(A\) symmetric.

The graph. The graph of \(q\) is the surface \(z = q(x, y)\) above the plane, and a level curve is a set \(q(x, y) = k\) for one number \(k\).

Along each line through 0, the graph is a parabola

Figure: the graph of q along the line through 0 in the direction u, the parabola t ↦ q(u)t², for the same matrix. It needs JavaScript.

u:

q(1, 0) = 3 + 0 + 0 = 3

q(tu) = t² q(u) = 3t² : opens up

Scaling a vector by t scales the form by t². So along the line through 0 in a direction u, the graph is the parabola q(u)t²: it opens up when q(u) > 0, down when q(u) < 0, and is flat when q(u) = 0. This form does all three.

Exact definition

Scaling. For every number \(t\) and vector \(u\), \(q(tu) = t^2q(u)\). So the sign of \(q\) along a line through 0 is the sign of \(q(u)\) for one direction \(u\) of that line.

Shapes. The graph of \(q\) is a bowl when \(q(v) \gt 0\) for every \(v \ne (0, 0)\) (\(A\) is called positive definite), a dome when \(q(v) \lt 0\) for every \(v \ne (0, 0)\) (negative definite), and a saddle when \(q\) takes both signs (indefinite). It is a valley when \(q(v) \ge 0\) for every \(v\) and \(q(v) = 0\) for some \(v \ne (0, 0)\) while \(A \ne 0\) (positive semidefinite but not definite); a ridge is a valley turned upside down, and \(A = 0\) gives a flat graph.

Fine print: eigenvalues, names and more variables

The fact this page uses about symmetric matrices. From the lesson on symmetric matrices (the spectral theorem): a real symmetric \(2 \times 2\) matrix \(A\) has two real eigenvalues \(\lambda_1 \ge \lambda_2\) and two eigenvectors \(w_1\) and \(w_2\) of length 1 that are orthogonal, \(Aw_1 = \lambda_1w_1\) and \(Aw_2 = \lambda_2w_2\). The eigenvalues add up to the trace \(a + c\) and multiply to the determinant \(ac - b^2\).

Names. The graph of a bowl is an elliptic paraboloid, a saddle a hyperbolic paraboloid, and a valley a parabolic cylinder. The same definitions work for an \(n \times n\) symmetric matrix and \(q(v) = v^\mathsf{T}Av\) with \(v\) in \(\mathbb{R}^n\); this page stays with two variables, where everything can be drawn.

1 See

Build a shape from three numbers

How the game works

Each entry moves in steps of 0.5 from −3 to 3. The first picture is the graph of \(q\) over the disk of radius 1 around 0, seen from the side. Its heights are scaled so that the largest \(\lvert q\rvert\) on the disk is always drawn the same height: the picture shows the shape, not the size; parts below height 0 are dashed. The second picture maps the level curves \(q(x, y) = k\) for \(k = \pm 1, \pm 2, \pm 4, \pm 8\) on the square \(-2 \le x, y \le 2\). The tiles show \(q\) in four directions.

There are three rounds. You can check as often as you like, and a round ends when its target is reached. After round 3 a table lists your matrices. Start over clears everything.

2 Try

Turn a direction, watch the form

A prediction and a quick guess. The explorer below them opens once both are answered.

Level curves

The explorer opens once both questions above are answered.

3 Prove

When the graph is a bowl

Theorem

Assumptions. Real numbers \(a\), \(b\) and \(c\) with \(a \gt 0\) and \(ac - b^2 \gt 0\), and the quadratic form \(q(x, y) = ax^2 + 2bxy + cy^2\) of the matrix with rows \((a, b)\) and \((b, c)\). Write \(v = (x, y)\) and \(q(v) = q(x, y)\).

Conclusion. \(q(v) \gt 0\) for every \(v \ne (0, 0)\), so the graph is a bowl, and for every \(k \gt 0\) the level set \(q(v) = k\) is bounded.

Facts the proof uses.

  • ordinary algebra of real numbers;
  • a square of a real number is at least 0, and it is 0 only when the number is 0;
  • multiplying or dividing an inequality by a positive number keeps its direction;
  • for numbers \(s\) and \(t\), \(\lvert s + t\rvert \le \lvert s\rvert + \lvert t\rvert\), and \(s^2 \le m\) gives \(\lvert s\rvert \le \sqrt{m}\).

Each option is one step about the numbers \(a\), \(b\), \(c\) of the theorem. Pick the one that is true for every \(a\), \(b\), \(c\) with \(a \gt 0\) and \(ac - b^2 \gt 0\), and for every point it speaks about.

4 Apply

Problems

Each problem has hints and a full solution.

Key point To read a form \(ax^2 + 2bxy + cy^2\): the signs of \(ac - b^2\) and \(a + c\) give the shape (a bowl when \(a \gt 0\) and \(ac - b^2 \gt 0\)); the eigenvalues, from the trace \(a + c\) and the determinant \(ac - b^2\), give the range of \(q\) on the unit circle; and for a bowl and \(k \gt 0\) the level curve \(q = k\) reaches \(\sqrt{k/\lambda}\) from 0 along the eigenvector of each eigenvalue \(\lambda\).
Level Intro Prerequisites symmetric matrices (the spectral theorem, refreshed in the fine print), a matrix times a vector, eigenvectors and the determinant (refreshed in Before you start) Time ~35 min

Further reading