Mathwords logoMathwords

Pivoting — Definition, Formula & Examples

Pivoting is the process of swapping rows (or columns) in a matrix during Gaussian elimination so that the entry used for elimination—the pivot—is nonzero and, ideally, as large as possible in absolute value.

In the context of row reduction of an augmented matrix, pivoting is a reordering strategy applied at each elimination stage: partial pivoting selects the row with the largest absolute value in the current pivot column and exchanges it with the current pivot row, ensuring numerical stability and avoiding division by zero.

How It Works

During Gaussian elimination, you work column by column to create zeros below each pivot position. Before eliminating entries in a column, you inspect all entries at or below the current pivot row in that column. You swap the current row with the row containing the largest absolute value in that column. This row exchange is a valid elementary row operation and does not change the solution set. After the swap, you proceed with the usual elimination step, dividing and subtracting to create zeros below the new pivot.

Worked Example

Problem: Use partial pivoting to begin Gaussian elimination on the augmented matrix for the system: 0x + 2y = 6, 4x + 3y = 11.
Write the augmented matrix: Set up the augmented matrix from the system of equations.
[0264311]\left[\begin{array}{cc|c} 0 & 2 & 6 \\ 4 & 3 & 11 \end{array}\right]
Identify the pivot problem: The entry in position (1,1) is 0, so you cannot use it as a pivot for elimination in column 1.
Swap rows (pivot): Exchange Row 1 and Row 2 so the largest absolute value in column 1 (which is 4) becomes the pivot.
R1R2    [4311026]R_1 \leftrightarrow R_2 \implies \left[\begin{array}{cc|c} 4 & 3 & 11 \\ 0 & 2 & 6 \end{array}\right]
Continue elimination: The matrix is already in row echelon form. Back-substitute: from Row 2, y = 3; from Row 1, 4x + 3(3) = 11, so x = 1/2.
y=3,x=12y = 3, \quad x = \frac{1}{2}
Answer: After pivoting and back-substitution, x = 1/2 and y = 3.

Why It Matters

Pivoting is essential in computational linear algebra. Without it, Gaussian elimination can fail outright when a zero appears on the diagonal, and even small pivots cause rounding errors to explode in computer arithmetic. Every serious linear-algebra software package, including MATLAB and NumPy, uses partial pivoting by default when solving systems.

Common Mistakes

Mistake: Skipping the pivot step when the current pivot entry is nonzero but very small.
Correction: Even a nonzero but small pivot causes large rounding errors during floating-point computation. Always select the row with the largest absolute value in the pivot column (partial pivoting) for numerical stability.