Skip to article frontmatterSkip to article content

9.2 Quadratic Forms & Positive Definite Matrices

sign of a quadratic function using matrices

Dept. of Electrical and Systems Engineering
University of Pennsylvania

Binder

Lecture notes

1ReadingΒΆ

Material related to this page, as well as additional exercises, can be found in ALA 3.4 and LAA 7.2.

2Learning ObjectivesΒΆ

By the end of this page, you should know:

  • what are quadratic forms
  • the geometry of quadratic forms and what are level sets
  • the different classes of quadratic forms
  • how a quadratic form relates to the corresponding positive definite matrix and its eigen values

3Defining Quadratic FormsΒΆ

One common place where symmetric matrices arise in application is in defining quadratic forms, which pop up in engineering design (in design criteria and optimization), signal processing (as output noise power), physics (as potential & kinetic energy), differential geometry (as normal curvature of surfaces), economics (as utility functions), and statistics (in confidence ellipsoids).

where K=KT∈RnΓ—nK = K^T \in \mathbb{R}^{n \times n} is an nΓ—nn \times n symmetric matrix. Such quadratic forms arise frequently in applications of linear algebra. For example, setting K=InK = I_n and z=Axβˆ’b\vv z = A \vv x - \vv b, we recover the least-squares objective

q(Axβˆ’b)=(Axβˆ’b)T(Axβˆ’b)=βˆ₯Axβˆ’bβˆ₯2.q(A\vv x-\vv b) = (A\vv x-\vv b)^T(A \vv x-\vv b) = \|A\vv x-\vv b\|^2.

4The Geometry of Quadratic FormsΒΆ

We’ll focus on understanding the geometry of quadratic forms on R2Γ—2\mathbb{R}^{2 \times 2}. Let K=KT∈R2Γ—2K = K^T \in \mathbb{R}^{2\times 2} be an invertible 2Γ—22\times 2 symmetric matrix, and let’s consider quadratic forms:

q(x)=[x1x2]T[k11k12k12k22][x1x2]=k11x12+2k12x1x2+k22x22(2D).q(\vv x) = \begin{bmatrix} x_1 \\ x_2 \end{bmatrix}^T \begin{bmatrix} k_{11} & k_{12} \\ k_{12} & k_{22} \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = k_{11}x_1^2 + 2k_{12}x_1x_2 + k_{22}x_2^2 \qquad (\text{2D}).

What kinds of functions do these define? We study this question by looking at the level sets of q(x)q(\vv x).

It is possible to show that such level sets correspond to either an ellipse, a hyperbola, two intersecting lines, a single point, or no points at all. If KK is a diagonal matrix, the graph of (5) is in standard position, as seen below:

Standard level set

If KK is not diagonal, the graph of (5) is rotated out of standard position, as shown below:

Out of standard level set

The principle axes of these rotated graphs are defined by the eigenvectors of KK, and amount to a new coordinate system (or change of basis) with respect to which the graph is in standard position.

5Classifying Quadratic FormsΒΆ

Depending on the eigenvalues of the symmetric matrix KK defining a quadratic form q(x)=xTKxq(\vv x) = \vv x^T K \vv x, the resulting function can look very different. The figure below shows four different quadratic forms plotted as functions with domain R2\mathbb{R}^2, i.e., we are plotting (x,y,q(x,y))(x, y, q(x,y)).

Quadratic Forms

Notice that except for x=0\vv x = 0, the values q(x)q(\vv x) are all positive in Fig. 4(a) and all negative in Fig. 4(d). If we take horizontal cross-sections of these plots, we get an ellipse (these are the level sets CΞ±C_{\alpha} we saw earlier!), the vertical cross-sections of Fig. 4(c) are hyperbolas.

This simple 2Γ—22 \times 2 example illustrates the following definitions.

Also, q(x)q(\vv x) is said to be positive (negative) semidefinite if q(x)β‰₯0q(\vv x) \geq 0 (≀0\leq 0) βˆ€x\forall \vv x: in particular, we now allow q(x)=0q(\vv x) = 0 for nonzero x\vv x.

The following theorem leverages the spectral factorization of a symmetric matrix to characterize quadratic forms in terms of the eigenvalues of KK.

Binder