Solutions to Math 51 Second Exam — February 19, 2015

Solutions to Math 51 Second Exam — February 19, 2015
1. (10 points) Let


1 1 2
A = 3 2 3
2 1 2
(a) Is A invertible? If so, find A−1 , showing all reasoning. If not, explain why not.
(5 points) We perform row operations

1 1 2 1 0
 3 2 3 0 1
2 1 2 0 0
on A adjoined to I3 , as follows:



0
1 0 0
1 1
2
 0 −1 −3 −3 1 0 
0 
1
0 −1 −2 −2 0 1


1 1
2
1
0 0
 0 1
3
3 −1 0 
0 −1 −2 −2 0 1


1 0 −1 −2 1 0
 0 1 3
3 −1 0 
0 0 1
1 −1 1


1 0 0 −1 0
1
 0 1 0 0
2 −3 
0 0 1 1 −1 1

−1 0
1
2 −3 
= 0
1 −1 1

Thus A is invertible and the inverse is given by A−1
(b) If you found in (a) that A is invertible, find det(A−1 ). If instead you found that A is not invertible,
find a nontrivial linear combination of the columns of A that equals the zero vector.
(5 points) Expanding along the first row we obtain det(A−1 ) = (−1) · (2 − 3) + (1) · (0 − 2) = −1.
Math 51, Winter 2015
Solutions to Second Exam — February 19, 2015
Page 2 of 10
2. (10 points) Consider the following linear transformations in the xy-plane:
• S : R2 → R2 is counterclockwise rotation by
• T:
R2
→
R2
π
2
radians, and
is reflection through the line y = −x.
(a) Give the matrix of S.
(3 points) The easiest way to answer this sort of question is to figure out where the standard
basis vectors e1 and e2 go and write those as the columns of the matrix. Letting AS be the
matrix corresponding to the linear transformation S, it is easy to see that e1 gets carried to e2
and e2 gets carried to −e1 , so we have
0 −1
AS =
.
1 0
θ − sin θ Alternatively, we could use the general formula for an R2 rotation matrix, given by cos
,
sin θ cos θ
and plug in θ = π/2. Remember that, essentially by the definition of sine and cosine, counterclockwise is the positive direction (an arbitrary convention, but important to remember!).
(b) Compute the matrix of S ◦ T, simplifying as much as possible. (Hint: This map reflects first, then
rotates.)
(4 points) Here are a few ways of doing this problem. First, we could do the same thing we did
above to find the matrix AS◦T in one fell swoop: note that e1 gets sent first to −e2 (under T)
and then to e1 (under S), and note that e2 gets sent first to −e1 (under T) and then to −e2
(under S). (This is easiest by drawing a picture; it turns out that S ◦ T is reflection about the
x-axis.) In all, we find that
1 0
.
AS◦T =
0 −1
Alternatively, we could find the matrix for T and multiply it by the one for S, using the formula
AS◦T = AS AT .
Here the order is extremely important! Function composition applies from the right to the left,
and matrix multiplication is defined so as to agree with this. To find AT , we can use the formula
for a reflection matrix, which is Ref v = 2 Projv − Id, and calculate the projection matrix by
using its formula (be careful to either use a unit vector for v or normalize appropriately!). Or,
much more simply, we can see where the standard basis vectors go: since T takes e1 to −e2 and
e2 to −e1 , the matrix is
0 −1
AT =
,
−1 0
and we can proceed to multiply in the correct order.
(c) Determine, with reasoning, all vectors x ∈ R2 satisfying (S ◦ T)(x) = 0.
(3 points) We are asked to calculate the null space of the matrix we just found, AS◦T . An easy
row reduction, or merely a glance at the matrix, shows that it is invertible and hence has a
trivial null space, so the only vector getting sent to 0 is the vector x = 0. Even if we had not
correctly found the matrix in part (b), this would still be solvable: note that both a rotation
and a reflection do not change the magnitude of any vector, so if a vector were sent to the zero
vector it would have to have been the zero vector to start with. (As an aside, linear maps with
the property “applying map does not change the magnitude of a vector” are called unitary. All
of the maps in this problem are unitary.)
Math 51, Winter 2015
Solutions to Second Exam — February 19, 2015
Page 3 of 10
3. (10 points)
 


