You are on page 1of 2

MATH 2346C - Computational Linear Algebra Tutorial

Tutorial
    
5 7 1 x1 1
1. Solve the linear system  15 20 0   x2  =  10 , using
−10 −13 5 x3 −20
(a) the Gaussian elimination method.
(b) the LU decomposition method with Gauss transformations.

2. Given  
−2 3 1
M =  0 −7 0 .
4 1 −1
Find kMk1 , kM −1 k1 and κ1 (M).

3. Given the matrix  


1 2 −2
A= 1 1 1 .
2 2 1
Decide whether the Jacobi and Gauss-Seidel methods converge to the solution
of Ax = b.

4. Consider the linear system given below.

4x1 + x2 + 2x3 = 4
3x1 + 5x2 + x3 = 7 (1)
x1 + x2 + 3x3 = 3

(a) Set up the Jacobi, Gauss-Seidel and SOR, with the relaxation parameter
ω = 1.2, iterative schemes for solving (1) and perform two iterations,
starting with the initial vector x(0) = 0. Compute the Euclidean norm of
the error vector at each iteration for all the methods.
(b) Find the spectral radius of the Gauss-Seidel iteration matrix and hence
find the asymptotic rate of convergence of the Gauss-Seidel scheme.

5. The algorithm given below can be used to solve the linear system Mx = b,
where M ∈ Rn×n is symmetric and x, b ∈ Rn .

Algorithm

• Compute

Page 1 of 2
MATH 2346C - Computational Linear Algebra Tutorial

r(0) = b − Mx(0)
ξ1 = kr(0) k2
1
v(1) = r(0)
ξ1
• Set φ1 = 0, γ1 = 0 and z(0) = 0
• For ℓ = 1, 2, . . . until maximum number of iterations allowed is reached:
∗ If ℓ = 1,
compute w = Mv(ℓ)
Else
compute w = Mv(ℓ) − γℓ v(ℓ−1)
EndIf
∗ Compute
βℓ = hw, v(ℓ) i
∗ If ℓ > 1, then compute
γℓ
φℓ =
ζℓ−1
ξℓ = −φℓ ξℓ−1
EndIf
∗ Compute
ζℓ = βℓ − φℓ γℓ
1 (ℓ) 
z(ℓ) = v − γℓ z(ℓ−1)
ζℓ
x = x(ℓ−1) + ξℓ z(ℓ)
(ℓ)

kb − Mx(ℓ) k2
∗ If < ǫ, then Stop. EndIf
kbk2
∗ Compute
w = w − βℓ v(ℓ)
γℓ+1 = kwk2
1
v(ℓ+1) = w
γℓ+1
EndFor

Implement the algorithm in MATLAB/Octave and generate the convergence


behaviour of the algorithm for the case n > 50.

Page 2 of 2

You might also like