140 - 251 - Final Exam Computational Practice - Answers
140 - 251 - Final Exam Computational Practice - Answers
Linear Algebra
Fall 24
1. Compute the orthogonal projection of the indicated vector v onto the column space of the matrix A.
−5 −1 2 −1 −2 −1
a) v = −1, A = 1 −1. b) v = −4, A = 1 1 .
7 −1 3 −3 2 2
1 −1
vColA = 2. vColA = −2.
4 −4
1 2 0 6 0 2
c) v = −7, A = 1 −1. d) v = −7, A = 0 1.
7 −1 0 7 −1 1
−2 2
vColA = −7. vColA = 1.
1 7
2 1 1 0 −2 0
e) v = 3 , A = −1 −2. f) v = −8, A = 0 1.
−1 0 2 1 −1 1
0 2
vColA = 1 . vColA = −4.
−2 −3
1 1 4 −4 −2 1
g) v = 8 , A = 0 1 . h) v = −8, A = −4 1 .
−2 0 −1 6 3 −1
1 −4
vColA = 5 . vColA = −8.
−5 6
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
−6 2 0 −2 4 2
i) v = 5 , A = 4 1. j) v = 8 , A = 1 1 .
1 4 1 6 −4 −2
−6 −4
vColA = 3 . vColA = 8 .
3 4
1 0 −1 5 1 −2
k) v = 6, A = −1 2 . l) v = 3 , A = 1 0 .
8 1 −4 −8 0 −1
5 2
vColA = 4.
vColA = 6 .
6 −2
Answers are generated automatically. If you find an error please let me know! Page 2 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
x1
b) W := x2 3x3 = 5x1 + 2x2 , 8x2 = 5x1 + 8x3 , 5x1 + 9x2 = 5x3
x3
−5 −5 5
W ⊥ = Span −2 , 8 , 9
3 −8 −5
x1
c) W := x2 0 = 3x1 + 6x2 + 7x3 , 9x1 = x3
x3
−3 9
W ⊥ = Span −6 , 0
−7 −1
x1
d) W := x2 2x2 = 4x1 + 8x3
x3
−4
W ⊥ = Span 2
−8
x 1
x
2
e) W := x
3
6x 3 + x 4 = 3x 1 + 8x 2 + 3x 5 , 3x 2 + 7x 3 + 5x 4 + x 5 = 3x 1
x4
x5
−3 −3
−8 3
⊥
W = Span 6 , 7
1 5
−3 1
Answers are generated automatically. If you find an error please let me know! Page 3 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
x1
f) W := x2 8x1 = 9x2 + 7x3 , x1 + 4x2 = 7x3 , 7x1 + x3 = 9x2
x3
8 1 7
⊥
W = Span −9 , 4 , −9
−7 −7 1
x1
x
2
g) W := 4x4 = 5x1 + 9x2 , 3x1 + 9x2 + 8x3 + 5x4 = 0, 5x2 + 7x3 = 9x4
x3
x4
−5 3 0
−9 9 5
W ⊥ = Span , ,
0 8 7
4 5 −9
x1
x
2
h) W := x3 4x2 + 5x5 = 5x1 + 7x3 + x4 , 6x2 + x3 = 3x1 + 4x4 + 9x5 , x3 + x4 = 3x1 + 7x2 + 3x5
x4
x5
−5 −3 −3
4 6 −7
⊥
W = Span −7 , 1 , 1
−1
−4 1
5 −9 −3
x1
i) W := x2 3x1 + 6x2 + 4x3 = 0, 2x3 = 9x1 + 7x2 , 3x1 + 4x2 = 2x3
x3
3 −9 3
W ⊥ = Span 6 , −7 , 4
4 2 −2
x1
x
2
j) W := 7x4 = 6x1 + 2x3
x
3
x4
−6
0
W ⊥ = Span −2
7
Answers are generated automatically. If you find an error please let me know! Page 4 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
x1
k) W := x2 3x3 = 8x1 + 8x2 , 0 = 3x1 + 9x2 + 7x3 , 5x1 = 9x2
x3
−8 −3 5
⊥
W = Span −8 , −9 , −9
3 −7 0
x1
l) W := x2 3x3 = 5x1 + 2x2 , 8x2 = 5x1 + 8x3 , 5x1 + 9x2 = 5x3
x3
−5 −5 5
W ⊥ = Span −2 , 8 , 9
3 −8 −5
Answers are generated automatically. If you find an error please let me know! Page 5 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
3. Find a least squares solution, x̂, to the following equations and determine how far away it is from the
desired solution.
−1 0 4 1 −1 0
x1 x1
a) −3 1
= 0 .
b) −4 3
= −6.
x2 x2
−2 0 −2 3 −2 −3
√ √
0 −6
x̂ = , ∥b − Ax̂∥ = 2 5 x̂ = , ∥b − Ax̂∥ = 3 3
0 −9
0 1 8 0 −1 −6
x x
c) 2 0 1 = −7. d) 0 −2 1 = 3 .
x2 x2
−2 0 −3 −1 −1 4
√ √
−1 −4
x̂ = , ∥b − Ax̂∥ = 5 2 x̂ = , ∥b − Ax̂∥ = 3 5
8 0
0 −1 3 −3 1 3
x x
e) −1 −2 1 = −8. f) −2 0 1 = 8.
x2 x2
−1 −3 1 −2 0 8
√
16 −4
x̂ = , ∥b − Ax̂∥ = 2 3 x̂ = , ∥b − Ax̂∥ = 0
−5 −9
−2 −1 −5 1 −2 7
x1 x1
g) −4 −1
= −5.
h) 2 −4
= −6.
x2 x2
−3 −1 −5 1 −3 −4
√
0 5
x̂ = , ∥b − Ax̂∥ = 0 x̂ = , ∥b − Ax̂∥ = 4 5
5 3
−1 −3 8 −4 −3 −1
x x
i) 1 1 1 = 4. j) −4 −3 1 = −3.
x2 x2
−1 −2 2 2 2 −6
√
10 11
x̂ = , ∥b − Ax̂∥ = 0 x̂ = , ∥b − Ax̂∥ = 2
−6 −14
−3 −1 −1 −1 1 −3
x1 x1
k) −1
−1 = 6 . l) 2 0 = −5.
x2 x2
−3 −1 1 −1 0 5
√ √
3 −3
x̂ = , ∥b − Ax̂∥ = 2 x̂ = , ∥b − Ax̂∥ = 5
−9 −6
Answers are generated automatically. If you find an error please let me know! Page 6 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
Answers are generated automatically. If you find an error please let me know! Page 7 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
Answers are generated automatically. If you find an error please let me know! Page 8 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
So
1 0 0 −1 −9 −2 −1 −9 −2
U = E32 E31 E21 A = 1 1 0 1 17 4 = 0 8 2
−10 −6 1 −4 12 −2 0 0 −6
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 1 1 0 = −1 1 0 .
−10 −6 1 4 6 1
Thus
−1 −9 −2 1 0 0 −1 −9 −2
1 17 4 = −1 1 0 0 8 2
−4 12 −2 4 6 1 0 0 −6
4 4 5
b) A = 0 −3 1
−4 11 −18
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 0 1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 1 0 1 0 5 1
So
1 0 0 4 4 5 4 4 5
U = E32 E31 E21 A = 0 1 0 0 −3 1 = 0 −3 1
1 5 1 −4 11 −18 0 0 −8
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 0 1 0 = 0 1 0 .
1 5 1 −1 −5 1
Thus
4 4 5 1 0 0 4 4 5
0 −3 1 = 0 1 0 0 −3 1
−4 11 −18 −1 −5 1 0 0 −8
Answers are generated automatically. If you find an error please let me know! Page 9 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
0 6 0
c) A = 0 −17 8
0 7 5
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 1 1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 −3 0 1 0 −1 1
So
1 0 0 0 6 0 0 6 0
U = E32 E31 E21 A = 1 1 0 0 −17 8 = 0 −11 8
−4 −1 1 0 7 5 0 0 −3
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 1 1 0 = −1 1 0 .
−4 −1 1 3 1 1
Thus
0 6 0 1 0 0 0 6 0
0 −17 8 = −1 1 0 0 −11 8
0 7 5 3 1 1 0 0 −3
4 7 −1
d) A = 0 −4 −2
12 9 0
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 0
1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 −3 0 1 0 −3 1
So
1 0 0 4 7 −1 4 7 −1
U = E32 E31 E21 A = 0 1 0 0 −4 −2 = 0 −4 −2
−3 −3 1 12 9 0 0 0 9
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 0 1 0 = 0 1 0 .
−3 −3 1 3 3 1
Thus
4 7 −1 1 0 0 4 7 −1
0 −4 −2 = 0 1 0 0 −4 −2
12 9 0 3 3 1 0 0 9
Answers are generated automatically. If you find an error please let me know! Page 10 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
0 −9 −1
e) A = 0 −15 −13
0 9 13
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = −3 1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 1 0 1 0 0 1
So
1 0 0 0 −9 −1 0 −9 −1
U = E32 E31 E21 A = −3 1 0 0 −15 −13 = 0 12 −10
1 0 1 0 9 13 0 0 12
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = −3 1 0 = 3 1 0 .
1 0 1 −1 0 1
Thus
0 −9 −1 1 0 0 0 −9 −1
0 −15 −13 = 3 1 0 0 12 −10
0 9 13 −1 0 1 0 0 12
1 −3 4
f) A = −2 3 −11
2 6 8
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 2
1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 −2 0 1 0 4 1
So
1 0 0 1 −3 4 1 −3 4
U = E32 E31 E21 A = 2 1 0 −2 3 −11 = 0 −3 −3
6 4 1 2 6 8 0 0 −12
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 2 1 0 = −2 1 0 .
6 4 1 2 −4 1
Thus
1 −3 4 1 0 0 1 −3 4
−2 3 −11 = −2 1 0 0 −3 −3
2 6 8 2 −4 1 0 0 −12
Answers are generated automatically. If you find an error please let me know! Page 11 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
0 −1 −1
g) A = 0 7 6
0 −8 1
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 6 1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 −7 0 1 0 1 1
So
1 0 0 0 −1 −1 0 −1 −1
U = E32 E31 E21 A = 6 1 0 0 7 6 = 0 1 0
−1 1 1 0 −8 1 0 0 8
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 6 1 0 = −6 1 0 .
−1 1 1 7 −1 1
Thus
0 −1 −1 1 0 0 0 −1 −1
0 7 6 = −6 1 0 0 1 0
0 −8 1 7 −1 1 0 0 8
7 −3 5
h) A = 0 −1 9
−7 0 19
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 0
1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 1 0 1 0 −3 1
So
1 0 0 7 −3 5 7 −3 5
U = E32 E31 E21 A = 0 1 0 0 −1 9 = 0 −1 9
1 −3 1 −7 0 19 0 0 −3
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 0 1 0 = 0 1 0 .
1 −3 1 −1 3 1
Thus
7 −3 5 1 0 0 7 −3 5
0 −1 9 = 0 1 0 0 −1 9
−7 0 19 −1 3 1 0 0 −3
Answers are generated automatically. If you find an error please let me know! Page 12 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
2 −1 −5
i) A = −2 1 6
6 −3 −11
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 1 1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 −3 0 1 0 2 1
So
1 0 0 2 −1 −5 2 −1 −5
U = E32 E31 E21 A = 1 1 0 −2 1 6 = 0 0 1
−1 2 1 6 −3 −11 0 0 6
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 1 1 0 = −1 1 0 .
−1 2 1 3 −2 1
Thus
2 −1 −5 1 0 0 2 −1 −5
−2 1 6 = −1 1 0 0 0 1
6 −3 −11 3 −2 1 0 0 6
6 10 −9
j) A = 6 11 −13
−12 −15 3
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = −1 1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 2 0 1 0 −5 1
So
1 0 0 6 10 −9 6 10 −9
U = E32 E31 E21 A = −1 1 0 6 11 −13 = 0 1 −4
7 −5 1 −12 −15 3 0 0 5
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = −1 1 0 = 1 1 0 .
7 −5 1 −2 5 1
Thus
6 10 −9 1 0 0 6 10 −9
6 11 −13 = 1 1 0 0 1 −4
−12 −15 3 −2 5 1 0 0 5
Answers are generated automatically. If you find an error please let me know! Page 13 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
−2 −8 2
k) A = 2 4 5
−4 0 −15
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 1 1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 −2 0 1 0 4 1
So
1 0 0 −2 −8 2 −2 −8 2
U = E32 E31 E21 A = 1 1 0 2 4 5 = 0 −4 7
2 4 1 −4 0 −15 0 0 9
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 1 1 0 = −1 1 0 .
2 4 1 2 −4 1
Thus
−2 −8 2 1 0 0 −2 −8 2
2 4 5 = −1 1 0 0 −4 7
−4 0 −15 2 −4 1 0 0 9
−6 −12 −5
l) A = 0 −4 0
−12 −4 −18
Through row operations, we obtain
1 0 0 1 0 0 1 0 0
E21 = 0
1 0 , E31 = 0 1 0 and E32 = 0 1 0 .
0 0 1 −2 0 1 0 5 1
So
1 0 0 −6 −12 −5 −6 −12 −5
U = E32 E31 E21 A = 0 1 0 0 −4 0 = 0 −4 0
−2 5 1 −12 −4 −18 0 0 −8
and −1
1 0 0 1 0 0
L = (E32 E31 E21 )−1 = 0 1 0 = 0 1 0 .
−2 5 1 2 −5 1
Thus
−6 −12 −5 1 0 0 −6 −12 −5
0 −4 0 = 0 1 0 0 −4 0
−12 −4 −18 2 −5 1 0 0 −8
Answers are generated automatically. If you find an error please let me know! Page 14 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
4 2
b) A =
−4 2
√ √ √
√2/2 √2/2 4 2 √0 −1 0
U= , Σ= , V =
− 2/2 2/2 0 2 2 0 −1
3 −2
c) A =
−2 3
√ √ √ √
√2/2 √2/2 5 0 √2/2 √2/2
U= , Σ= , V =
− 2/2 2/2 0 1 − 2/2 2/2
1 1
d) A =
−4 4
√ √ √
0 1 4 2 √0 √2/2 √2/2
U= , Σ= , V =
−1 0 0 2 − 2/2 2/2
2 2
e) A =
−3 3
√ √ √
0 1 3 2 √0 √2/2 √2/2
U= , Σ= , V =
−1 0 0 2 2 − 2/2 2/2
4 −4
f) A =
1 1
√ √ √
−1 0 4 2 √0 √2/2 √2/2
U= , Σ= , V =
0 −1 0 2 − 2/2 2/2
2 2
g) A =
−4 4
√ √ √
0 1 4 2 √0 √2/2 √2/2
U= , Σ= , V =
−1 0 0 2 2 − 2/2 2/2
Answers are generated automatically. If you find an error please let me know! Page 15 of 16
Linear Algebra - Final Exam Computational Practice Answers Joe Foster - Fall 24
3 3
h) A =
−4 4
√ √ √
0 1 4 2 √0 √2/2 √2/2
U= , Σ= , V =
−1 0 0 3 2 − 2/2 2/2
2 −2
i) A =
1 1
√ √ √
1 0 2 2 √0 √2/2 √ 2/2
U= , Σ= , V =
0 1 0 2 − 2/2 2/2
4 −1
j) A =
−1 4
√ √ √ √
√2/2 √2/2 5 0 √2/2 √2/2
U= , Σ= , V =
− 2/2 2/2 0 3 − 2/2 2/2
1 1
k) A =
−2 2
√ √ √
0 1 2 2 √0 √2/2 √2/2
U= , Σ= , V =
−1 0 0 2 − 2/2 2/2
1 1
l) A =
−3 3
√ √ √
0 1 3 2 √0 √2/2 √2/2
U= , Σ= , V =
−1 0 0 2 − 2/2 2/2
Answers are generated automatically. If you find an error please let me know! Page 16 of 16