x
x+y+z
(a) Let T : R3 → R3 be the linear transformation taking y  to  −2x + y .
z
x+y
 
x
2x + z
3
2


Let S : R → R be the linear transformation taking y to
.
x + 3y
z
Find the matrix of S ◦ T, showing all reasoning, or explain why it does not exist.
(5 points) We give matrices for each of S and T , and then for the composition S ◦ T via matrix
multiplication. It’s critical to remember that S ◦ T means “S after T ,” so that we apply T first
and then S (in particular, this composition makes sense and it can be represented by a matrix).




x
x+y+z
1 1 1
For T , let MT =  −2 1 0 . It’s straightforward to check that MT y =  −2x + y 
z
x+y
1 1 0
(so MT is indeed a matrix for T ).
x 2x + z
2 0 1
y
.
. Again, we verify that MS
=
For S, we have the matrix MS =
x + 3y
1 3 0
z
3 3 2
.
To find a matrix for S ◦ T , we multiply the two matrices: MS MT =
−5 4 1
a11 a12 a13 (b) You are given that the determinant a21 a22 a23 = 7. What is the value of the determinant
a31 a32 a33 2a11 + 3a13 a12 a13 2a31 + 3a33 a32 a33 ? (Explain all of your steps.)
2a21 + 3a23 a22 a23 (5 points) First, we find that




2a11 + 3a13 a12 a13
a11 a12 a13
det  2a31 + 3a33 a32 a33  = 2 det  a31 a32 a33 
2a21 + 3a23 a22 a23
a21 a22 a23
There are two equivalent ways to arrive at (∗); one is to perform column
original matrix, keeping track of the effect of scaling any column:





2a11 + 3a13 a12 a13
2a11 a12 a13
a11





det 2a31 + 3a33 a32 a33 = det 2a31 a32 a33 = 2 det a31
2a21 + 3a23 a22 a23
2a21 a22 a23
a21
Another way to see (∗) is to recall that the determinant



2a11 + 3a13 a12 a13
a11 a12
det  2a31 + 3a33 a32 a33  = 2 det  a31 a32
2a21 + 3a23 a22 a23
a21 a22
(∗)
operations on the

a12 a13
a32 a33 
a22 a23
is linear in the columns of


a13
a13 a12
a33  + 3 det  a33 a32
a23
a23 a22
a matrix, so

a13
a33 
a23
and here, the second term has two identical columns, which means that its determinant is zero
(for example, via noting that it cannot be invertible).
Finally, recall the determinant flips sign under interchanging rows. We swap the bottom two:






2a11 + 3a13 a12 a13
a11 a12 a13
a11 a12 a13
det  2a31 + 3a33 a32 a33  = 2 det  a31 a32 a33  = −2 det  a21 a22 a23  = −14
2a21 + 3a23 a22 a23
a21 a22 a23
a31 a32 a33
Math 51, Winter 2015
Solutions to Second Exam — February 19, 2015
Page 4 of 10


1 2 3
4. (10 points) Consider the matrix A = 0 1 0
1 2 3
(a) Show that A has eigenvalues 0, 1, 4; and for each eigenvalue find a basis for the corresponding
eigenspace. Show all reasoning.
Verifying eigenvalues (3 points): The first part of the problem is to verify that 0, 1, and 4
are eigenvalues for A; here are two ways to do this.
Solution 1: The eigenvalues are the roots of the characteristic polynomial of A, which we may
compute by expanding det(λI3 − A) along the first row:


λ − 1 −2
−3
λ − 1 −3


0
λ−1
0
det
= 0 + (λ − 1) det
+0
−1 λ − 3
−1
−2 λ − 3
= (λ − 1) [(λ − 1)(λ − 3) − 3]
= (λ − 1)(λ2 − 4λ) = (λ − 1)λ(λ − 4)
So the eigenvalues are 0, 1, and 4.
Solution 2: For this solution, find the eigenvectors first (see below); then observe that by doing
so we have shown that the nullspace N (λI3 − A) is nontrivial for each of λ = 0, 1, 4. This implies
that A has eigenvalues 0, 1, and 4 (and in fact these are all the eigenvalues, since a matrix of
size n cannot have more than n eigenvalues; they’re roots of a polynomial of degree n).
Finding eigenvectors (5 points): We need to find a basis for the nullspace N (λI3 − A) for
each of the three eigenvalues λ.
λ = 0: By row operations, we find








