0% found this document useful (0 votes)
101 views10 pages

Midterm2Practice Solution

This document provides a practice midterm for a linear algebra course. It includes: 1) A theorem stating six equivalent conditions for a matrix to be invertible, including having a non-zero determinant. 2) Formulas relating the rank, column space, and null space of a matrix. 3) Three practice problems involving solving systems of linear equations, finding bases of row/column/null spaces, and determining the possible ranks of a variable matrix.

Uploaded by

ferdewes weslati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views10 pages

Midterm2Practice Solution

This document provides a practice midterm for a linear algebra course. It includes: 1) A theorem stating six equivalent conditions for a matrix to be invertible, including having a non-zero determinant. 2) Formulas relating the rank, column space, and null space of a matrix. 3) Three practice problems involving solving systems of linear equations, finding bases of row/column/null spaces, and determining the possible ranks of a variable matrix.

Uploaded by

ferdewes weslati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

MAT 211: Linear Algebra

Practice Midterm 2

Stony Brook University Spring 2019


Dzmitry Dudko

A few remarks:

Theorem. Let A be an n × n matrix. The following statements are equivalent:

1. A is invertible.

2. Ax = b has a unique solution for every vector b ∈ Rn .

3. Ax = 0 has only the trivial solution.

4. rank(A) = n.

5. det(A) 6= 0.

6. 0 is not an eigenvalue of A.

Recall that

rank(A) = dim col(A) = dim row(A) = n − dim null(A).

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

is a composition of elementary row operations, because we may rewrite:


     
1 0 0 0 1 0 0 0 1 0 0 0
R − R1 R − R1
1 1 1 0  2 0 1 1 0  3

0 1 1 0 ,

1 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

Problem 2. Give bases for row(A), col(A), null(A), where


 
1 1 0 1
1) A = 0 1 −1 1  ,
0 1 −1 −1
 
2 −4 0 2 1
2) A = −1 2 1 2 3 .
1 −2 1 4 4
Solution. Using elementary row operations:
     
1 1 0 1 1 1 0 1 1 1 0 1
R − R2 R /(−2)
1) 0 1 −1 1  3 0 1 −1 1  3 0 1 −1 1
0 1 −1 −1 0 0 0 −2 0 0 0 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

Answer. • if a = −1, then rank(A) = 1;

• if a = 2, then rank(A) = 2;

• otherwise rank(A) = 3.

Solution. Using the elimination method, we obtain:

  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

Let us consider two cases.


Case 1: a = −1. Then the matrix B is equal to
 
1 2 a
0 0 0 .
0 0 0

Therefore, B (and hence A) has rank 1.


Case 2: a 6= −1. Then we divide the second and the third rows of B by 4a + 4 and
−2 − 2a respectively:

  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

The last matrix has rank 3.



a b
Problem 4. Find all 2 × 2 matrices such that
c d
     
a b 1 2 1 0 a b
= .
c d 0 0 2 0 c d

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

Solution. Evaluating the products, we obtain:


   
a 2a a b
= .
c 2c 2a 2b

We need to solve the system of linear equations:

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 .

Solution. We need to find a basis for


 
1 −1 0 0
        0 1 0 −1
span 1 −1 0 0 , 0 1 0 −1 , 0 0 −1 1 , −1 0 1 0 = row  .
0 0 −1 1 
−1 0 1 0

Using the elimination method:


     
1 −1 0 0 1 −1 0 0 1 −1 0 0
0 −1  R4 + R1  R4 + R2
0 −1 0 −1
0 1 0 1 0 1
   
0 0 −1 1  0 0 −1 1  0 0 −1 1 
−1 0 1 0 0 −1 1 0 0 0 1 −1
 
1 −1 0 0
R4 + R3 
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

Answer: any basis of R3 . For example:


     
0 1 1
• 1 , 0 , 1; or
    
1 1 0
     
1 0 0
• 0 , 1 , 0
0 0 1

     
0 1 1
Solution. The subspace is equal to the span of 1 , 0 , 1 – these are linearly indepen-
1 1 0
dent vectors.

Problem 7. Let u, v be a basis for R2 . Show that

1) u + v, u + v is not a basis for R2 ;

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.

2) Let us show that u + v, v are linearly independent. Suppose

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.

3) Let us show that u + v, u − v are linearly independent. Suppose

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.

Problem 8. Are the following transformations linear?


     
x 1 x−y
1) T =x +7 ,
y 2 3
     
x 1 y
2) K =x + ,
y 2+y x
   
x y
3) S = .
y |x|
Answer: 1) no, 2) no, 3) no.
     
0 0 0
Solution. 1) T = 6= , hence T is not a linear transformation. (If T was a
0 21 0
   
0 0
linear transformation, then we would have T = .)
0 0

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

An example of a linear transformation:


     
x 1 x−y
N =x +7
y 2 y

because     
x 8 −7 x
N =
y 2 7 y
(the standard form).

Problem 9. Let F be the linear transformation from R3 to R3 such that F reflects a


vector in the x-axis. Compute the standard matrix of F .

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

Problem 10. Compute the determinant of


 
1 −1 0 3
2 5 2 6
A= 0 1
.
0 0
1 4 2 1

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

−(2 − 12) − 3(4 − 2) = 10 − 6 = 4

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

Problem 11. Is the matrix


 
2 3 0
A = 1 −2 −1
2 0 −1

invertible? If yes, compute the inverse of A.

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.

Problem 12. Find all a such that the matrix


 
a 0 0
A = 1 a 0
0 1 a

is invertible.

Solution 1. Note that det(A) = a3 . Therefore, A is invertible if and only if a 6= 0.

Solution 2. If a = 0, then A is clearly not invertible.


If a 6= 0, then

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

You might also like