Skip to main content

Section 7.2 Quadratic Forms

Handout 7.2 Quadratic Forms

Motivating Question
Does the inequality below hold for all \(x,y\text{?}\)
\begin{equation*} x_1^2-6x_1x_2+9x_2^2 \geq 0. \end{equation*}

Definition 7.23. Quadratic Form.

A quadratic form is a function \(Q:\mathbb{R}^n\to\mathbb{R}\) defined by
\begin{equation*} Q(\vec x)=\vec x^{T}A\vec x = \begin{bmatrix} x_1 \amp x_2 \amp \cdots \amp x_n \end{bmatrix} \begin{bmatrix} a_{1,1} \amp a_{1,2} \amp \cdots \amp a_{1,n} \\ a_{1,2} \amp a_{2,2} \amp \cdots \amp a_{2,n} \\ \vdots \amp \vdots \amp \ddots \amp \vdots \\ a_{1,n} \amp a_{2,n} \amp \cdots \amp a_{n,n} \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix}, \end{equation*}
where \(A\) is an \(n\times n\) symmetric matrix.

Example 7.24.

Compute \(Q_A(\vec x) = \vec x^{T}A\vec x\) and \(Q_B(\vec x) = \vec x^{T}B\vec x\) for the following matrices.
The graphs of the quadratic forms from ExampleΒ 7.24 are given below. Students are not expected to sketch quadratic surfaces.
Graphs of the two quadratic curves Q_A and Q_B.
As we will see shortly, properties of the symmetric matrix \(A\) used to generate the quadratic form \(Q_A(\vec x)\) will allow us to determine characterisitcs about the quadratic form, such as whether it is always nonnegative. Therefore, if first presented with the quadratic form, it is useful to find the symmetric matrix \(A\) which generates the quadratic form.

Example 7.25.

Write the quadratic form below in the form \(\vec x^{T}A\vec x\) for \(\vec x\in\mathbb{R}^3\text{.}\)
\begin{equation*} Q(\vec x)=5x_1^2+x_2^2+3x_3^2+6x_1x_3-12x_2x_3. \end{equation*}
Note in the above example it is difficult to determine whether \(Q(\vec x)\) is always nonnegative. This is due to the cross-product terms, terms of the form \(x_ix_j\text{,}\) since these terms could be positive or negative depending on the input.
To help us better determine properties of \(Q(\vec x)\text{,}\) we would like to perform a change of variables to obtain an equivalent quadratic form \(Q(\vec y)\) which no longer has any cross-product terms. Recall that we can find a symmetric matrix \(A\) so that \(Q(\vec x) = \vec x^T A \vec x\text{.}\) Since \(A\) is symmetric, we know by TheoremΒ 7.18 that \(A = PDP^T\) for a diagonal matrix \(D\) and orthogonal matrix \(P\text{.}\)
What happens when we make the change of variables \(\vec x = P\vec y\text{?}\)

Example 7.27.

Use the orthogonal diagonalization of \(A\) to remove cross-product terms from \(Q=\vec x^{T}A\vec x\text{.}\)
\begin{equation*} A=\begin{bmatrix}3 \amp 2\\ 2 \amp 6\end{bmatrix} =PDP^{T} = \frac{1}{\sqrt5}\begin{bmatrix}2 \amp 1\\ -1 \amp 2\end{bmatrix}\begin{bmatrix}2 \amp 0\\ 0 \amp 7\end{bmatrix}\frac{1}{\sqrt5}\begin{bmatrix}2 \amp -1\\ 1 \amp 2\end{bmatrix} \end{equation*}

Definition 7.28. Definiteness.

A quadratic form \(Q\) is:
  1. Positive definite if \(Q(\vec x)>0\) for all \(\vec x\neq\vec 0\text{.}\)
  2. Negative definite if \(Q(\vec x)<0\) for all \(\vec x\neq\vec 0\text{.}\)
  3. Positive semidefinite if \(Q(\vec x)\ge0\) for all \(\vec x\text{.}\)
  4. Negative semidefinite if \(Q(\vec x)\le0\) for all \(\vec x\text{.}\)
  5. Indefinite if \(Q(\vec x)\) takes both positive and negative values.

Example 7.30.

Determine whether the inequality holds for all \(x,y\text{:}\)
\begin{equation*} x_1^2-6x_1x_2+9x_2^2 \geq 0. \end{equation*}