1 0 3
1 2 3
−1 −2 −3
−1 −2 −3
N  0 −1 0  = N  0 −1 0  = N 0 1 0 = N 0 1 0 .
0 0 0
0 0 0
0
0
0
−1 −2 −3
hxi
A vector yz lies in this nullspace if and only if

 
  
−3
−3z
x
x + 3z = 0
⇐⇒ y  =  0  = z  0 
y=0
1
z
z
 
 −3 
Thus,  0  is a basis for the eigenspace corresponding to the eigenvalue zero.


1
λ = 1: By row operations, we find








0 −2 −3
1 2 2
1 0 −1
1 0 −1
0
0  = N 0 2 3 = N 0 2 3  = N 0 1 3/2 .
N  0
−1 −2 −2
0 0 0
0 0 0
0 0 0
hxi
A vector yz lies in this nullspace if and only if
  



x
z
1
x−z =0
⇐⇒ y  = −3/2z  = z −3/2
y + 3/2z = 0
z
z
1


1



−3/2 is a basis for the eigenspace corresponding to the eigenvalue one.
Thus,


1
Math 51, Winter 2015
Solutions to Second Exam — February 19, 2015
λ = 4: By row operations, we

3 −2
3
N  0
−1 −2
A vector
hxi
y
z
find


−3
1
0  = N 0
1
3

1
= N 0
0

1


0
=N
0
Page 5 of 10

2 −1
3
0 
−2 −3

2 −1
3
0 
−8 0



2 −1
1 0 −1
1 0  = N 0 1 0 
0 0
0 0 0
lies in this nullspace if and only if
   
 
x
z
1
x−z =0





⇐⇒ y = 0 = z 0
y=0
z
z
1
 
 1 
Thus, 0 is a basis for the eigenspace corresponding to the eigenvalue four.


1
(b) Does there exist a basis for R3 consisting of eigenvectors of A? If so, give one; if not, explain why
not.
(2 points) Yes. It is a general fact that eigenvectors for distinct eigenvalues must be independent.
(See the proof of Proposition 23.3 in the textbook.) Alternatively, one could check by hand that
the three eigenvectors found above are independent. In any case, the three eigenvectors we found
are independent, so they are guaranteed to span R3 . Hence, our basis is:
  
  
1 
1
 −3
 0  , −3/2 , 0


