Last Updated on November 8, 2026 by Maged kamel
Solving Systems with PA = LU Factorization.
In Gaussian elimination, when a pivot element is zero or relatively small compared to other elements in its column, Row interchanges become necessary to ensure numerical stability and prevent division by zero. When Row swaps occur, the classical $A = LU$ decomposition no longer holds directly. Instead, we obtain the PA = LU factorization, where P is a permutation Matrix encoding the history of Row exchanges. As Professor Timothy Sauer notes in Numerical Analysis, PA = LU represents the Matrix formulation of Gaussian elimination with partial pivoting and is the workhorse of computational linear algebra.

Previously, we derived expressions for L and U for 2 × 2 and 3 × 3 matrices, assuming A = LU. But depending on the Matrix, if a pivot is 0 or very small, the Expression becomes PA = LU due to the exchange. So we must be careful about fitting the Row exchange information into the factorization.
Video for Solving Systems with PA = LU Factorization: A Complete Guide- 2×2 Matrix
The following video illustrates this Post’s Content.
Timestamps for Video:
- 00:00 Introduction to the new formula PA = LU due to pivoting.
- 02:12 A solved Problem 2.14
- 04:23 Expression of PA=PB and use Gaussian elimination
- 06:26 Values of x1 and x2
- 07:00 How can we find L and U matrices?
- 11:20 Use formula LUX=Pb to get the x1 and x2 values.
- 12:12 Determine the Inverse of the L and U matrices.
- 14:37 Use the inverses of L and U to find X1 and X2 values.
- 16:19 The final values for X1 and X2.
Solve example 2.14 for partial pivoting.
We consider Example 2.14 from Timothy Sauer’s Numerical Analysis (p. 99).To solve system 2.14, the author gave us Matrix A in augmented form: A augmented B11, 3, 3 minus 4 and 2, and we can write two equations as X1 + X2 = 3 and 3 X1 – 4 X2 = 2.
Step 1: Check the absolute values of a11 and a21 and select he bigger Value.
From the augmented Matrix, the exact solution is X1 = 2 and X2 = 1. To perform partial pivoting as required, we first check whether a11 is bigger than a21.
We compare the absolute Value of 1 and the absolute Value of 3. We find that the absolute Value of 3 is bigger than the absolute Value of a11. So we swap the rows: R1 becomes R2, and R2 becomes the first Row in the new equation.

Step 2: Swap the Second column with the first column.
After we make a swap, this becomes ( 3, -4, and 2) and 1, 1, 3.
We call this PA because it is the original Matrix multiplied by the permutation Matrix. Permutation Matrix P is due to the swap of the Second Row to the first Row. We use the new a11 element as a pivot; we will multiply the first Row by -a21/a11=1-, which is (1/3)*R1, and add the Value to the Second Row.
Step 3: Find X1 and X2 values.
The First Row is unchanged, while the Second Row will be (0, (-1/3)*(-4) + 1) = 7/3. b2 equals -1/3*-4, add to 3. The Value equals 7/3. x2 = 1, and we back-substitute; we get X1 = 2. Please refer to the following slide for more details.

The exact values and the equations do not change after partial pivoting.
We swap the Second column to become the new first column, and the old first column will be the new Second column.
The following slide shows that multiplying Matrix A by a permutation Matrix P changes Matrix A from (1, 1; 3, -4) into (3, -4; 1, 1). Keep the first Row unchanged. Multiply the Second Row by 1/3; add R1 to the Second Row.
We get the upper Matrix U as (3, -4; 0, 7/3); the lower Matrix L is (1, 0; 1/3, 1). We will multiply the lower Matrix L by the upper Matrix U to get (3 -4; 1 1), which is the PA Matrix. This is a PA Matrix, obtained by swapping the Second Row with the first Row.

Check that (LU)*X=P21 by B. We will multiply L by U by the vector X; we get ( 3 -; 1 1), while the right-hand side P21 by B will give(2 3), or a Matrix of 2×1.
We can write the Expression for x1 and x2 as two equations.
We have 3 X1 – 4 X2 =2 and (X1+X2=3).

Alternatively, find the values of X1 and X2 by using the Inverse of L and U.
Step A: Find the Inverse values for L and U Matrices.
To create the Inverse of L, a 2×2 Matrix, swap the diagonal and change the sign. The Inverse of L is (1 0; 1 3). To create the Inverse of U, a 2×2 Matrix, swap the diagonal and change the sign. The Inverse of U is (7/3 -4; 0 3)/7.

Step B: Find the X1 and X2 values.
We can get the Value of vector X by multiplying U-1 by L-1 by P21 by b from left to right, and we find that X1 and X2 are 2 and 1. Please refer to the last slide for a step-by-step guide.

You can view and download the PDF for the solved Problem from this Link.
Link to the Previous Posts: 13-Gauss Elimination with Partial Pivoting: 2×2 Matrix.
The following Post is Post 17: PA = LU Factorization: Solved Problem 2.16.
For scaled pivoting, refer to Post 14- Gauss Elimination with Scaled Pivoting: 2×2 Matrix.
For complete pivoting, please refer to Post 15-Gauss Elimination with Complete Pivoting: 2×2 Matrix.
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 Matrix Calculator.