Linear Systems Direct Methods I Problem Sheet
Linear Systems Direct Methods I Problem Sheet
PROBLEM SHEET
Problem 1
Use Gaussian elimination followed by backward substitution to solve (or deter-
mine that no solutions exist to) the linear systems:
a
x1 − x2 + 3x3 = 2,
3x − 3x2 + x3 = −1,
1
x1 + x2 = 3.
b
2x1 − 1.5x2 + 3x3 = 1,
−x1 + 2x3 = 3,
4x1 − 4.5x2 + 5x3 = 1.
c
2x1 = 3 ,
x1 + 1.5x2 = 4.5,
−3x2 + 0.5x3 = −6.6,
2x1 − 2x2 + x3 + x4 = 0.8.
d
x1 + x2 + x4 = 2,
2x1 + x2 − x3 + x4 = 1,
4x1 − x2 − 2x3 + 2x4 = 0,
3x1 − x2 − x3 + 2x4 = −3.
Problem 2
A pseudocode algorithm for finding the solution x ∈ Rn to U x = v given the
matrix M = [ U v ], where U ∈ Rn×n is an upper triangular matrix with all
entries on its main diagonal being nonzero and v ∈ Rn , is below.
Page 1 of 2
For i = n, n − 1, . . . , 2 do
For j = i − 1, i − 2, . . . , 1 do
mj,i
Set mj,n+1 = mj,n+1 − mi,n+1
mi,i
Set mj,i = 0
End For
End For
For i = 1, 2, . . . , n do
mi,n+1
xi =
mi,i
End For
Determine the number of multiplications and divisions (combined) that are per-
formed in the above pseudocode algorithm.
Problem 3
Find the solution to the linear system
4x1 − x2 + x3 = 8,
2x + 5x2 + 2x3 = 3,
1
x1 + 2x2 + 4x3 = 11,
References
– Section 6.1
Page 2 of 2