You are on page 1of 8

8.

3 Quadratic Functions

In this section we shall look at the connection between quadratic functions and symmetric
matrices.

Definition 1. A quadratic function z = f(x, y) of two variables x and y is one of the form

(1) z = f(x, y) = ax2 + 2bxy + cy2 + dx + ey + f

where a, b, c, d, e and f are fixed numbers. A quadratic form (or homogeneous quadratic
function) is a quadratic function where only the x2, xy and y2 terms are present, i.e. one of
the form

(2) z = f(x, y) = ax2 + 2bxy + cy2

Example 1. The following are quadratic functions.


z = x2 + 4y2
z = x2 - 4y2
z = 5x2 + 20y2
z = 17x2 - 12xy + 8y2
z = 17x2 - 12xy + 8y2 + 2x - 6y + 3
The first four are quadratic forms.

A quadratic form can be written in vector form using a symmetric matrix.

Proposition 1.

(3) ax2 + 2bxy + cy2 = (x, y) = uTQu

(4) ax2 + 2bxy + cy2 + dx + ey + f = (x, y) + (d, e) + f = uTQu + pu + f

where u = , Q = and p = (d, e).

Proof. The first part follows from the fact that

z = ax2 + 2bxy + cy2 = (ax2 + bxy) + (bxy + cy2) = x(ax + by) + y(bx + cy)
= (x, y) = (x, y) = uTQu

The second part follows easily from the first. //

8.3 - 1
Example 2.

17x2 – 12xy + 8y2 = (17x2 - 6xy) + (- 6xy + 8y2) = x(17x - 6by) + y(- 6x + 8y)
= (x, y) = (x, y) = uTQu

Problem 1. Write 6x2 – 4xy + 3y2 in the form (3). Answer: Q = .

Definition 2. The graph of a function z = f(x, y) is the set of all points


(x, y, z) = (x, y, f(x, y)) in space where the z coordinate is obtained by applying the
function to the x and y coordinates. A level curve of z = f(x, y) is the graph of the
equation f(x, y) = k for some fixed number k. The contour map of z = f(x, y) is the set of
all level curves.

The graph will be a surface in three dimensions while each level curve is a curve in the
xy-plane. A graph has an infinite number of non-intersecting level curves, one for each
number k. The contour map consists of all these level curves taken together and it divides
up the plane into these non-intersecting curves. Often one can get a good picture of the
graph from the contour map. Many questions involving the function can be visualized by
means of the graph and/or contour map. In this section we see how to make the contour
map and graph of quadratic functions.

We begin with quadratic functions of the form

(5) z = +

where p and q are fixed numbers. In this case the level curves have the form + = k. If
k < 0 there are no x and y satisfying the equation since the left side is positive and the
right side is negative, so there is no level curve for negative values of k. If k = 0 the only
pair of values of x and y satisfying this equation is (x, y) = (0, 0), so the level curve is just
a single point, i.e. the origin. If k > 0 then we divide by k and rewrite the level curves as

+ = 1 or + = 1

with a = p and b = q. So the level curve is an ellipse extending from – p to p on the x axis
and – q to q on the y axis. So the level curves are concentric ellipses which get larger as
k increases. The resulting surface z = + is bowl shaped opening upward with its low
point at the origin. It is called an elliptic paraboloid with its vertex at the origin. The
curves obtained by fixing y and letting x vary are parabolas as are the curves obtained by
fixing x and letting y vary.

Example 3. Consider the function z = x2 + 4y2. Draw the level curves for z = 4 and z = 8
and the graph of the function.

8.3 - 2
The level curve x2 + 4y2 = 4 for z = 4 is the ellipse + = 1 extending from – 2 to 2 on the x
axis and - 1 to 1 on the y axis. The level curve x2 + 4y2 = 8 for z = 8 is the ellipse + = 1
extending from – 2 to 2 on the x axis and - to on 2

the y axis. These are shown at the right along with 1

the graph of z = x2 + 4y2.


4 2 2 4

The graph of a quadratic functions of the form 1

(6) z = - 2

is obtained by reflecting the graph of (5) across


the z axis. It is an elliptic paraboloid openting
down with its vertex at the origin.

Now consider quadratic functions of the form

(7) z = -

where p and q are fixed numbers. In this case the level curves have the form + = k. If
k > 0 then when we divide by k the level curves have the form

- = 1 or - = 1

with a = p and b = q. So the level curve is a hyperbola with vertices at – p and p on the x
axis and asymptotes y = x and y = - x. So the level curves are hyperbolas which get
larger as k increases. If k = 0 then the level curves are the straight lines y = x and y = - x.
If k < 0 then when we divide by k the level curves have the form

+ = 1 or - = 1

with a = p and b = q. So the level curve is a hyperbola with vertices at – q and q on the y
axis and asymptotes y = x and y = - x. Again these level curves are hyperbolas which
get larger as k decreases.

