












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
How to diagonalize a quadratic form by changing the basis and finding eigenvectors. It includes examples and proofs of the basis changing rule and the diagonalization method using eigenvalues. The document also covers the connection between the old and new matrices for the quadratic form.
What you will learn
Typology: Lecture notes
1 / 20
This page cannot be seen from the preview
Don't miss anything!
quadratic forms and their matrix notation
If q = a 1 x^2 + a 2 y^2 + a 3 z^2 + a 4 xy + a 5 xz + a 6 yz
then q is called a quadratic form (in variables x,y,z). There is a q value (a scalar) at every point. (To a physicist, q is probably the energy of a system with ingredients x,y,z.) The matrix for q is
A =
1 2 a 4
1 2 a 5 1 2 a 4 a 2
1 2 a 6 1 2 a 5
1 2 a 6 a 3
It's the symmetric matrix A with this connection to q:
y z
or equivalently
(2) q = x
Û T A x
Û where x
y z
example 1
If q = 3x
2 1 + 6x
2 2 - 7x
2 3 +^ πx
2
1 2 x 1 x 4 then the matrix for q is
A =
warning In example 1, do not write q = A. The quadratic form does not equal a matrix (q is
a scalar quantity, not a matrix). What q does equal is x
Û T Ax
Û where x
1 » x 4
example 2
If q has matrix
3 7 - 5 -2 1/
then q = 2x^2 + 7y^2 +
1 2 z
(^2) + 6xy + 10xz - 4yz.
basis changing rule for the matrix of a quadratic form
Suppose q is a quadratic form in variables x,y,z with (old) matrix A. Let
u = u 1 i + u 2 j + u 3 k v = v 1 i + v 2 j + v 3 k w = w 1 i + w 2 j + w 3 k
be a new basis for R^3. Let P be the usual basis—changing matrix:
P =
u 2 v 2 w 2 u 3 v 3 w 3
Then the new matrix for q in the new coord system with variables X,Y,Z and basis vectors u,v,w is given by
new = PT old P
example 3 Suppose
(3) q = x^2 + 6xy + y^2.
Let u = i + 2j v = -i + 2j
Find the matrix for q w.r.t. basis u,v and express q in terms of new coordinates X and Y. solution method 1 (using an algebraic substitution) Let
P =
2 2
The old coordinates x,y and new coordinates X,Y are related by
[ ]
x y = P^ [ ]
X Y
so x = X - Y y = 2X + 2Y
Substitute for x and y in (3):
q = (X-Y)^2 + 6(X-Y)(2X+2Y) + (2X+2Y)^2.
Multiply out and collect terms to get q in terms of X and Y:
q = 17X^2 + 6XY - 7Y^2.
The matrix for q w.r.t. basis u,v is
3 -
.
method 2 (using the basis changing rule for the matrix of a quadratic form)
The matrix for q (w.r.t. the standard coord system) is A = (^) [ ]
1 3 3 1.
By the basis changing rule above, the new matrix for q is
matrix A such that q = [x 1 ... xn] A
1 » xn
question 3 What are congruent matrices. answer Matrices A and B are congruent if A is symmetric and there exists an
invertible matrix P such that B = PTAP (this automatically makes B symmetric too).
question 4 What are similar matrices. answer Matrices A and B are similar if there exists a matrix P such that B = P-1AP.
PROBLEMS FOR SECTION 9.
Find the matrix A for q and write q in terms of A using matrix notation.
3 6 7 4 7 9
.
2 2 + 3x 4 x 5. Find the matrix for q.
2 5 0 0 3 0 0 - 4 0 -3 6
.
q = x^2 + 4xy + 3y^2
u
Û = 3i
Û
Û
v
Û = 2i
Û
Û .
(a) Find the new formula for q w.r.t. the basis u,v using the basis changing rule for a quadratic form. (b) Find the new formula for q w.r.t. the basis u,v again using an algebraic substitution. (c) Suppose a point has coords X=1, Y=2 w.r.t. basis u,v. Find the value of q at the point two ways, using its X,Y coordinates and then again using its x,y coordinates.
X = x - y Y = x + y
(a) Find q in terms of X and Y just with algebra. (b) What new basis is involved when you use variables X and Y. (c) Find q in terms of X and Y again using the basis changing rule for q. (d) Find the (old) matrix for q. What is the connection between q and the old matrix (write an equation beginning "q = "). (e) Find the new matrix for q. What is the connection between q and the new matrix (write an equation beginning "q = "). (f) What's the connection between the old matrix for q and the new matrix for q.
x = 2X - Y y = X + 3Y
(a) Find q in terms of X and Y just with algebra. (b) What new basis is involved when you use coordinates X and Y. (c) Find q in terms of X and Y again using the basis changing rule for q.
the y—axis clockwise 45o. Use the basis changing rule for a quadratic form to find
(a) the new formula for q = x^2 + y^2. (b) the old formula for q = XY. (c) the equation of the circle x^2 + y^2 = 1 in the new system.
y z
where P = (^) [ r s t]
x =
2 3 X +^
1
y =
1 3 x +^
2
2
z = -
2 3 X +^
1
4
As a check, if you substitute for x,y,z in (1) you should get the new version of q in (2):
q = 5(
2 3 X +^
1
1 3 x +^
2
2
2 3 X +^
1
4
2 3 X +^
1
1 3 x +^
2
2
2 3 X +^
1
2 3 X +^
1
4
1 3 X +^
2
2
2 3 X +^
1
4
warning
You need orthonormal eigenvectors to get q to be ¬ 1 X^2 + ¬ 2 Y^2 + ¬ 3 Z^2. In example 1,
if you use the original eigenvectors u,v,w (v and w are not orthog) as a basis, you won't get a diagonal q. And if you use eigenectors u, v 1 , w 1 (orthogonal but not
normalized) you will get a diagonal q but not ¬ 1 X^2 + ¬ 2 Y^2 + ¬ 3 Z^2.
example 2
Diagonalize q = 3x^2 + 3y^2 + 2xy. Find the new basis vectors and the change of variable that produces the diagonal q. solution The matrix for q is
A = (^) [ ]
The eigenvalues are 2,4 with respective eigenvectors r = (1,-1), s = (1,1). They are orthog since A is symmetric. Normalize them to get
u = (
), v = (
In the new coord system with basis u,v,
q = 2X^2 + 4Y^2.
The change of variable is
[ ]
x y = P[ ]
Y where P =^ [u^ v]
x =
1
1
y = -
1
1
warning
Don't forget to use ortho normal eigenvectors if you claim that q = ¬ 1 X^2 + ¬ 2 Y^2. Remember to normalize!
example 2 continued Identify the graph of 3x^2 + 3y^2 + 2xy = 2
(temporarily obscured because of the cross term 2xy).
solution In the new X,Y cord system with basis u,v, the equation is
so the graph is an ellipse (Fig 1).
1 2 )) x-axis
y-axis
Y-axis
X-axis
1 2 ))
warning
Example 2 involved the quadratic form q = 3x^2 + 3y^2 + 2xy. The ellipse in Fig 1 is not the graph of q. It's the graph of the equation q = 2 (the ellipse is actually one of the level sets of q).
row/col operations on a matrix A row/col operation is a pair of matching row and col ops such as
R 6 = 3R 1 + R 6 C 6 = 3C 1 + C 6
Note that row/col operations preserve symmetry; i.e., if you row/col operate on a symmetric matrix, the result is also symmetric.
row/col operation rule
Let A be the matrix of a quadratic form q w.r.t. the standard basis i,j,k. Do some row/col ops on A to get matrix B. Do just the col ops to I to get a new matrix P. Then B is the matrix of q w.r.t. a new basis consisting of the cols of P.
In other words, B = PTAP.
proof Each col op corresponds to right multiplication by an elementary matrix (±1.3). Each row op corresponds to left mult by an elem matrix. When the operations are matching, the elem matrices turn out to be transposes of one another. So row/col operations on A (say there are three of them) and the col ops on I amount to the scheme in Fig 2 where
useful) that
q = 2X^2 - 3Y^2 + 6Z^2 + 4XZ - 6YZ
in the new coord system with basis vectors (1,0,0), (-2,1,0), (0,0,1). At the end you know (very useful) that q = 2X^2 - 3Y^2 + 7Z^2
in the coord system with basis vectors
u = (1,0,0), v = (-2,1,0), w = (1,-1,1).
As a check, let P = (^) [u v w ]. Then
so q does come out to be 2X^2 - 3Y^2 + 7Z^2 in the coord system with basis u,v,w.
warning In example 3, the diagonal coeffs 2,-3,7 are not eigenvalues of A and the cols of P are not eigenvectors. This was a different method of diagonalizing.
diagonalization process continued You can continue the diagonalization in example 3 so that the coeffs are –1's. Do some more row/col ops:
Do the col ops to P, where the earlier col ops left off. All in all, this turns A into 1 0 0 0 -1 0 0 0 1 and turns I into
So
q = X^2 - Y^2 + Z^2
in the coord system with basis vectors
footnote This continuation in example 3 can also be accomplished algebraically by going from the latest X,Y,Z coord system to a new X 1 , Y 1 ,
Z 1 coord system by substituting X =
Z 1. You get
q = 2(
This substitution amounts to changing the scale on the X,Y,Z axes, i.e., to
a generalization of the row/col operation rule for getting a new matrix for q old rule
Start here with the matrix of q Start with I, i.e., with [i j k] w.r.t.the usual basis i,j,k
Row/col operate on the left side. Col op on the right side. You end up on the left side with a new matrix for q w.r.t. a new basis consisting of the cols on the right side.
more general rule
Start here with the matrix of q Start here with [u v w] w.r.t. basis u,v,w
Row/col operate on the left side. Col op on the right side. You end up on the left side with a new matrix for q w.r.t. a new basis consisting of the cols on the right side.
(This works whether or not you have reached a diagonal matrix on the left side although that's usually what you're aiming for.)
The more general version says you don't have to start at the "beginning", with the matrix for q w.r.t. the usual basis i,j,k.
example 4 (mixing two methods). Suppose the matrix (2 ≈ 2) for q has eigenvalues ¬ = 2, -3 with corresponding eigenvectors (2,1), (-1,2). Diagonalize q so that the diagonal coeffs are –1's and find the new basis.
solution
q = 2X^2 - 3Y^2 w.r.t. basis u = (
), v = (-
Now pick up where the eigenvalue method left off and use row/col ops to make q diagonal with diagonal coeffs –1's. solution matrix for q w.r.t. basis u,v [u v]
Do these row /col ops on the left side and the col ops on the right side:
example 4 Suppose q is a function of four variables and in some coord system q is
2X
third method for diagonalizing q: completing the square Look at the quadratic form
(3) q = 3x^2 + y^2 + 4z^2 + 3xy + 6xz
To diagonalize q, first collect the x terms like this:
q = 3[ x^2 + (y + 2z)x (^) ]+ y^2 + 4z^2
The coeff of x in the bracket is y+2z. Take half the coeff, square it and add it on to complete the square.
q = 3 [ ]
x^2 + (y+2z)x + (
y+2z 2
y+2z 2
[ ]
x +
y+2z 2
1 4 y
(^2) - 3yz + z 2
Now collect the y terms and complete the square again:
q = 3 [ ]
x +
y+2z 2
1 4 [y^ ]
(^2) - 12yz + z 2
The coeff of y in the second brackets is 12z. Take half the coeff, square it and add it on to complete the square.
q = 3 [ ]
x +
y+2z 2
1 4 [ y ]
(^2) - 12zy + 36z (^2) + z (^2) - 1 4 36z
[ ]
x +
y+2z 2
1 4 [ y - 6z]
Now let
(4) X = x +
y+2z 2
, Y = y - 6z, Z = z.
Then
(5) q = 3X^2 +
1 4 Y
If you want the basis vectors corresponding to the new coords X,Y,Z, write (4) in matrix form:
y z
P-
Invert to get
The new basis vector are u = (2,0,0), v = (-1/2, 1, 0),(-4,6,1).
(b) Sketch the graph of x^2 + 4xy - 2y^2 = 2 and identify the major axis and vertices.
(c) Check that the new matrix for q really is PT old P.
(a) Diagonalize q using row/col ops and make the diagonal coeffs –1's. (b) What change of variable produced the diagonal q in part (a).
Without computing the eigenvalues, find their sign distribution (how many positives and how many negatives).
(a) q = x^2 + 4xy - 2y^2 (b) q = 2x^2 + 3xy + y^2 (c) q = 3x^2 - 6y^2 + z^2 + 6xy + 18xz (d) q = 3x^2 + y^2 + 4z^2 + 2xy + 5xz + 6yz
Let q be a quadratic form matrix with A (necessarily symmetric) The following are equivalent (either all happen or none happen). When they do happen then q and A are called non—positive definite or negative semi—definite. (1) q ≤ 0 at every point. (2) In any diagonal version of q, the coeffs are ≤ 0. In particular if you use row/col ops on A to get a diagonal matrix, the diagonal entries are ≤ 0.
(3) The eigenvalues of A are ≤ 0. (4) The pm's of A starting with the most northwesterly are ≤ 0, ≥ 0, ≤ 0, ≥ 0, etc.
The categories negative definite and negative semi—definite overlap: If A is negative definite then it is also negative semi—definite.
If in addition to (1)-(4) above, q actually is 0 somewhere besides the origin or in some diagonal version of q one of the coeffs actually is 0 or one of the eigenvalues of A actually is 0 or one of the pm's actually is 0 then q and A are negative semi— definite but not negative definite.
indefiniteness If q and A are none of the above then they are called indefinite.
Only symmetric matrices are assigned a definiteness. So if a matrix is called positive, positive semi, neg, negative semi or indefinite you may assume that the matrix is symmetric to begin with.
For each kind of definiteness, the equivalence of (1)-(3) follows from the preceding sections. The proof that (4) belongs on the list with (1)-(3) is too messy.
example 1
Let q = x^2 - 3y^2 + 7xy. Find the definiteness of q.
method 1 If x = 0, y = 1 then q =-3, negative. If y=0 and x = 1 then q = 1, positive. So by inspection, q is indefinite. (But it's not always this easy to find the definiteness by inspection.)
method 2 The matrix for q is
The pm's are 1, -61/4 which makes q indefinite.
method 3 Start with the matrix for q and diagonalize it by adding -
7 2 row1 to
row2 and adding -
7 2 col1 to col2 to get
In another coord system (I don't care about the basis vectors), q = X^2 -
61 4 Y
(^2). There
is one positive and one negative coeff. So q is indefinite.
method 4 The matrix for q has eigenvalues
. One is positive and one is
negative. So q is indefinite.
Find the definiteness of A with several methods, for practice.
q = ax^2 + bxy + cy^2 where a,b,c are positive) then q is positive definite.
(a) in some new coord system, q = -2X^2 - 3Y^2 - 5Z^2 (b) in some new coord system, q = X^2 - 2Y^2 + Z^2
(a) Show that BTB is symmetric.
(b) Let q be the quadratic form with matrix BTB. Write q in matrix notation.
(c) Show that BTB is positive semi—definite by continuing from part (b) with matrix algebra until you can see that q ≥ 0.
Suggestion: Use the fact that for column vectors u and v, u…v = uTv (Section 2.1).
eigenvalues of A-1.
b d e c e f
. True or False.
(a) If A is positive definite then the diagonal entries a,d,f are positive.
(b) If the diagonal entries a,d,f are positive then A is positive definite.
warning To diagonalize q, you don't have to use eigenvectors at all. And the coeffs of the square terms in the new coord system don't have to be eigenvalues.
But if you want to turn q into ¬ 1 X^2 + ¬ 2 Y^2 + ¬ 3 Z^2 , you must not only use
eigenvectors as the new basis then you must use orthonormal eigenvectors. To diagonalize a matrix M you must use eigenvectors but they don't have to be orthogonal or unit length. It's just convenient if they are.
page 1 of review problems for chapter 9
REVIEW PROBLEMS FOR CHAPTER 9
(a) Find the new formula for q in the coord system with basis u = 2i, v =
1 3 j twice. (i) Find the connection between X,Y and x,y and then use algebra (ii) Use the basis changing rule
(b) Diagonalize q using three different methods.
(c) Sketch the graph of 2x^2 - 4xy + 5y^2 = 7 and identify some of its significant features (in the old coord system).
A =
-1 2 - 1 -1 2
(a) Use two methods to show that A is positive definite.
(b) Find an invertible P so that PTAP = I.
Let x
x 2 x 3
. Write the equation relating q,A, and x
Û .