College of Science, Engineering and Technology
⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄⋄
APM2613: Numerical Methods
Assignment 2 — Year Module 2026
⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄ ⋄⋄
APM2613
Module Code:
Numerical Methods
Module Name:
Assignment 2
Assignment:
100
Total Marks:
Submitted in partial fulfilment of the requirements for APM2613 — UNISA 2026
,UNISA | APM2613 Numerical Methods – Assignment 2
Question 1: Solving a Linear System [30 Marks]
Question: Consider the linear system
4.444x1 + 12850x2 − 12.444x3 = 12842
3.333x1 + 14.520x2 + 8.715x3 = 26.568
1.2412x1 + 4.8213x2 + 2.1543x3 = 8.2168
Use 4 decimal place accuracy with rounding throughout.
1.1(a) Gaussian Elimination Without Pivoting [7 Marks]
The augmented matrix is:
4.4440 12850.0000 −12.4440 12842.0000
[A|b] = 3.3330
14.5200 8.7150 26.5680
1.2412 4.8213 2.1543 8.2168
Step 1: Eliminate x1 from Row 2.
3.3330
Multiplier: m21 = = 0.7500
4.4440
R2 ← R2 − 0.7500 R1
a′21 = 3.3330 − 0.7500 × 4.4440 = 3.3330 − 3.3330 = 0.0000
a′22 = 14.5200 − 0.7500 × 12850.0000 = 14.5200 − 9637.5000 = −9622.9800
a′23 = 8.7150 − 0.7500 × (−12.4440) = 8.7150 + 9.3330 = 18.0480
b′2 = 26.5680 − 0.7500 × 12842.0000 = 26.5680 − 9631.5000 = −9604.9320
Step 2: Eliminate x1 from Row 3.
1.2412
Multiplier: m31 = = 0.2793
4.4440
R3 ← R3 − 0.2793 R1
Page 2 of 27
,UNISA | APM2613 Numerical Methods – Assignment 2
a′31 = 1.2412 − 0.2793 × 4.4440 = 1.2412 − 1.2412 = 0.0000
a′32 = 4.8213 − 0.2793 × 12850.0000 = 4.8213 − 3588.9450 = −3584.1237
a′33 = 2.1543 − 0.2793 × (−12.4440) = 2.1543 + 3.4756 = 5.6299
b′3 = 8.2168 − 0.2793 × 12842.0000 = 8.2168 − 3585.7206 = −3577.5038
Matrix after first elimination stage:
4.4440 12850.0000 −12.4440 12842.0000
0.0000 −9622.9800 18.0480 −9604.9320
0.0000 −3584.1237 5.6299 −3577.5038
Step 3: Eliminate x2 from Row 3.
−3584.1237
Multiplier: m32 = = 0.3725
−9622.9800
R3 ← R3 − 0.3725 R2
a′′32 = −3584.1237 − 0.3725 × (−9622.9800) = −3584.1237 + 3584.5608 = 0.4371 ≈ 0.0000
a′′33 = 5.6299 − 0.3725 × 18.0480 = 5.6299 − 6.7229 = −1.0930
b′′3 = −3577.5038 − 0.3725 × (−9604.9320) = −3577.5038 + 3577.8358 = 0.3320
Critical Consideration
The pivot element in row 2 is very large (−9622.98) compared to the row 3 en-
try (−3584.12). This numerical disproportion, combined with the very large coeffi-
cient 12850 in the original matrix, introduces significant rounding errors. The result
a′′32 ≈ 0.4371 should ideally be zero; this is a rounding artefact.
Page 3 of 27
,UNISA | APM2613 Numerical Methods – Assignment 2
Upper triangular system:
4.4440 12850.0000 −12.4440 x 12842.0000
1
=
−9622.9800 18.0480 x2 −9604.9320
0
0 0 −1.0930 x3 0.3320
Back Substitution:
From Row 3:
0.3320
x3 = = −0.3038
−1.0930
From Row 2:
−9604.9320 − 18.0480 × (−0.3038) −9604.9320 + 5.4842 −9599.4478
x2 = = = = 0.9976
−9622.9800 −9622.9800 −9622.9800
From Row 1:
12842.0000 − 12850.0000 × 0.9976 − (−12.4440) × (−0.3038)
x1 =
4.4440
12842.0000 − 12821.2000 − 3.7812 17.0188
= = = 3.8293
4.4440 4.4440
Implementation Insight
Without pivoting, the solution carries significant error due to the ill-conditioned nature
of the coefficient matrix (the large value 12850 in row 1 dominates the pivoting). Scaled
partial pivoting corrects this.
1.1(b) Gaussian Elimination with Scaled Partial Pivoting [7 Marks]
Scale factors (largest element in absolute value per row):
s1 = max(|4.4440|, |12850.0000|, |12.4440|) = 12850.0000
s2 = max(|3.3330|, |14.5200|, |8.7150|) = 14.5200
s3 = max(|1.2412|, |4.8213|, |2.1543|) = 4.8213
Page 4 of 27
, UNISA | APM2613 Numerical Methods – Assignment 2
Scaled ratios for column 1 pivot selection:
|4.4440|
r1 = = 0.0003
12850.0000
|3.3330|
r2 = = 0.2295
14.5200
|1.2412|
r3 = = 0.2575
4.8213
The largest scaled ratio is r3 = 0.2575, so Row 3 becomes the pivot row.
Swap R1 ↔ R3 :
1.2412 4.8213 2.1543 8.2168
3.3330 14.5200 8.7150 26.5680
4.4440 12850.0000 −12.4440 12842.0000
Eliminate x1 from Row 2:
3.3330
m21 = = 2.6854
1.2412
R2 ← R2 − 2.6854 R1
a′22 = 14.5200 − 2.6854 × 4.8213 = 14.5200 − 12.9470 = 1.5730
a′23 = 8.7150 − 2.6854 × 2.1543 = 8.7150 − 5.7854 = 2.9296
b′2 = 26.5680 − 2.6854 × 8.2168 = 26.5680 − 22.0676 = 4.5004
Eliminate x1 from Row 3:
4.4440
m31 = = 3.5804
1.2412
R3 ← R3 − 3.5804 R1
a′32 = 12850.0000 − 3.5804 × 4.8213 = 12850.0000 − 17.2618 = 12832.7382
a′33 = −12.4440 − 3.5804 × 2.1543 = −12.4440 − 7.7132 = −20.1572
b′3 = 12842.0000 − 3.5804 × 8.2168 = 12842.0000 − 29.4208 = 12812.5792
Page 5 of 27