The resulting surface z = - is saddle shaped surface called an hyperbolic paraboloid.


It is said to open up along the x axis and open down along the y axis. The curves
obtained by fixing y and letting x vary are parabolas as are the curves obtained by fixing
x and letting y vary.

Example 4. Consider the function z = x2 - 4y2. Draw the level curves for z = 4, z = 8 and
z = - 4 and the graph of the function.
2
The level curve x2 - 4y2 = 4 for z = 4 is the hyperbola
- = 1 with vertices at – 2 and 2 on the x axis and 1

asymptotes y = x/2 and y = - x/2. The level curve x2 4 2 2 4


- 4y2 = 8 for z = 8 is the hyperbola - = 1 with vertices
1

2

8.3 - 3
– 2 to 2 on the x axis and same asymptotes. The level curve x2 - 4y2 = - 4 for z = - 4 is the
hyperbola - = 1 with vertices at – 2 and 2 on the y axis and same asymptotes. These are
shown at the right along with the graph of z = x2 - 4y2.

The graph of quadratic functions of the form

(8) z = -

is similar to the graph of (7) only it opens up


along the y axis and opens down along the x
axis. We can summarize the above discussion
by means of the following proposition.

Proposition 2. Let z = ax2 + cy2. If a and c are both positive the graph is an elliptic
parabolid opening up with its vertex at the origin. If a and c are both negative the
graph is an elliptic parabolid opening down with its vertex at the origin. If a is
positive and c is negative the graph is a hyperbolic parabolid that opens up along the
x axis and opens down along the y axis. If c is positive and a is negative the graph is
a hyperbolic parabolid that opens up along the y axis and opens down along the x
axis.

For general quadratic forms we have the following proposition.

Proposition 3. Let

(9) z = ax2 + 2bxy + cy2 = (x, y) = uTQu

where u = , Q = . Let 1 and 2 be the eigenvalues and v1 and v2 be the eigenvectors of Q.


If we choose a new coordinate system for the xy plane with r axis through v1 and s axis
through v2 then in this new coordinate system the equation (9) becomes z = 1r2 + 2s2. In
particular,
(1) The level curve ax2 + 2bxy + cy2 = k becomes the level curve 1r2 + 2s2 = k in
the rs coordinate system.
(2) If 1 and 2 are both positive the graph of (9) is an elliptic parabolid opening up
with its vertex at the origin. If 1 and 2 are both negative the graph is an
elliptic parabolid opening down with its vertex at the origin. If 1 is positive
and 2 is negative the graph is a hyperbolic parabolid that opens up along the r
axis and opens down along the s axis. If 2 is positive and 1 is negative the
graph is a hyperbolic parabolid that opens up along the s axis and opens down
along the r axis.

8.3 - 4
Proof. Suppose we have normalized the eigenvectors as discussed in the previous
section. Then Q = TDT-1 where T is the matrix whose columns are v1 and v2 and D = .
We substitute this into z = uTQu to get z = uTTDT-1u = (TTu)TDT-1u. As discussed in the
previous section T is orthogonal so T-1 = TT. So z = (T-1u)TDT-1u.

We can express a vector u in the plane as a linear combination of the eigenvectors v1 and
v2, i.e. u = rv1 + sv2 where r and s are the coordinates of u with respect to this new
coordinate system. Algebraically we have u = T . So = T-1u. So z = = 1r2 + 2s2. //

Example 5. Consider the quadratic form z = 17x2 - 12xy + 8y2 = (x, y) = uTQu. (a)
Sketch the level curve 17x2 - 12xy + 8y2 = 20. (b) What kind of surface is the graph of z
= 17x2 - 12xy + 8y2. (c) Sketch the graph of z = 17x2 - 12xy + 8y2.

By example 3 in section 6.1 the eigenvalues of Q are 1 = 5 and 2 = 20 and the


eigenvectors are v1 = and v2 = . Let the r and s axes be the lines through v1 and v2. The
level curve 17x2 - 12xy + 8y2 = 20 becomes 5r2 + 20s2 = 20 in the rs coordinate system.
This is r2 + 4s2 = 4. It is an ellipse and its is below. The graph of z = 17x2 - 12xy + 8y2 is
an elliptic paraboloic opening up and its graph is also below.

2 1 1 2

1

2

Problem 2. Consider the quadratic form z = 6x2 – 4xy + 3y2 = (x, y) = uTQu.
(a) Find a new coordinate system for the xy plane such that in this new coordinate system
the graph of the function z = 6x2 – 4xy + 3y2 has the form z = Ar2 + Bs2 where are the
coordinates of relative to this new coordinate system. Specify this new coordinate
system by giving vectors along the new coordinate axes. Also, give A and B and the
angle which the r axis makes with respect to the x axis.
(b) Sketch the level curve 6x2 – 4xy + 3y2 = 98 showing relevant lengths. What kind of
curve is it.
(c) Sketch the graph of z = 6x2 – 4xy + 3y2. What kind of surface is it.

