Midterm Exam I

Midterm Exam I - Solutions
Tuesday, March 3
Question 1 (20 pt.)
A quadratic polynomial is a function of the form
f (x) = ax2 + bx + c
where a, b, c are constant numbers.
(a) Write a system of equations whose solution gives you the values of the constants a, b, c for
the quadratic polynomial f (x) that satisfies the following conditions:
f (1) = 2,
f (−1) = 4,
f 0 (1) = 3.
(5 pt.)
(b) Write the augmented matrix of the system from part (a) and bring it to reduced row-echelon
form. Write explicitly which row operations you perform. (10 pt.)
(c) Find all the solutions of the system and write explicitly the quadratic polynomials f (x) that
satisfy the conditions in part (a). (5 pt.)
Solution
(a) The derivative of f (x) is f 0 (x) = 2ax + b. The three conditions give you the equations:
f (1) = a · 12 + b · 1 + c = a + b + c = 2
f (−1) = a(−1)2 + b(−1) + c = a − b + c = 4
f 0 (1) = 2a · 1 + b = 2a + b = 3
Therefore the system of equations we
are looking for is
a + b + c = 2 a − b + c = 4 2a + b
=3 (b) The augmented matrix of the system is


1 1 1 2
 1 −1 1 4 
2 1 0 3
We can bring it to reduced row-echelon form as follows:





1 1 1 2
1 1
1
2
1 1
1
R2 →R2 /(−2)
→R2 −R1
 1 −1 1 4  −R
2  −−−−−−−−→  0 1
0
−2−−−−
−−→  0 −2 0
R3 →R3 −2R1
2 1 0 3
0 −1 −2 −1
0 −1 −2





1 0 1
3
1 0 1 3
1
R3 →R3 /(−2)
R1 →R1 −R2
R1 →R1 −R3
−−
−−−−−→  0 1 0 −1  −−−−−−−−→  0 1 0 −1  −−
−−−−−→  0
R3 →R3 +R2
0 0 −2 −2
0 0 1 1
0

2
−1  · · ·
−1

0 0 2
1 0 −1 
0 1 1
(c) The system has a unique solution, namely (a, b, c) = (2, −1, 1). So, the only quadratic function
satisfying the given conditions is
f (x) = 2x2 − x + 1.
Question 2 (15 pt.)
Consider the system of linear equations
− 7x1 + 5x2 − 5x3
x1 + x2 − x3
3x1 − 2x2 + 2x3
4x1
+
+
−
+
The reduced row-echelon form of the augmented

1 0 0
 0 1 −1

 0 0 0
0 0 0
matrix of the system is

1 0 0
4 0 −5 

0 1 2 
0 0 0
13x4 + 8x5
5x4 + x5
5x4
4x4 + x5
=
=
=
=
−9
−3
10
2
(a) Find the rank of the coefficient matrix of the system. (5 pt.)
(b) Find all the solutions of the system. Write them in vector form (with some parameters, if
needed). (10 pt.)
Solution
(a) The rank of the coefficient matrix of the system is the number of leading 1’s of its reduced
row-echelon form. The reduced row-echelon form of the coefficient matrix is the one of the
augmented matrix without the last column, i.e.


1 0
0 1 0
 0 1 −1 4 0 


 0 0
1 
0 0 0 0
0 0 0
So the rank is 3.
(b) The general solution of the system can be found directly from the reduced row-echelon form
of the augmented matrix of the system. The free variables of the system are x3 and x4 . Let
x3 = s and x4 = t. Then
  
 

 


x1
−t
0
0
−1
 x2   s − 4t − 5   −5 
1
 −4 
  
 

 












s
~x =  x3  = 
 =  0  + s1 + t 0 .
 x4  
  0 
0
 1 
t
2
2
0
0
x5
2
Question 3 (15 pt.)
Consider the system of linear equations
− 7x + 21y = 11 4x − 12y = 5 The reduced row-echelon form of the augmented matrix of the system is
1 −3 0
0 0 1
(a) Find the rank of the coefficient matrix of the system. (5 pt.)
(b) Find all the solutions of the system. Write them in vector form (with some parameters, if
needed). (5 pt.)
(c) According to your answer in part (b), what can you say about the lines −7x + 21y = 11 and
4x − 12y = 5? Are they parallel, do they intersect at one point, or do they coincide? (5 pt.)
Solution
(a) The rank of the coefficient matrix of the system is found as in Question 2, part (b). The
coefficient matrix of the system is
1 −3
0
0
So the rank is 1.
(b) The system is inconsistent since the reduced row-echelon form of the augmented matrix has
a leading 1 in the last column. So there are no solutions.
(c) The solutions of the system correspond to the points on the plane of the intersection of the
lines given by the equations −7x + 21y = 11 and 4x − 12y = 5. Since there are no solutions,
the two lines do not intersect, i.e. they are parallel.
3
Question 4 (10 pt.)
Let A, B, C be 3 × 3 matrices. The matrices A and B are given as




