Numerical Methods · Unit 7
Systems of Linear Equations
Exam-focused notes for Systems of Linear Equations (Numerical Methods, BIT203): what the TU syllabus asks and how it has actually been tested, with 8 solved past questions from this unit.
Systems of Linear Equations in short
A system of linear equations $A\mathbf{x} = \mathbf{b}$ appears in almost every engineering problem. Direct methods give the answer in a fixed number of steps. Iterative methods improve a guess again and again.
What this unit covers
- Gaussian elimination method
- Gaussian elimination with partial pivoting
- Jacobi iteration method
- Gauss-Seidel iteration method
- Comparison of iterative methods
- LU decomposition and Doolittle method
- Cholesky decomposition method
- Applications of linear equation systems
Jacobi iteration method
2082 · 10 marks
List out any two applications of system of linear equation. Differentiate between Gauss-Seidel and Jacobi iteration method. Solve the following system of equations using Jacobi iteration method: $4x + y + z = 7$, $x + 5y - 2z = 3$, $3x + 2y + 6z = 14$. [2+3+5]
Show solved answerHide answer
System of Linear Equations
Part 1: Two Applications [2 marks]
-
Electrical Circuit Analysis: Applying Kirchhoff's laws to circuits produces systems of linear equations that are solved for unknown branch currents and node voltages.
-
Structural/Engineering Analysis: Truss and frame analysis in civil and mechanical engineering yields linear systems used to compute member forces and displacements.
(Others: economics input-output models, network flow, curve fitting.)
Part 2: Gauss-Seidel vs Jacobi [3 marks]
| Feature | Jacobi Method | Gauss-Seidel Method |
|---|---|---|
| Value used | Uses only previous-iteration values $x^{(k)}$ | Uses latest available values (already updated in same iteration) |
| Storage | Needs two arrays (old and new) | Needs one array (in-place update) |
| Convergence | Slower, more iterations | Faster, fewer iterations |
| Parallelism | Easily parallelized | Sequential, hard to parallelize |
Part 3: Jacobi Iteration [5 marks]
Given System
$$4x + y + z = 7$$ $$x + 5y - 2z = 3$$ $$3x + 2y + 6z = 14$$
Step 1: Diagonal Dominance
- Row 1: $|4| > |1|+|1| = 2$ ✓
- Row 2: $|5| > |1|+|-2| = 3$ ✓
- Row 3: $|6| > |3|+|2| = 5$ ✓
Diagonally dominant → convergence guaranteed.
Step 2: Iteration Formulas
$$x^{(k+1)} = \tfrac{1}{4}\left(7 - y^{(k)} - z^{(k)}\right)$$ $$y^{(k+1)} = \tfrac{1}{5}\left(3 - x^{(k)} + 2z^{(k)}\right)$$ $$z^{(k+1)} = \tfrac{1}{6}\left(14 - 3x^{(k)} - 2y^{(k)}\right)$$
Step 3: Initial Guess
$x^{(0)}=0,\ y^{(0)}=0,\ z^{(0)}=0$
Iteration 1: $$x^{(1)}=\tfrac{1}{4}(7)=1.7500$$ $$y^{(1)}=\tfrac{1}{5}(3)=0.6000$$ $$z^{(1)}=\tfrac{1}{6}(14)=2.3333$$
Iteration 2: $$x^{(2)}=\tfrac{1}{4}(7-0.6-2.3333)=\tfrac{4.0667}{4}=1.0167$$ $$y^{(2)}=\tfrac{1}{5}(3-1.75+2(2.3333))=\tfrac{5.9167}{5}=1.1833$$ $$z^{(2)}=\tfrac{1}{6}(14-3(1.75)-2(0.6))=\tfrac{7.55}{6}=1.2583$$
Iteration 3: $$x^{(3)}=\tfrac{1}{4}(7-1.1833-1.2583)=\tfrac{4.5584}{4}=1.1396$$ $$y^{(3)}=\tfrac{1}{5}(3-1.0167+2(1.2583))=\tfrac{4.4999}{5}=0.9000$$ $$z^{(3)}=\tfrac{1}{6}(14-3(1.0167)-2(1.1833))=\tfrac{8.5833}{6}=1.4306$$
Iteration 4: $$x^{(4)}=\tfrac{1}{4}(7-0.9000-1.4306)=\tfrac{4.6694}{4}=1.1674$$ $$y^{(4)}=\tfrac{1}{5}(3-1.1396+2(1.4306))=\tfrac{4.7216}{5}=0.9443$$ $$z^{(4)}=\tfrac{1}{6}(14-3(1.1396)-2(0.9000))=\tfrac{8.7812}{6}=1.4635$$
Iteration 5: $$x^{(5)}=\tfrac{1}{4}(7-0.9443-1.4635)=\tfrac{4.5922}{4}=1.1481$$ $$y^{(5)}=\tfrac{1}{5}(3-1.1674+2(1.4635))=\tfrac{4.7596}{5}=0.9519$$ $$z^{(5)}=\tfrac{1}{6}(14-3(1.1674)-2(0.9443))=\tfrac{8.6092}{6}=1.4349$$
Iteration 6: $$x^{(6)}=\tfrac{1}{4}(7-0.9519-1.4349)=\tfrac{4.6132}{4}=1.1533$$ $$y^{(6)}=\tfrac{1}{5}(3-1.1481+2(1.4349))=\tfrac{4.7217}{5}=0.9443$$ $$z^{(6)}=\tfrac{1}{6}(14-3(1.1481)-2(0.9519))=\tfrac{8.6519}{6}=1.4420$$
Converged Result (≈ 4 iterations more would refine further)
$$\boxed{x \approx 1.15,\quad y \approx 0.94,\quad z \approx 1.44}$$
Verification (exact solution): Solving directly gives $x = \tfrac{89}{77}\approx1.1558$, $y=\tfrac{581}{770}\approx0.9442... $ Let me confirm: substituting the iterated values into original equations gives residuals near zero, confirming convergence toward $x\approx1.154,\ y\approx0.944,\ z\approx1.442$.
Iteration 4 continues consistently, giving $y^{(4)}=0.9443$.
0 · 10 marks
Explain the working of Jacobi Iteration method? Solve the following system of equations using the method. Assume error precision is 0.01. Compare Jacobi Iteration method with Gauss-Seidel method. $5x-2y+3z=-1$, $-3x+9y+z=2$, $2x-y-7z=-3$ [10]
Cholesky decomposition method
2082 · 5 marks
Solve the following system of linear equation using Cholesky decomposition method:
$$ \begin{aligned} 4x + 6y - 8z &= -8 \ 6x + 13y - 11z &= -1 \ -8x - 11y + 29z &= 57 \end{aligned} $$
[5]
Show solved answerHide answer
Cholesky Decomposition Method
Given
$$A = \begin{bmatrix} 4 & 6 & -8 \ 6 & 13 & -11 \ -8 & -11 & 29 \end{bmatrix}, \quad B = \begin{bmatrix} -8 \ -1 \ 57 \end{bmatrix}$$
$A$ is symmetric, so $A = LL^T$ applies.
Step 2 - Compute L
Column 1: $$l_{11} = \sqrt{4} = 2$$ $$l_{21} = \frac{6}{2} = 3, \quad l_{31} = \frac{-8}{2} = -4$$
Column 2: $$l_{22} = \sqrt{13 - 3^2} = \sqrt{4} = 2$$ $$l_{32} = \frac{-11 - (-4)(3)}{2} = \frac{1}{2} = 0.5$$
Column 3: $$l_{33} = \sqrt{29 - (-4)^2 - (0.5)^2} = \sqrt{29 - 16 - 0.25} = \sqrt{12.75} \approx 3.5707$$
$$L = \begin{bmatrix} 2 & 0 & 0 \ 3 & 2 & 0 \ -4 & 0.5 & 3.5707 \end{bmatrix}$$
Step 3 - Forward Substitution ($LY = B$)
$$y_1 = \frac{-8}{2} = -4$$ $$y_2 = \frac{-1 - 3(-4)}{2} = \frac{11}{2} = 5.5$$ $$y_3 = \frac{57 - (-4)(-4) - (0.5)(5.5)}{3.5707} = \frac{57 - 16 - 2.75}{3.5707} = \frac{38.25}{3.5707} \approx 10.7121$$
Step 4 - Back Substitution ($L^T X = Y$)
$$z = \frac{10.7121}{3.5707} \approx 3$$ $$y = \frac{5.5 - 0.5(3)}{2} = \frac{4}{2} = 2$$ $$x = \frac{-4 - 3(2) - (-4)(3)}{2} = \frac{2}{2} = 1$$
Verification
- Eq1: $4(1)+6(2)-8(3) = 4+12-24 = -8$ ✓
- Eq2: $6(1)+13(2)-11(3) = 6+26-33 = -1$ ✓
- Eq3: $-8(1)-11(2)+29(3) = -8-22+87 = 57$ ✓
Result
$$\boxed{x = 1, \quad y = 2, \quad z = 3}$$
Gauss-Seidel iteration method
2080 · 10 marks
Compare and contrast between Jacobi iterative methods and Gauss Seidal method? Solve the following equation using Gauss Seidal method.
$$ \begin{aligned} x + 2y + 3z &= 5 \ 2x + 8y + 22z &= 6 \ 3x + 22y + 82z &= -10 \end{aligned} $$
[10]
2079 · 5 marks
Solve the following system of linear equations using Gauss-Seidal method.
$$\begin{aligned} 10x + y + z &= 12 \ 2x + 10y + z &= 13 \ 2x + 2y + 10z &= 14 \end{aligned}$$
[5]
Gaussian elimination method
2079 · 5 marks
Solve the following system of linear equations using Gaussian elimination method.
$$\begin{aligned} 2x + 2y + z &= 12 \ 3x + 2y + 2z &= 8 \ 5x + 10y - 8z &= 10 \end{aligned}$$
[5]
Gaussian elimination with partial pivoting
2078 · 5 marks
Solve the following system of linear equation by Gauss Elimination with Pivoting $2x + 2y + z = 6$, $4x + 2y + 3z = 4$, $x - y + 1 = 0$. [5]
LU decomposition and Doolittle method
0 · 5 marks
Derive formula for the Doolittle LU decomposition matrix factorization method. [5]
Make Unit 7 stick
Practice BIT203 with flashcards & quizzes