1
1
1
Math 51, Winter 2015
Solutions to Second Exam — February 19, 2015
Page 6 of 10
5. (10 points) Suppose we are given the following facts about the 2 × 2 matrix A:
a b
• the entries of A have the form A =
for real numbers a, b;
b 12
• the determinant of A is zero; and
• λ = 1 is an eigenvalue of A.
(a) Explain why A cannot be the matrix of a rotation in R2 .
(3 points) There are many ways to do this, so we will give several.
Method One: We are given that det(A) = 0, whereas the determinant of a rotation matrix (let’s
call it Rθ ) by, say, θ, is nonzero, either because
(i) Rθ has an inverse, namely R−θ (rotating counterclockwise by θ and then rotating in the
opposite direction by θ leaves a vector fixed), so is invertible; or
(ii) By explicit calculation,
cos θ − sin θ
= cos2 θ + sin2 θ = 1 6= 0.
det(Rθ ) = sin θ cos θ Method Two: We are given that A has 1 as an eigenvalue. A rotation matrix has 1 as an
eigenvalue if and only if it is rotation by a multiple of 2π (i.e., same as rotation by 0), since
rotation by any other amount will not leave a nonzero vector fixed. Thus, A = R0 = I2 . But
this is impossible, e.g. because det(A) = 0; or alternatively because A has a 1/2 in its lower
right corner, whereas I2 has a 1 there.
a b
cos θ − sin θ
Method Three: If A = Rθ , then we get:
=
sin θ cos θ
b 1/2
Comparing entries, we find that a = 1/2 = cos θ and b = −b = sin θ. But then b = 0, so
cos θ = 1/2 and sin θ = 0. But no θ satisfies both of these equations, e.g. because (1/2)2 +02 6= 1;
or alternatively because sin θ = 0 =⇒ θ = kπ for some integer k, hence cos θ = ±1, etc.
(b) Determine the characteristic polynomial pA (λ) = det(λI2 − A), simplifying your answer as much
as possible (and expressing it in terms of a, b only if necessary).
(4 points) det(A) = 0 implies that 0 is an eigenvalue of A. We are also given that 1 is an eigenvalue
of A, so the eigenvalues of A (since it is a 2×2 matrix) are 0, 1. Thus its characteristic polynomial
is pA (λ) = λ(λ − 1) = λ2 − λ.
(c) Find, with reasoning, a pair of values (a, b) for which all of the above conditions are true, and for
this choice of (a, b) give a simple verbal description of the linear transformation T (x) = Ax.
(3 points) If we compute the characteristic polynomial using the definition, we find
a
λ − a
1
1
−b 2
2
−b =λ − a+
λ+
− b2
pA (λ) = 1 = (λ − a) λ −
−b λ − 2
2
2
2
This has to match λ2 − λ as found above, so we have a + 12 = 1 and a2 − b2 = 0. (Note that
the second equation is expressing that det A = 0.) These two equations yield a = 12 , b = ± 12 .
Thus there are only two possibilities for (a, b), namely ( 12 , 12 ) and ( 12 , − 12 ). In the former case T
is projection onto the line y = x, and in the latter it is projection onto the line y = −x. (In each
case these claims can be checked by looking at what happens to e1 and e2 , or by checking that
T kills a nonzero vector orthogonal to the line and fixes a nonzero vector on the line.)
Math 51, Winter 2015
Solutions to Second Exam — February 19, 2015
Page 7 of 10
6. (10 points) Suppose A is a symmetric 3 × 3 matrix with eigenbasis B = {v1 , v2 , v3 } and associated
eigenvalues λ1 = 2, λ2 = −1, λ3 = 1.
(a) If x = c1 v1 + c2 v2 + c3 v3 , use the information provided above to find an expression for A5 x.
(2 points) A5 v1 = λ5 v1 , and similarly for v2 , v3 . Thus
A5 x = c1 A5 v1 + c2 A5 v2 + c3 A5 v3
= c1 λ51 v1 + c2 λ52 v2 + c3 λ53 v3
= 32c1 v1 − c2 v2 + c3 v3 .
 


2/3
2/3
(b) For this and part (c), suppose that two of the vectors of B are v1 = 1/3 and v2 = −2/3.
2/3
−1/3
Find, with reasoning, a valid possibility for the third vector v3 which has unit length; simplify
your answer as much as possible. (Hint: recall A is symmetric.)
(4 points) Because A is symmetric, the Spectral Theorem (that A has an orthonormal eigenbasis)
applies, and we also know that eigenvectors for A corresponding to different eigenvalues must be
orthogonal. Now in R3 , since v1 and v2 are linearly independent, there will be a unique direction
that is perpendicular to both of them. Therefore a natural candidate for v3 is a scalar multiple
of

 

(−1/9) − (−4/9)
1/3
v1 × v2 =  (4/9) − (−2/9)  =  2/3 
(−4/9) − (2/9)
−2/3
2
2
2
But this vector has unit length already, since 13 + 23 + − 23 = 19 + 49 + 94 = 1, so we can put