1
0
2
0 2 −1
A =  −2 −1 1  , B =  −3 7 0 
0
0 −1
1 4 −1
If the inverse of A and the expression

1
0
A−1 =  −2 −1
0
0
A(B + C) are also given



2
2 13 −1
−5  , A(B + C) =  −1 −7 0 
−1
0 −4 0
calculate the matrix C.
Solution
The product A−1 · A(B + C) is equal to
A−1 · A(B + C) = (A−1 A)(B + C) = I(B + C) = B + C,
where I is the 3 × 3 identity matrix (we have used the associative property of matrix multiplication
and the properties of the inverse and identity matrices). So, the matrix B + C is

 


2 5 −1
2 13 −1
1
0
2
B + C = A−1 · A(B + C) =  −2 −1 −5   −1 −7 0  =  −3 1 2 
0 4 0
0 −4 0
0
0 −1
The matrix C is of course equal to the

2

C = (B + C) − B = −3
0
difference (B + C) − B, so that

 
 
2
3 0
0 2 −1
5 −1
1 2  −  −3 7 0  =  0 −6 2 
−1 0 1
1 4 −1
4 0
4
Question 5 (10 pt.)
Let T : R2 → R2 be the linear transformation that rotates a vector (counter-clockwise) by an angle
of 5π/6.
(a) Find the matrix R associated to T . Use your answer to find the vector that results after
rotating ~x = [ 1 1 ]t (counter-clockwise) by an angle of 5π/6. (5 pt.)
(b) Find the matrix of the inverse linear transformation of T , i.e. of T −1 . Argue geometrically
to find the inverse, and then verify your result by calculating the matrix associated to the
compositions T −1 ◦ T . Do not calculate R−1 directly. (5 pt.)
Solution
(a) The matrix associated to T is
√
√
1
cos(5π/6) − sin(5π/6)
− 3/2 −1/2
3
1
√
√
R=
=
=−
.
sin(5π/6) cos(5π/6)
1/2
− 3/2
3
2 −1
The vector we get after rotating ~x by an angle of 5π/6 is
√
√
1
1
1
3 √1
3 +√1
T (~x) = R~x = −
=−
.
1
3
2 −1
2 −1 + 3
(b) The transformation T rotates a vector by an angle of 5π/6. Its inverse is the transformation
that counters this effect. So it is the transformation that rotates a vector by an angle of
−5π/6. This is given by
√
√
1
− 3/2
cos(−5π/6) − sin(−5π/6)
1/2
3
−1
√
√
=
S=
=−
.
sin(−5π/6) cos(−5π/6)
−1/2 − 3/2
1
3
2
We verify this by showing that the matrix associated to T −1 ◦ T is the 2 × 2 identity matrix.
The matrix of the composition T −1 ◦ T is the product of the matrices associated to T −1 and
T . This is
√
√
1
1 4 0
1
1 0
3 √
−1
3 √1
.
· −
=
=
RS = −
0 1
3
3
1
−1
2
2
4 0 4
5
Question 6 (15 pt.)
Let T : R2 → R2 be the linear transformation that reflects a vector about the line y = x.
(a) Find the matrix R associated to T . Using your answer, find the vector that results after
reflecting ~x = [ −2 1 ]t about the line y = x. (10 pt.)
(b) Find the matrix of the inverse linear transformation of T , i.e. of T −1 . Argue geometrically
to find the inverse, and then verify your result by calculating the matrix associated to the
composition T −1 ◦ T . Do not calculate R−1 directly. (5 pt.)
Solution
(a) The vector w
~ = [ 1 1 ]t lies along the line y = x. So, the matrix of the linear transformation
that projects a vector on the line y = x is
2
1
1 1 1
1
1·1
P = 2
=
1 + 12 1 · 1 1 2
2 1 1
Then the matrix associated to T is
1 1 1
0 1
1 0
1 1
1 0
.
=
−
=
−
R = 2P − I = 2 ·
1 0
0 1
1 1
0 1
2 1 1
The vector we get after reflecting ~x about the line y = x is
1
−2
0 1
.
=
T (~x) = R~x =
−2
1
1 0
(b) The transformation T reflects a vector about the line y = x. Its inverse is the transformation
that counters this effect. If we reflect a vector about the same line twice (for instance about
the line y = x), we get the original vector. So, the inverse of T is itself, i.e. T −1 = T , and is
given by the matrix
0 1
R=
.
1 0
We verify this by showing that the matrix associated to T −1 ◦ T is the 2 × 2 identity matrix.
The matrix of the composition T −1 ◦ T is the product of the matrices associated to T −1 and
T . This is
0 1
0 1
1 0
R·R=
=
.
1 0
1 0
0 1
6
Question 7 (20 pt.)
Consider the vectors
 
