1
DEPARTMENT OF MATHEMATICS AND STATISTICS
Math1250-2 Test 2 (80 minutes)
November 21, 2024
1. You are given that
1 2 3 4 0 1 2 0 1 0
2 4 1 3 2 0 0
A= row operations 0 1 1 =B
2 4 3 5 1 −→ 0 0 0 0 1
2 4 1 3 −3 0 0 0 0 0
(a) (2 marks) Find a basis and the dimension for the row space of A.
(b) (2 marks) Find a basis and the dimension for the column space of A.
(c) (3 marks) Find a basis for the nullspace of A.
Solution. (a) The non-zero rows of B form a basis of the row space of A. So
{(1, 2, 0, 1, 0), (0, 0, 1, 1, 0), (0, 0, 0, 0, 1)} is a basis for the row space of A.
The dimension for the row space of A is 3.
(b) Leading 1’s of B are in 1st, 3rd and 5th columns, so the 1st, 3rd and 5th columns
of A form a basis for the column space of A. So
{(1, 2, 2, 2), (3, 1, 3, 1), (0, 2, 1, −3)} is a basis for the column space of A.
The dimension for the column space of A is 3.
£ ¯ ¤ £ ¯ ¤
(c) A ¯ ~0 −→ B ¯ ~0 , the general solution of A~x = ~0 is
x1 = −2x2 −x4 x1 −2 −1
x2 = x2 x2 1 0
x3 = −x4 , x3 = x2 0 + x4 −1 , x2 , x4 ∈ R.
x = x4 x4 0 1
4
x5 = 0 x5 0 0
So {(−2, 1, 0, 0, 0), (−1, 0, −1, 1, 0)} is a basis of the nullspace of A.
2
© ª
2. (3 marks) Show that S = (x1 , x2 , x3 ) | x21 = x22 is not a subspace of R3 .
Solution. S is not a subspace of R3 because it is not closed under addition.
For example, ~x = (1, 1, 0) ∈ S and ~y = (−1, 1, 0) ∈ S, but ~x + ~y = (0, 2, 0) 6∈ S.
1 1 0
4
1 2 0 1
3. (4 marks) Let B = ~v1 =
1
, ~v2 = , ~v3 =
1 3
and ~u = 9 .
2 2 0 8
Determine whether ~u is in the subspace SpanB. If so, write ~u as a linear combination
of ~v1 , ~v2 and ~v3 .
Solution. The vector ~u is in the set SpanB if and only if the system with the following
augmented matrix has a solution.
1 1 0 | 4 R2 − R1 1 1 0 | 4 1 0 0 | 7
1 R1 − R2
2 0 | 1
−→ 0
1 0 | −3
0
1 0 | −3
1 0 −→
1 3 | 9 R3 − R1 0 3 | 5 1
0 0 1 | 5/3
R
3 3
2 2 0 | 8 R4 − 2R1 0 0 0 | 0 0 0 0 | 0
x1 7
Since the system has a solution x2 = −3 , the vector ~u is in the set SpanB,
x3 5/3
and ~u = 7~v1 − 3~v2 + 53 ~v3 .
3
4. (5 marks) Find the best line y = c + d t to fit y = 1, 1, 2, 2 at times
t = −1, 0, 1, 2. (Use the least squares approximation.)
Solution. We want to find c and d satisfying
c − d = 1 1 −1 1 · ¸
1 0 1
c + 0d = 1 ~ c
Let A =
1 1 , b = 2
and ~x =
.
c + d = 2 d
c + 2d = 2 1 2 2
We want to solve A~x = ~b, but it has no solution. So we solve AT Ax̂ = AT~b to get the
least squares approximation.
· ¸ · ¸
T 4 2 T~ 6
A A= , A b=
2 6 5
We need to solve · ¸ · ¸
4 2 6
x̂ =
2 6 5
· ¸−1 · ¸ · ¸· ¸ · ¸
4 2 6 1 6 −2 6 1.3
x̂ = = =
2 6 5 20 −2 4 5 0.4
The best line is y = 1.3 + 0.4t.
4
5. Let {~v1 = (1, 1, 1, 1), ~v2 = (1, 1, −1, 1)} be a basis for a subspace U of R4 .
(a) (3 marks) Use the Gram-Schmidt procedure to find an orthogonal basis of U .
(b) (1 marks) Find an orthonormal basis of U .
(c) (2 marks) Let ~v = (1, 2, 0, 1). Find projU (~v ), the projection of ~v onto U .
Solution. (a) ~u1 = ~v1 = (1, 1, 1, 1),
µ ¶
~v2 · ~u1 2 1 1 3 1
~u2 = ~v2 − ~u1 = (1, 1, −1, 1) − (1, 1, 1, 1) = , ,− ,
~u1 · ~u1 4 2 2 2 2
¡ ¢
So {~u1 = (1, 1, 1, 1), ~u2 = 12 , 12 , − 32 , 12 } is an orthogonal basis of U .
Or, redefine ~u2 = (1, 1, −3, 1).
~u1 1 ~u2 1
(b) w~1 = = (1, 1, 1, 1), w ~2 = = √ (1, 1, −3, 1).
k~u1 k 2 k~u2 k 12
n o
So w ~ 2 = √112 (1, 1, −3, 1) is an orthonormal basis of U .
~ 1 = 12 (1, 1, 1, 1), w
(c) The projection of ~v onto U is
µ ¶
1 4 4 4
projU (~v ) = (~v · w
~ 1 )w
~ 1 + (~v · w
~ 2 )w
~ 2 = (1, 1, 1, 1) + (1, 1, −3, 1) = , , 0,
3 3 3 3
5
A1
6. (6 marks) Suppose that A is an 3 × 3 matrix with det A = 5. If B = 3A1 + A3 ,
7A2
T
where A1 , A2 , A3 are rows of A, find det(A A), det(2A) and det B.
Solution. det(AT A) = det(AT ) det A = (det A)(det A) = 25,
det(2A) = 23 (det A) = 8(5) = 40
A1 A1 A1 1 A1
R − 3R1 R l R3 R
B = 3A1 + A3 2 A3 2 7A2 7 2 A2 = A
−→ −→ −→
7A2 7A2 A3 A3
Then det A = − 17 det B. So det B = −7 det A = −35.
7. (4 marks) You are given that
0 −1 2 3 x1 0
1 0 −1 1 x2 1
A=
1 −1 1
, A
x3 = 0
, and det A = 3.
1
2 0 −1 −2 x4 0
Use Cramer’s Rule to find the value of x3 .
0 −1 0 3
1 0 1 1
Solution. Let B3 =
1 −1 0 1 .
2 0 0 −2
¯ ¯
¯ 0 −1 3 ¯
¯ ¯
det B3 = 0 + 1(−1)2+3 ¯ 1 −1 1 ¯ + 0 + 0 = −(−2 − 2 + 6) = −2.
¯ ¯
¯ 2 0 −2 ¯
By Cramer’s Rule we have
det B3 2
x3 = =−
det A 3