Midterm2Practice Solution
Midterm2Practice Solution
Practice Midterm 2
A few remarks:
1. A is invertible.
4. rank(A) = n.
5. det(A) 6= 0.
6. 0 is not an eigenvalue of A.
Recall that
If A is an n × n matrix, then rank(A) = n if and only if the row vectors of A form a basis for
Rn , or, equivalently, the column vectors of A form a basis for Rn . More details in Syllabus,
March 14 Lecture.
Remember that
R2 − R1
1 0 0 0 1 0 0 0
R − R1
1 1 1 0 3
0 1 1 0
1 1 1 0 0 1 1 0
but
R3 − R2
1 0 0 0 1 0 0 0
R − R3
1 1 1 0 2
0 0 0 0
1 1 1 0 0 0 0 0
is not a composition of elementary row operations; this is not allowed in the elimination
method.
1
Problem 1. Solve the following system of linear equations
1 1 1 1 4
1 2 3 4 10
1 3 6 10 20 .
1 4 10 20 35
1
1
Answer:
1.
1
Solution. Using the elimination method:
R2 − R1
R3 − R1 1 1 R3 − 2R2
1 1 1 1 4 1 1 4 1 1 1 1 4
R4 − R1 0 1 R4 − 3R2
1 2 3 4 10 2 3 6 0 1 2 3 6
1 3 6 10 20 0 2 5 9 16 0 0 1 3 4
1 4 10 20 35 0 3 9 19 31 0 0 3 10 13
R1 − R4
4 R2 − 3R4 1 1 R1 − R3
1 1 1 1 1 0 3
R4 − 3R3
0 1 2 3 6 R3 − 3R4 0 1
2 − 2R3
2 0 3 R
0 0 1 3 4 0 0 1 0 1
0 0 0 1 1 0 0 0 1 1
1 1 0 0 2 1 0 0 0 1
0
1 0 0 1 R 1 − R2 0 1
0 0 1
.
0 0 1 0 1 0 0 1 0 1
0 0 0 1 1 0 0 0 1 1
2
1 0 1 0 1 0 1 0
R1 − R2 R2 − R3
0 1 −1 1 0 1 −1 0 .
0 0 0 1 0 0 0 1
Therefore,
• 1 0 1 0 , 0 1 −1 1 , 0 0 0 1 is a basis for row(A).
1 1 1 1 1 0 1
• 0 , 1 , 1 is a basis for col 0 1 −1 1
0 1 −1 0 1 −1 −1
1 0 0 1 0 1 0
(because 0 , 1 , 0 is a basis for col 0 1 −1 0); and
0 0 1 0 0 0 1
−1
1
•
1 is a basis for null(A).
0
The rank of A is 3.
R2 + R1
2 −4 0 2 1 1 −2 1 4 4
R ↔ R3 R − 2R1
2) −1 2 1 2 3 1 −1 2 1 2 3 3
1 −2 1 4 4 2 −4 0 2 1
1 −2 1 4 4 1 −2 1 4 4
R3 + R2 R2 /2
0 0 2 6 7 0 0 2 6 7
0 0 −2 −6 −7 0 0 0 0 0
1 −2 1 4 4 1 −2 0 1 1/2
R − R2
0 0 1 3 7/2 1 0 0 1 3 7/2 .
0 0 0 0 0 0 0 0 0 0
Therefore,
• 1 −2 0 1 1/2 , 0 0 1 3 7/2 is a basis for row(A);
2 0 2 −4 0 2 1
• −1 , 1 is a basis for col −1 2 1 2 3
1 1 1 −2 1 4 4
1 0 1 −2 0 1 1/2
(because 0 , 1 is a basis for col 0 0 1 3 7/2 );
0 0 0 0 0 0 0
2 −1 −1/2
1 0 0
• 0 , −3,−7/2 is a basis for null(A).
0 1 0
0 0 1
3
Problem 3. Find all possible values of rank(A) as a varies
1 2 a
A = −2 4a 2 .
a −2 1
• if a = 2, then rank(A) = 2;
• otherwise rank(A) = 3.
R2 + 2R1
1 2 a 1 2 a
R3 − aR1
A = −2 4a 2 0 4a + 4 2 + 2a = B
a −2 1 0 −2 − 2a 1 − a2
R2 /(4a + 4)
1 2 a 1 2 a 1 2 a
R /(−2 − a) R − R2
0 4a + 4 2 + 2a 3 0 1 1/2 = 0 1 1/2 3
(1−a)(1+a)
0 −2 − 2a 1 − a2 0 1 −2−2a
0 1 a−1
2
1 2 a
0 1 1/2 = C.
0 0 a−2
2
Let us again consider two cases.
Case 2a: a = 2. Then
1 2 a 1 2 a
0 1 1/2 = 0 1 1/2
0 0 a−2
2 0 0 0
4
has rank 2.
Case 2b: a 6= 2. Then
1 2 a 1 2 a
R3 / a−2
2
0 1 1/2 0 1 1/2 .
a−2
0 0 2 0 0 1
Answer: c and d are any numbers, while b = c and a = c/2. In other words, all matrices
have the form
c/2 c
.
c d
a =a
c = 2a
,
2a = b
2c = 2b
or:
0 =0
−2a + c =0
,
2a − b =0
−2b + 2c =0
or:
0 0 0 0 0
−2 0 1 0 0
2 −1 0 0 0 .
0 −2 2 0 0
Solving the system, we obtain that c, d can be taken to be any numbers, and b = c, a =
c/2.
Problem 5. Find a basis for the minimal subspace in R4 containing the points (1, −1, 0, 0),
(0, 1, 0, −1), (0, 0, −1, 1), (−1, 0, 1, 0).
5
Answer: 1 −1 0 0 , 0 1 0 −1 , 0 0 −1 1 .
0 0 0 0
Therefore, 1 −1 0 0 , 0 1 0 −1 , 0 0 −1 1 is a basis.
Problem 6. Find a basis for the minimal subspace in R3 containing the point (0, 1, 1)
and the line
x 1 1
y = 0 + t 1 .
z 1 0
0 1 1
Solution. The subspace is equal to the span of 1 , 0 , 1 – these are linearly indepen-
1 1 0
dent vectors.
6
2) u + v, v is a basis for R2 ;
3) u + v, u − v is a basis for R2 .
Solution: 1) Since (u + v) − 1(u + v) = 0, the vectors u + v, u + v are linearly dependent;
thus they do not form a basis.
c1 (u + v) + c2 v = 0.
Then
c1 u + (c1 + c2 )v = 0.
Since u and v are linearly independent, we obtain that c1 = 0 and c1 + c2 = 0. This
implies that c1 = c2 = 0, which shows that u, v are linearly independent.
c1 (u + v) + c2 (u − v) = 0.
Then
(c1 + c2 )u + (c1 − c2 )v = 0.
Since u and v are linearly independent, we obtain
c1 + c2 = 0
c1 − c2 = 0.
Solving the last system of linear equations, we obtain c1 = c2 = 0.
Remark: vectors u, v are linearly independent if and only if u + cv, v are linearly inde-
pendent for every c (the same argument as in 2) ). Similarly, u, v, w are linearly independent
if and only if u + cv, v, w are linearly independent for every c; and so on.
7
2 4 1 4
2) K = 6= 2K = .
2 10 1 8
1 −1 0 0
3) S +S = 6= . (If S was a liner transformation, then we would have
0 0 2 0
1 −1 0 0
S +S =S = .)
0 0 0 0
because
x 8 −7 x
N =
y 2 7 y
(the standard form).
Solution. Reflecting a vector in the x-axis means negating the y and z-coordinates. So
x x 1 0 0 x
F y = −y = 0 −1 0 y .
z −z 0 0 −1 z
Answer: 4.
Solution 1. Expanding along the second row, and then along the first row we obtain:
1 −1 0 3
1 0 3
2 5 2 6 2 6 2 2
det(A) =
= −1 2 2 6 = −1
− 3 1 2 =
0 1 0 0 2 1
1 2 1
1 4 2 1
8
Solution 2. Using the elimination method:
R1 + R3
1 −1 0 3 R2 − 2R1
R2 − 7R3
1 −1 0 3
2 5 2 6 R4 − R1 0 7 2 0 R4 − 5R3
det(A) = = =
0 1 0 0
0 1 0 0
1 4 2 1 0 5 2 −2
R /2
0 3 2
1 0 1 0 0 3
R4 /2 R −R
1 0 4 = 2
0 0 2 0 = 0 0
0 4
1 0 0 0 1 0 0
0 0 2 −2 0 0 1 −1
R + 3R4
0 3 1
1 0 1 0 0 0
R ↔R
1 0 2 = 3
0 0 0 1 0 0
4 − 4 = 4.
0 1 0 0 0 0 1 0
0 0 0 −1 0 0 0 −1
Solution. We have:
R2 − 2R1
2 3 0 1 0 0 1 −2 −1 0 1 0
0 1 0 1
R ↔ R2 1 0 0 R3 − 2R1
1 −2 −1 2 3 0
2 0 −1 0 0 1 2 0 −1 0 0 1
1 −2 −1 0 1 0 1 −2 −1 0 1 0
R2 − 2R3 −R2
0 7 2 1 −2 0 0 −1 0 1 2 −2
0 4 1 0 −2 1 0 4 1 0 −2 1
R1 + 2R2
1 −2 −1 0 1 0 1 0 −1 −2 −3 4
R3 − 4R2 R1 + R3
0 1 0 −1 −2 2 0 1 0 −1 −2 2
0 4 1 0 −2 1 0 0 1 4 6 −7
1 0 0 2 3 −3
0 1 0 −1 −2
2 .
0 0 1 4 6 −7
9
2 3 −3
Therefore, A−1 = −1 −2 2 .
4 6 −7
The fact that A is invertible also follows from det(A) = 1.
is invertible.
R1 /a
R2 /a
a 0 0 1 0 0 1 0 0 1/a 0 0
R3 /a R − aR1
1 a 0 0 1 0 1/a 1 0 0 1/a 0 2
0 1 a 0 0 1 0 1/a 1 0 0 1/a
1 0 0 1/a 0 0 1 0 0 1/a 0 0
R − aR2
0 1 0 −1/a2 1/a 0 3
0 1 0 −1/a2 1/a 0 ,
0 1/a 1 0 0 1/a 0 0 1 1/a3 −1/a2 1/a
1/a 0 0
−1
and A = −1/a
2 1/a 0 .
1/a 3 2
−1/a 1/a
10