Last Updated on October 23, 2026 by Maged kamel
- Gauss Elimination with Partial Pivoting: A Complete Guide- 2×2 Matrix
- Video for the solved Problem with Partial Pivoting: A Complete Guide- 2×2 Matrix
- Solved Problem for a 2×2 Matrix prior to Partial Pivoting.
- Step 1: Write the two equations in an augmented form.
- Step 2: Compare the exact Value for x1 and x2 with the correct solution.
- Step 4: Do the partial Pivoting.
- Step 5: Find the elements of a 3×3 U Matrix.
- The final values for x1 and x2 for the solved Problem.
Gauss Elimination with Partial Pivoting: A Complete Guide- 2×2 Matrix
This post demonstrates why partial pivoting is necessary when solving a 2×2 linear system with Gaussian elimination using four-digit arithmetic and rounding. Direct elimination with the very small pivot 0.003 produces a huge multiplier, significant rounding errors, and an incorrect solution. The instructor then swaps the rows to use the larger pivot 5.291, performs elimination, and obtains the accurate solution x1 = 10 and x2 = 1. This Problem is taken from Numerical Analysis by Richard Burden.

Video for the solved Problem with Partial Pivoting: A Complete Guide- 2×2 Matrix
The following video illustrates the content of this post.
Timestamps for Video:
- 00:00 Introduction to partial pivoting for a 2×2 Matrix.
- 00:33 A solved Problem #1.
- 03:10 Determine the Value of m21 in the case of no partial pivoting
- 06:40 What is the Value of x2?
- 08:40 What is the Value of x1?
- 10:36 A graph showing the difference between the two solutions.
- 11:36 How can we do partial pivoting?
- 12:42 Determine the Value of m21 in the case of partial pivoting
- 13:07 Determine the Value of a21, a22 and b22.
- 13:48 Determine the values of x2 and x1.
Solved Problem for a 2×2 Matrix prior to Partial Pivoting.
The following Problem includes two equations with two unknowns, and it is required to use Gaussian elimination to find the Values of x1 and x2 with a given solution for the final Value
Step 1: Write the two equations in an augmented form.
First, the equations are: 0.003×1 + 59.14×2 = 59.17, and the Second equation is 5.291×1 – 6.130×2 = 46.78. The details for estimating the determinant are shown on the next slide. We are going to write Matrix A as an augmented Matrix: 2 by 2, 0.003000, then 59.14, and this is the line, and the right-hand side is 59.217. For the Second Row, we have 5.291, -6.13 = 46.78.

The Value of a11 is very small (0.003); we find -a21/a11, which is m21 = -2.291/0.003 = -763.7.
The First Row is left unchanged, and we multiply -1764*R1 and add it to R2. The Second Row will be (a21=0, while a22=-104300. In the next slide, the new value of b22 equals -104353.22, which can be approximated as -104400. The value of x2=+1.001. We back-substitute into the first equation to find x1.

X1 is equal to (59.17-59.14*1.001)/0..03=-10.00. Please refer to the following slide for more details.

Step 2: Compare the exact Value for x1 and x2 with the correct solution.
The following slide shows the elements we need to find: L22, L32, L33, and U23.
There is a major error: the exact Value of x1 is +10, and the estimated Value is -10 for x1 and 1.001 for x2. Please refer to the following slide for more details.

Step 4: Do the partial Pivoting.
L33 = -1163/106, which is the element in the 3rd Row/third column.
Step 5: Find the elements of a 3×3 U Matrix.
To avoid dividing by a small number and making errors, we estimate the max absolute value of a11 and a21; the max absolute Value is +5.291, so we interchange the first row and make a swap, letting the Second Row become the new first Row. We will write the two equations as 5.291×1-6.13×2=46.78 as the first Row after the swap, while the new Second Row is 0.003000×1+59.14×2=59.17. The new m21=-0.0030/5.291=-0.000567
Please refer to the slide image below.

The following slide image shows that a21=0, a22=59.143, and b21=59.143.

The final values for x1 and x2 for the solved Problem.
To get this x2 Value, we divide 59.143 by 59.143; this will givx2=++1. for x1 we make a back substitution x1=(46.78+6.13/5.291=10.00.both values of x1 and x2 match with the exact solution. The E2 Matrix: please refer to the following slide.

You can view and download the PDF for the solved Problem from this Link.
Link to the Previous Post: 12-Second Solved Problem for a 3×3 Matrix by Crout’s LU -Option 2.
This is the Omni calculator for estimating various linear algebra items: LU Decomposition Calculator.
Link to the the Omni calculator:: LU Decomposition Calculator.
Another calculator to use is the Calculator for matrices.