Applied Linear Algebra

Math 545
March 2017
Applied Linear Algebra
Robin Young
Practice Exam
Be sure to show your work and justify your answers: no reasons, no points!
Although there are 5 questions here, there are 4 on the actual exam!
1. Starting with the plane P1 , with equation 3 x − 4 y + 2 z = 6, find equations for
(a) a second plane P2 that contains the points (2, 1, 2) and (0, 1, 5);
(b) a third plane P3 that meets the first two in the point (4, 1, −1);
(c) the plane through the origin parallel to P1 .
Draw a rough sketch of P1 , P2 and P3 labelling these points.
(a) Pick any vector perpendicular to the vector [(2, 1, 2)−(0, 1, 5)]T which is in the plane,
say n2 = (0, 1, 0)T . Now the plane normal to n2 through the point p = (0, 1, 5) is
(x − p) · n2 = 0,
or y − 1 = 0.
(b) For any n3 not parallel to the above normals, say n3 = (1, 0, 0)T , and q = (4, 1, −1),
we just write
(x − q) · n2 = 0, or x − 4 = 0.
(c) The normal to P1 is n1 = (3, −4, 2)T , so the equation is
(x − 0) · n1 = 0,
or
3 x − 4 y + 2 z = 0.
The sketch need not be accurate; also note there are many options for the planes.
2. Given the matrix


2 0
4 1 0
A =  6 1 15 3 2  .
4 −1 5 2 −2
Write the echelon form A = L U and use this to find bases of the four fundamental spaces.
Explain what you did where necessary!
We do row reductions, storing the multiplier (in red), and without

 
2 0
4 1 0
2 0 4 1
3 0 2 ∼ 3 1 3 0
A∼ 3 1
2 −1 −3 0 −2
2 −1 0 0
pivots:

0
2 .
0
Now read off L and the echelon matrix U :



1 0 0
2 0 4 1 0
A = LU =  3 1 0   0 1 3 0 2 .
2 −1 1
0 0 0 0 0
Four fundamental spaces:
• N (A) same as N (U ), non-pivot columns are free, and we solve for pivot variable;
• R(A) spanned by rows of U ;
• C(A) spanned by pivot columns of A; and
• N (AT ) corresponds to zero rows of U : y T A = 0 for y T L =
T
LT y = 0 0 1
(solve by back substitution).
Carrying these out, we get

 
−2




 

 −3  


N (A) = Sp  1 
, 





0



0
− 1/2
0
0
1
0
 


,







0
−2
0
0
1
  

0
 2

C(A) = Sp  6  ,  1  ,


4
−1






 ,












R(A) = Sp 







2
0
4
1
0
 


,







0
1
3
0
2


 −5

and N (AT ) = Sp  1  .


1
Note that N (A) ⊥ R(A) and N (AT ) ⊥ C(A), as expected.
2
0 0 1 , so






 ,





3. Given the matrix

5
9
 2 −6 
.
A=
 −2
8 
4
8

(a) Find an orthonormal basis for the column space of A.
(b) Give the QR decomposition, A = Q R.
(c) Find the least-squares solution to A x = b, for b = (3, 6, −7, 2)T .
(a) Use Gram-Schmidt:

ka1 k2 = ha1 , a1 i = 52 + 22 + (−2)2 + 42 = 49,
so
q1 =

a1
=
ka1 k 
5/7
2/7
− 2/7


,

4/7
and, noting ha2 , q1 i =
5·9−2·6−2·8+4·8
7
= 7, we take

4
  −8 

=
  10  ,
4

2/7

−
4/7 
1
u2

q2 =
=
u2 = 
 5/7  ;
ku2 k
14
2/7
 
5
9
 −6   2
 
u2 = a2 − ha2 , q1 i q1 = 
 8  −  −2
4
8




so
and we have C(A) = Sp{q1 , q2 }.
(b) Reversing the above, we have a1 = ka1 k q1 and a2

1
7 7
A = Q R = q1 q2
= 
0 14
7
= ha2 , q2 iq2 + ha2 , q1 iq1 , so

5
2
2 −4 
1
1
7
.
−2 5 
0 2
4
2
(c) The normal equations are AT A x
b = AT b, and since A = Q R with QT Q = I2 and
R is invertible, this reduces to R x
b = QT b, so that
3/2
1
1 1
49
T
7
x
b =Q b=
, so x
b =
.
− 1/2
0 2
−49
7
[Note that the residual b − A x
b = 0, so the solution is exact!]
3
4. If A is a 12 × 7 incidence matrix from a connected graph, what is its rank? How many
free variables are there in the solution to A x = b? How many free variables are there in
the solution to AT y = f ? How many edges must be removed to leave a spanning tree?
We know A : R7 → R12 , and there are 7 nodes and 12 edges in the graph.
Since the graph is connected, we know N (A) is one-dimensional, and is spanned by
(1 1 1 1 1 1 1)T , so
rank(A) = 7 − dim N (A) = 7 − 1 = 6.
Since dim N (A) = 1, there is one free variable when solving A x = b. On the other hand,
we have
12 = dim C(A) + dim N (AT ) so dim N (AT ) = 6,
so there are six free variables in solving AT y = f . Each basis element of N (AT ) corresponds to a loop, and the spanning tree has no loops, so six edges must be removed (via
row reductions).
4
5. (a) Find the matrix of the map P1 which projects any vector onto the line through the
origin and a = (1, 2, −2).
(b) Find the matrix of the map P2 which projects any vector onto the plane through the
origin, a and b = (−3, 0, 3).
(c) What are the matrices of the projections orthogonal to P1 and P2 ?
(a) This is a rank-one projection, and we can project using the inner product: given v,
we set
hv, ai
a aT
P1 v = v −
a = T v, so
ha, ai
a a




1
1
2 −2
1
1
 2  1 2 −2 =  2
4 −4  .
P1 = 2
1 + 22 + (−2)2
9
−2
−2 −4 4
(b) Set A = a b , where the columns a and b are as given. Then, using the normal
equations to project, we get


−1 1 −3
1
2
−2
9
9
T
−1 T
0 
P2 = A (A A) A =  2
3 0 −3
9 18
−2 3


1 −3
1
1 2 −2
2 −1
0 
= 2
3 0 −3
9 −1 1
−2 3


5 −2 −4
1
=  −2 8 −2  .
9
−4 −2 5
(c) Orthogonal projection is just I − P , so


8 −2 2
1
P1⊥ =  −2 5 4 
9
2
4 5
5

and P2⊥

4 2 4
1
=  2 1 2 .
9
4 2 4