Processing math: 100%
Skip to main content

Section 41.4 Examples

Subsection 41.4.1 Quadratic forms represented by matrices

Example 41.4.1. Determining the quadratic polynomial associated to a symmetric matrix.

The symmetric matrix

A=[120275053]

creates a quadratic form

qA(x)=xTAx.

We can use the correspondence between matrix entries and polynomial coefficients discussed in Subsection 41.3.1 to obtain

q(x1,x2,x3)=x21+4x1x27x2210x2x3+3x23

without having to calculate out the matrix multiplication of xTAx.

Example 41.4.2. Determining the symmetric matrix associated to a quadratic form.

The quadratic form

q(x1,x2,x3)=5x21+3x1x24x1x3+9x22+6x2x311x23

can be represented by matrix multiplication

q(x)=qA(x)=xTAx

for a symmetric matrix A.

To do create the matrix A, each diagonal entry should be the coefficient on the corresponding squared term in the quadratic polynomial, and each off-diagonal entry should be one-half of the coefficient of the corresponding cross term in the quadratic polynomial:

A=[532232932311].

Subsection 41.4.2 Level curves of two-variable quadratic forms

Example 41.4.3. An ellipse in the xy-plane.

Let's work through the example of Discovery 41.5. The symmetric matrix

A=[135513].

creates quadratic form

qA(x)=13x210xy+13y2,

using variables x,y instead of x1,x2. It's not clear from this polynomial expression what shape a level curve qA(x)=k will take. But since A is symmetric, we can diagonalize it to remove the cross term in the polynomial for qA.

The eigenvalues of A are λ1=8 and λ2=18. Calculate bases for the eigenspaces. First λ1=8:

8IA=[5555]rowreduce=[1100]E8(A)=Span{[11]}.

Now λ2=18:

18IA=[5555]rowreduce=[1100]E18(A)=Span{[11]}.

These two eigenvectors are orthogonal as expected (Statement 2 of Theorem 40.6.1), but they need to be normalized:

E8(A)=Span{[1212]},E18(A)=Span{[1212]}.

Use the normalized eigenvectors to create an orthogonal transition matrix

P=[12121212]

which diagonalizes A:

PTAP=[818].

Using the change of variables

w=[wz],x=Pw,

the transformed quadratic form is

qA(x)=qP1AP(w)=8w2+18z2.

A level curve qP1AP(w)=k (k>0) is clearly an ellipse. For example, the curve

8w2+18z2=72

is an ellipse with w-intercepts at w=±3 and z-intercepts at z=±2.

Ellipse representing level set of a diagonalized quadratic form, plotted on a set of principal axes

Just as the orthonormal basis formed by the standard vectors e1 and e2 represent the x- and y-axes respectively, the orthonormal basis formed by the columns of P represent the w- and z-axes, and give us a way to plot the ellipse qA(x)=72 on the xy-axes.

Ellipse representing level set of a diagonalized quadratic form, plotted on standard axes but relative to a set of principal axes

Relative to how it appears on the wz-axes, the ellipse has clearly been rotated by π/4 counter-clockwise. This is consistent with viewing P as a rotation matrix:

P=[12121212]=[cosπ4sinπ4sinπ4cosπ4].

Also notice how the fact that the columns of P are orthonormal allow use to use multiples of those vectors to determine distances and positions along each of the w- and z-axes.

As our change of variables was

x=Pw,w=P1x,

points in wz-coordinates must be rotated by π/4 to be converted into xy-coordinates.

Transition matrix \(P\) as a rotation between \(wz\)-coordinates and \(xy\)-coordinates
Example 41.4.4. A hyperbola in the xy-plane.

Consider the quadratic form

q(x,y)=3x2+263xy23y2.

This form corresponds to the symmetric matrix

A=[313313323].

The eigenvalues of A are λ1=16 and λ2=36, so even without computing the transition matrix we know that the decoupled quadratic form is

q(w,z)=16w236z2,

so the level curves of q will be hyperbolas. For example, the hyperbola

16w236z2=4

has w-intercepts w=±12 and asymptotes z=±23w.

Hyperbola representing level set of a diagonalized quadratic form, plotted on a set of principal axes

But to determine how to plot this hyperbola on a set of xy-axes, we need the transition matrix, so calculate bases for the eigenspaces. First λ1=16:

16IA=[1313313339]rowreduce=[1300]E16(A)=Span{[31]}.

Now λ2=36:

(36)IA=[3913313313]rowreduce=[3100]E36(A)=Span{[13]}.

Again, these eigenvectors should be normalized in order to create orthogonal transition matrix

P=[32121232].

This transition matrix is of the form

P=[cosπ6sinπ6sinπ6cosπ6],

which represents a rotation followed by a reflection.

Hyperbola representing level set of a diagonalized quadratic form, plotted on standard axes but relative to a set of principal axes

Notice how the wz-axes are rotated π/6 counter-clockwise, but then the z-axis has been reflected to the other side of the w-axis. However, we could have chosen our eigenvectors so that P represented only a rotation, if we had used

E36(A)=Span{[1232]}

instead (see Theorem 41.5.2).

Remark 41.4.5.

Note that in both examples in this subsection, it was not actually necessary to compute the second eigenspace. Since we are working in two dimensions, and we know that symmetric matrices have orthogonal eigenspaces (Statement 2 of Theorem 40.6.1), once we had a basis vector for one eigenspace we could easily obtain a basis vector for the other eigenspace using our pattern of orthogonality in the plane from Discovery 14.2.c (also discussed in Subsection 14.3.2).