Assignment-3
Assignment-3
Department of Mathematics
UMA021: Numerical Linear Algebra
Assignment 3
Matrix Algebra
1. Use Gaussian elimination with backward substitution and two-digit rounding arithmetic to solve the following
linear systems (do not reorder the equations). The exact solution to each system is x1 = −1, x2 = 1, x3 = 3.
(a)
−x1 + 4x2 + x3 = 8
5 2 2
x1 + x2 + x3 = 1
3 3 3
2x1 + x2 + 4x3 = 11
(b)
4x1 + 2x2 − x3 = −5
1 1 1
x1 + x2 − x3 = −1
9 9 3
x1 + 4x2 + 2x3 = 9
2. Using four-digit arithmetic, solve the following system of equations by Gaussian elimination with partial
pivoting:
3. Use Gaussian elimination to solve the following systems and determine if row interchanges are necessary:
(a)
x1 − x2 + 3x3 = 2
3x1 − 3x2 + x3 = −1
x1 + x2 = 3
(b)
2x1 − x2 + x3 − x4 = 6
x2 − x3 + x4 = 5
x4 = 5
x3 − x4 = 3
2x1 − x2 + x3 = −1
3x1 + 3x2 + 9x3 = 0
3x1 + 3x2 + 5x3 = 4
(b)
x1 + x2 − x3 = 3
x1 + 2x2 − 2x3 = 2
−2x1 + x2 + x3 = 1
CONTINUED
–2–
5. Find l∞ and l2 norms of the vectors.
t
(a) x = 3, −4, 0, 32 .
t
(b) x = sin k, cos k, 2k for a fixed positive integer k.
7. The following linear system Ax = b has x as the actual solution and x̃ as an approximate solution. Compute
kx − x̃k∞ and kAx̃ − bk∞ . Also compute kAk∞ .
x1 + 2x2 + 3x3 = 1
2x1 + 3x2 + 4x3 = −1
3x1 + 4x2 + 6x3 = 2
Here, actual solution: x = (0, −7, 5) , approximate solution: x̃ = (−0.2, −7.5, 5.4)t .
t
8. Find the first two iterations of Jacobi and Gauss-Seidel using ~x(0) = (0, 0, 0)t :
10. Comment whether the Gauss-Seidel method can be applied for the following system of equations. If appli-
t
cable, perform two iterations, assuming the initial guess as ~x(0) = 0, 0, 0 .
(a)
0.03 58.9
5.31 −6.10
CONTINUED
–3–
(b)
0.04 0.01 −0.01
0.2 0.5 −0.2
1 2 4
Answers: 1(a) ~x = (−0.7, 1.1, 2.9)t ; 1(b) ~x = (0.38, −2, 2.5)t ; (2) ~x = (0.2246, t
√ 0.2812, 0.3280) ; (3) do
t t k
it your self; 4(a) ~x = (1, 2, −1) ; 4(b) ~x = (4, 4, 5) ; 5(a) 4, 5.2202; 5(b) 2 , 1 + 4k 2 ; (6) 12, 8.2394;
(7) 0.5, 0.3, 13; (8) Jacobi: ~x(1) = (0.47948, −0.57847, 1.11816)t , ~x(2) = (−0.44934, −0.74039, 1.37962)t ,
Gauss-Seidel: ~x(1) = (0.47948, −0.30985, 1.19683)t , ~x(2) = (−0.43384, −1 : 28234, 2.11044)t ; 9. (a) No (b)
ρ(Tg ) = 0.625 (c) ~x(4) = (1.07090, −0.67183, 0.59319)t (d) Gauss-Seidel method will not converge(ρ(Tg ) =
1.375 > 1) (10) method will work (ρ(Tg ) = 0.18605 < 1), ~x(2) = (−0.13729, 3.93515, 3.75891)t (11) (a)
12.24, (b) 198.17.