8.3 - 5
Answers: The r axis is through v1 = and the s axis is through v2 = . In this new coordinate
system the function z = 6x2 – 4xy + 3y2 becomes z = 2r2 + 7s2. The angle between the r axis
and x axis is tan-1(2)  1.11 radians  63.4. The level curve 6x2 – 4xy + 3y2 = 98 is 2r2 + 7s2
= 98 in the rs coordinate system. It is an ellipse whose axis goes from – 7 to 7 on the r axis
and - to on the s axis. The graph of z = 6x2 – 4xy + 3y2 is a elliptic paraboloid.

Example 6. Consider the quadratic form z = 5x2 + 6xy - 3y2 = (x, y) = uTQu. (a) Sketch
the level curve 5x2 + 6xy - 3y2 = 24. (b) What kind of surface is the graph of z = 5x2 +
6xy - 3y2. (c) Sketch the graph of z = 5x2 + 6xy - 3y2.

First, find the eigenvalues and eigenvectors of Q.

0 = det( Q - I ) = = (5 - )(- 3 - ) – 9

= 2 - 2 - 24 = ( - 6)( + 4)

So the eigenvalues are 1 = 6 and 2 = - 4. An eigenvector v = for 1 = 6 satisfies

= (A - 6I)v =
So
- x + 3y = 0

3x - 9y = 0

The solution to both equations is x = 3y, so v1 = is an eigenvector for 1 = 6. Since the


eigenvectors are orthogonal an eigenvector for 2 = -4 is v2 = . Let the r and s axes be the
lines through v1 and v2. The level curve 5x2 + 6xy - 3y2 = 24 becomes 6r2 - 4s2 = 24 in the
rs coordinate system. This is - = 1. It is a hyperbola opening up the r axis with its
vertices at – 2 and 2 on the r axis and asymptotes s = r/2 and s = - r/2. Its graph is below.
The graph of z = 5x2 + 6xy - 3y2 is an hyperbolic paraboloic opening up along the r axis
and opening down along the s axis and its graph is also below.
6

6 4 2 2 4 6

2

4

8.3 - 6
6
Finally, we consider general quadratic functions of the form (1). They can be reduced to
quadratic forms of the form (2) by creating a new coordinate system parallel to the
orignal but with the origin shifted to a point u0 = .

Proposition 4. Let

(10) z = ax2 + 2bxy + cy2 + dx + ey + f = (x, y) + (d, e) + f = uTQu + pu + f

where u = , Q = . Assume Q is invertible and = - Q-1pT. If we choose a new coordinate


system for the xy plane with origin and r and s axes parallel to the x and y axes then the
equation (9) becomes z = vTQv + (f + pq + qTQq) where q = and v = u – q.

Proof. One has u = v + q. Substitute this into z = uTQu + pu + f. We get

z = (v + q)TQ(v + q) + p(v + q) + f
= vTQv + vTQq + qTQv + qTQq + pv + pq + f

vTQq is a number so vTQq = (vTQq)T = qTQTv = qTQv since Q is symmetric. So

z = vTQv + (2qTQ + p)v + (f + pq + qTQq)

Since q = - Q-1pT it follows that 2Qq = - pT or - p = 2qTQT = 2qTQ since Q is symmetric.


So z = vTQv + (f + pq + qTQq). //

Example 7. Consider the quadratic form

(11) z = 17x2 - 12xy + 8y2 - 10x - 20y + 15


= (x, y) + (- 10, - 20) + 15
= uTQu + pu + f

(a) Sketch the level curve 17x2 - 12xy + 8y2 - 10x - 20y + 15 = 10. (b) What kind of
surface is the graph of z = 17x2 - 12xy + 8y2 - 10x - 20y + 15. (c) Sketch the graph of
z = 17x2 - 12xy + 8y2 - 10x - 20y + 15.

One has q = - Q-1pT = - -1 = = = and f + pq + qTQq = 15 + (- 10, - 20) + (1, 2) = 15 –


50 + (1, 2) = 15 – 50 + 25 = - 10. The rs coordinate system the has origin at = and axes
parallel to the x and y axes. In this coordinate system z = 17r2 – 12rs + 8s2 - 10 and the
level curve z = 10 becomes 17r2 – 12rs + 8s2 = 20. So we take the level curve
17x2 - 12xy + 8y2 = 20 that we made in Example 5 and move it to the right one unit and
up two units. So the level curve is an ellipse with center at and it is shown below. The
graph z = 17x2 - 12xy + 8y2 - 10x - 20y + 15 is an elliptic paraboloid. To make it we take

8.3 - 7
the graph of z = that we made in Example 5 and move it one unit in the x direction, 2
units in the y direction and – 10 units in the z direction. It is also shown below.

1 1 2 3

1

8.3 - 8

You might also like