−1/3
1/3
v3 =  2/3  . (Note: the only other possible answer is to flip all signs and give v3 = −2/3 .)
2/3
−2/3
(c) Find A5 e1 , showing all reasoning; you may leave your answer expressed as an explicit linear
combination of the vectors v1 , v2 , v3 from part (b). (Hint: it may help to notice that v1 and v2
also have unit length.)
(4 points) All three of v1 , v2 , v3 are unit vectors, and they must be mutually orthogonal because
they are eigenvectors of A corresponding to different eigenvalues (or via directly computing that
v1 ·v2 = 0 and using propertieshof ithe cross product). Thus, {v1 , v2 , v3 } is an orthonormal basis.
1
This means we can write e1 = 0 as a combination of these vectors as follows (here taking the
0
1/3 choice v3 = 2/3 ):
−2/3
e1 = (e1 · v1 )v1 + (e1 · v2 )v2 + (e1 · v3 )v3
2
2
1
= v1 + v 2 + v3 .
3
3
3
Therefore by part (a),
A5 e1 =
64
2
1
v1 − v2 + v3 .
3
3
3
Math 51, Winter 2015
Solutions to Second Exam — February 19, 2015
Page 8 of 10
7. (10 points) For k a fixed real number, consider the two-variable quadratic form Q(x, y) = 2x2 +kxy+y 2 .
(a) Find a value of k so that Q is positive definite, and explain your reasoning.
(3 points)
Solution 1 (“I’m feeling lucky”): Suppose k = 0. Then Q(x, y) = 2x2 + y 2 , which is positive
for all (x, y) 6= (0, 0) since nonzero squares are positive; thus, this Q is positive definite.
Solution 2 (more
systematic; helps guide part (b)): For general k, the matrix corresponding to
k
2
Q is A = k 2 We can now find the eigenvalues of A:
1
2
λ − 2 −k
2
det(λI − A) = − k2 λ − 1
2
= λ2 − 3λ + 2 − k
4
The eigenvalues will then be
3+
q
32 − 4(2 −
λ1 =
λ2 =
3−
√
2
k2
4 )
=
3+
√
1 + k2
2
1 + k2
2
Note that λ1 > 0 for any k. Now, λ2 > 0 if and only if
p
3 > 1 + k 2 ⇐⇒ 9 > 1 + k 2
⇐⇒ 8 > k 2
√
√
⇐⇒ −2 2 < k < 2 2
Since Q is positive definite
√ if and only
√ if both eigenvalues of A are positive, we see this happens
for every k satisfying −2 2 < k < 2 2.
(b) Find a value of k so that Q is indefinite, and explain your reasoning.
(3 points) Q is indefinite if one eigenvalue is positive and one negative. Looking back
√ at Solution
√2
to part (a), this happens if λ2 < 0, which holds for any k satisfying either k > 2 2 or k < −2 2.
Note: without the help of an eigenvalue computation, an “I’m feeling lucky” style solution is a
bit riskier: one must successfully guess a valid value of k such as k = 3, and then successfully
show that such a Q is indefinite, say by finding pairs (a, b) and (c, d) for which Q(a, b) > 0 and
Q(c, d) < 0.
(c) Show that Q cannot be negative definite, regardless the value of k.
(4 points)
Solution 1: Notice that regardless the value of k, we have Q(1, 0) = 2 > 0. So Q cannot be
negative definite, which would require Q(x, y) < 0 for all (x, y) 6= (0, 0).
Solution 2: Referring to the eigenvalue computation in Solution 2 to part (a), we see λ1 is
a sum of two positive terms; hence, it will always be positive, so it is impossible for Q to be
negative definite.
Math 51, Winter 2015
Solutions to Second Exam — February 19, 2015
Page 9 of 10
3
2
2
2
1
1
1
0
0
0
−1
−1
−1
−2
−2
−2
−2
−1
0
x
1
2
3
−3
−3
A
−2
−1
0
x
1
2
3
−3
−3
B
3
3
2
2
2
1
1
1
0
0
0
y
3
y
−1
−1
−1
−2
−2
−2
−3
−3
−2
−1
0
x
1
2
3
−3
−3
D
−2
−1
0
x
1
2
3
E
−3
−3
3
3
3
2
2
2
1
1
1
0
0
0
y
y
−3
−3
y
y
3
y
3
y
y
8. (8 points) Each function below has its contour map depicted among those displayed; match each
function with its contour map. No justification is needed. (Note that exactly one diagram will not be
matched with a function; the scales on all diagrams are the same.)
−1
−1
−1
−2
−2
−2
−3
−3
−2
−1
0
x
1
2
3
G
−3
−3
−2
−1
0
x
1
2
3
H
−3
−3
−2
−1
0
x
1
2
3
C
−2
−1
0
x
1
2
3
F
−2
−1
(1 point each) See explanations below.
Function
f (x, y) = x2 + xy + y 2
f (x, y) = x2 − xy + y 2
f (x, y) = x2 + y 2
f (x, y) = x2 + y
f (x, y) = sin(x − 2y)
f (x, y) = y − sin x
f (x, y) = xy
f (x, y) = 3x2 + y 2
Contour map (one of A through I)
D
F
C
H
G
A
I
B
0
x
1
2
3
I
Math 51, Winter 2015
A
B
C
D
E
F
G
H
I
Solutions to Second Exam — February 19, 2015
Page 10 of 10
consists of sine waves, corresponding to f (x, y) = y − sin x.
consists of ellipses with major axes lying along the y-axis, corresponding to f (x, y) = 3x2 + y 2 .
consists of circles, corresponding to f (x, y) = x2 + y 2 .
consists of ellipses after rotation, corresponding to f (x, y) = x2 + xy + y 2 .
consists of hyperbolas after rotation, corresponding to f (x, y) = x2 − 3xy + y 2 .
consists of ellipses after rotation, corresponding to f (x, y) = x2 − xy + y 2 .
consists of lines of slope 12 , corresponding to f (x, y) = sin(x − 2y).
consists of parabolas, corresponding to f (x, y) = x2 + y.
consists of hyperbolas with asymptotes along the coordinate axes, corresponding to f (x, y) = xy.
The “tricky” distinction is between figures D and F; note also that E does not have a match among
the functions listed. But E is the contour map of an indefinite quadratic form, while D and F
correspond to (positive or negative) definite forms, so we’d be looking for very different functions
here. If we were to leave the task of matching these figures until all others have matches, then
f1 (x, y) = x2 + xy + y 2
and f2 (x, y) = x2 − xy + y 2
would be unmatched and we’d have to decide between these.
Method 1: Level sets of a quadratic form take the form QA (x, y) = c, where A is the (symmetric)
matrix of QA ; in coordinates u, v with respect to an orthonormal eigenbasis {w1 , w2 }, this becomes
λ1 u2 + λ2 v 2 = c
where λ1 , λ2 are the corresponding eigenvalues. Assuming λ1 > λ2 > 0, then the major axis lies along
the v-axis (i.e., the w2 direction), and the minor axis lies along the u-axis (i.e., the w1 direction).
h
i
1 1/2
Now consider f1 (x, y) = x2 + xy + y 2 ; its symmetric matrix is A1 = 1/2 1 . We find the eigenvalues
λ1 = 23 and λ2 = 12 (so f1 is positive definite), with eigenvectors corresponding to directions y = x and
y = −x respectively. Therefore, y = x should correspond to the minor axis while y = −x corresponds
to the major axis; this is figure D.
h
i
1 −1/2
Meanwhile, f2 (x, y) = x2 − xy + y 2 has symmetric matrix A2 = −1/2 1 ; its eigenvalues are also
found to be λ1 = 23 and λ2 = 12 (so f2 is also positive definite), but with eigenvectors corresponding
to directions y = −x and y = x respectively. Hence, the major and minor axes are interchanged from
the previous example; this is figure F.
Method 2 (without eigenvalues): We might note that the ellipses in both figures D and F seem to
have the same pair of principal axes; namely along the lines y = x and y = −x. But
f1 (x, x) = 3x2
and f1 (x, −x) = x2 ,
which means f1 should increase more steeply along y = x than it does along y = −x; this is consistent
with D since the contour lines are spaced more closely along y = x than along y = −x. Meanwhile,
f2 (x, x) = x2
and f2 (x, −x) = 3x2 ,
which gives the reverse situation, consistent with F, since here the contour lines are spaced more
closely along y = −x than along y = x. (Note that if we were still considering E as possibly having
a match between f1 , f2 , we’d be expecting to see that function take different signs along y = x and
y = −x, given the orientation of E; but this is not the case for either f1 or f2 , so E has no match.)