MA 204 Tutorial 1 Solution Hints
MA 204 Tutorial 1 Solution Hints
MA 204 Tutorial 1 Solution Hints
1. Solve the following systems of equations by converting the coefficient matrix to row reduced echelon
form.
2 3 1 x1 9 1 2 3 x1 14
(a) 1 2 3 x2 = 6 (b) 2 3 4 x2 = 20
1 1 −2 x3 3 1 3 5 x3 14
2 3 1 9
x1
1 2 3 x1 6 1 2 3 1 14
x2
(c)
1 1 −2 x2 =
3
(d) 2 3 4 1
x3
= 20
3 1 2 x3 8 3 4 1 3 14
x4
0 4 2 7
3. Find the inverse of the following matrices by the Gauss-Jordan elimination method:
1 2 1 0 1 2 1 2 3
(a) 2 3 −1 (b) 1 2 3 (c) 1 3 4
2 −1 3 3 1 1 1 4 3
4. Solve the following linear systems by Gauss-Jordan elimination method, with partial pivoting if
necessary (but without scaling):
5. Solve the following linear systems by Gauss elimination method, with total pivoting if necessary (but
without scaling):
8. Solve the following systems of equations by Cholesky’s method, if the method is applicable. If it is not
applicable, give the reason.
2 3 1 x1 9 1 2 3 x1 14
(a) 1 2 3 x2 = 6 (b) 2 3 4 x2 = 20
3 1 2 x3 8 3 4 1 x3 14
Solutions:
2 3 1 x1 9
• [1a] 1 2 3 x2 = 6 , We start with writing augmented matrix [A|b].
1 1 −2 x3 3
2 3 1 | 9 R13(−2)
0 1 5 | 3 R32(−1)
0 0 0 | 0 1 0 −7 | 0
R13
1 2 3 | 6 −−−−−→ 0 1 5 | 3 −−−−−→ 0 1 5 | 3 −−→ 0 1 5 | 3
R23(−1) R12(−1)
1 1 −2 | 3 1 1 −2 | 3 1 0 −7 | 0 0 0 0 | 0
Hence the solution is x2 = 3 − 5x3 , and x1 = 7x3 , for all x3 ∈ R.
1 2 3 | 14 R31(−1)
1 2 3 | 14 R32(1)
1 2 3 | 14
• [1b] 2 3 4 | 20 −−−−−→ 0 −1 −2 | −8 −−−−→ 0 −1 −2 | −8
R21(−2)
1 3 5 | 14 0 1 2 | 0 0 0 0 | 8
Hence the system is not consistent, and there is no solution.
1 2 3 1 | 14 R31(−3)
1 2 3 1 | 14 R32(−2)
1 2 3 1 | 14
• [1d] 2 3 4 1 | 20 −−−−−→ 0 −1 −2 −1 | −8 −−−−−→ 0 −1 −2 −1 | −8
R21(−2)
3 4 1 3 | 14 0 −2 −8 0 | −28 0 0 −4 2 | −12
1 2 3 | 14 R31(−1)
1 2 3 | 14 R32(1)
1 2 3 | 14
• [2b] 2 3 4 | 20 −−−−−→ 0 −1 −2 | −8 −−−−→ 0 −1 −2 | −8
R21(−2)
1 3 1 | 14 0 1 −2 | 0 0 0 −4 | 8
The solution is x3 = −2, x2 = 8 − 2x3 = 12, x1 = 14 − 2x2 − 3x3 = 14 − 24 + 6 = −4
1 2 3 | 1 0 0 R31(−1)
1 2 3 | 1 0 0 R13(−1)
1 0 3 | 2 0 1
• [3c] 1 3 4 | 0 1 0 −−−−−→ 0 1 1 | −1 1 0 −−−−−→ 0 0 1 | − 12 1 − 12
R21(−1) R23(− 1 )
1 4 3 | 0 0 1 0 2 0 | −1 0 1 2 0 2 0 | −1 0 1
7 3 7 3
R3( 1 ) 1 0 0 | 2 −3 2 1 0 0 | 2 −3 2
−−−−2−→ 0 0 1 | − 21 1 − 12 −−→ 0 1 0 | − 12 0 1
2
R12(−3) 1 1 R12 1
0 1 0 | −2 0 2 0 0 1 | −2 1 − 12
1 1 −1 | 2 3 2 −3 | 6 R31(− 1 ) 3 2 −3 | 6 R32(− 1 )
R
• [4b] 2 3 5 | −3 −−31 → 2 3 5 | −3 −−−−−3→ 0 53 7 | −7 −−−−−5→
R21(− 2 )
3 2 −3 | 6 1 1 −1 | 2 3 0 13 0 | 0
3 2 −3 | 6 R
3 2 0 | 3 R3( 5 ) 3 0 0 | 3 R2( 3 ) 1 0 0 | 1
23(5)
0 5 7 | −7 −−−−−−→ 0 35 0 | 0 −−−−−→ 0 53 0 | 0 −−−−→ 0 1 0 |
7 5
0
3 R13(− 15 ) R12(− 6 ) R1( 1 )
0 0 − 75 | 75 7 0 0 75 | − 75 5 0 0 1 | −1 3 0 0 1 | −1
Note that for partial pivoting we first search for the pivot element in the first column with largest mag-
nitude, next we consider the possible pivot entries in the second column and again consider the largest
in magnitude.
• [5] Suppose if we want to solve [4b] by Gauss elimination with total pivoting, we first need to search
for the first pivot entry as of the largest magnitude in the matrix, which 5, placed in the third column
and the second row, since we can do only row transformations we should first interchange the second
and third row to get pivot entry at a33 .
21 19
0 | 21
7 8 7
1 1 −1 | 2 3 2 −3 | 6 R23( 1 ) 5 5 5 5 5 0 | 5
R32 5 7 8 7 R21 21 19 21
2 3 5 | −3 −−→ 1 1 −1 | 2 −−−−→ 0 | −−→ 0 |
R13( 3 ) 5 5 5 5 5 5
3 2 −3 | 6 2 3 5 | −3 5 2 3 5 | −3 2 3 5 | −3
7 21×8
0 0 | 75 − 21×8
R12(− 8 ) 5 − 5×19 5×19
21 19 21
−−−−−19−→ 5 5 0 | 5
Now we can find the solution by forward substitution
2 3 5 | −3
method.
• [7c] and [8a] are not symmetric, hence not positive definite.