1
~u1 =  1  ,
1


1
~u2 =  −1  ,
1
 
0
~u3 =  0  .
2
Let T : R3 → R2 be a linear transformation such that
3
7
T (~u1 ) =
, T (~u2 ) =
,
2
−4
0
T (~u3 ) =
6
(a) Write each of the base vectors ~e1 , ~e2 , ~e3 as a linear combination of the ~u1 , ~u2 , ~u3 (just write
the expressions, you do not have to justify how you found them). (10 pt.)
(b) Find the matrix associated to T . (10 pt.)
Solution
(a) We can write the base vectors ~e1 , ~e2 , ~e3 as linear combinations of ~u1 , ~u2 , ~u3 as follows:
  
  
 
0
1
1
1
1
1
1
1
~e1 =  0  =  1  +  −1  −  0  = ~u1 + ~u2 − ~u3
2
2
2
2
2
1
1
0
 
  

0
1
1
1
1
1
~e2 =  1  =  1  −  −1  = ~u1 − ~u2
2
2
2
0
1
1
 
 
0
0
1
1
~e3 =  0  =  0  = ~u3
2
2
1
2
(b) The columns of T are T (~e1 ), T (~e2 ), and T (~e3 ). We have
1
1
1
1
1
1
~u1 + ~u2 − ~u3 = T (~u1 ) + T (~u2 ) − T (~u3 )
T (~e1 ) = T
2
2
2
2
2
2
1 7
1 0
1 3
5
3/2
7/2
0
−
=
+
=
+
−
=
−4
1
−2
3
2 2
2 −4
2 6
1
1
1
1
3/2
7/2
−2
T (~e2 ) = T
~u1 − ~u2 = T (~u1 ) − T (~u2 ) =
−
=
1
−2
3
2
2
2
2
1
1
0
T (~e3 ) = T
~u3 = T (~u3 ) =
3
2
2
Therefore, the matrix associated to T is
5 −2 0
−4 3 3
7
.
Question 8 (20 pt.)
Find which of the following transformations are linear.
(i) The transformation T : R2 → R2 given by
T (~x) = ~x + ~u for all ~x ∈ R2 ,
where ~u = [ 2 − 1 ]t .
(ii) The transformation T : R2 → R given by
for all ~x ∈ R2 .
T (~x) = ~u · ~x
(iii) The transformation T : R2 → R given by
for all ~x ∈ R2 .
T (~x) = ~x · ~x
(iv) The transformation T : R2 → R2 given by
for all ~x ∈ R2 .
T (~x) = 0
Solution
We check which of these transformations satisfy the properties
• T (~x + ~y ) = T (~x) + T (~y ) for all vectors ~x, ~y in Rn , and
• T (λ~x) = λ T (~x) for all vectors ~x in Rn and all numbers λ.
(i) This transformation is not linear. Indeed, the property T (~x + ~y ) fails for ~x = ~y = 0:
T (0 + 0) = T (0) = 0 + ~u = ~u,
but T (0) + T (0) = (0 + ~u) + (0 + ~u) = 2~u,
and clearly ~u 6= 2~u.
(ii) This transformation is linear. For any vectors ~x, ~y in R2 and any number λ :
T (~x + ~y ) = ~u · (~x + ~y ) = ~u · ~x + ~u · ~y = T (~x) + T (~y )
T (λ~x) = ~u · (λ~x) = λ(~u · ~x) = λ T (~x)
(we have used properties of the dot product).
(iii) This transformation is not linear. Indeed, the property λ T (~x) fails for ~x = ~e1 and λ = 2:
T (2~e1 ) = (2~e1 ) · (2~e1 ) = 4(e~1 · ~e1 ) = 1,
but
2 T (~e1 ) = 2(e~1 · ~e1 ) = 2.
(we have used that ~e1 · ~e1 = 1 · 1 + 0 · 0 = 1).
(iv) This transformation is linear. For any vectors ~x, ~y in R2 and any number λ :
T (~x + ~y ) = 0, and T (~x) + T (~y ) = 0 + 0 = 0,
T (λ~x) = 0, and λ T (~x) = λ · 0 = 0.
8