4.2 Row Operations and Elementary Matrices

4.2 Row Operations and Elementary Matrices

When most people think of Gaussian elimination, they imagine the arithmetic: subtracting multiples of one row from another, swapping rows, scaling rows. These operations feel procedural, almost mechanical—steps on a worksheet rather than mathematical objects with their own structure.

But numerical linear algebra invites us to look deeper. Every row operation is not just a trick to eliminate entries. It is a matrix transformation, and once you learn to see it that way, elimination becomes far more coherent, predictable, and analyzable.

In fact, row operations are matrices—specific matrices we call elementary matrices. And understanding them is the key to unlocking LU decomposition, pivoting, stability, and nearly every practical solver used today.


Row Operations as Transformations

Gaussian elimination uses three basic row operations:

  1. Swap two rows
  2. Multiply a row by a nonzero scalar
  3. Add a multiple of one row to another

On paper, these feel like low-level manipulations. But each operation can be represented as multiplying the matrix on the left by a carefully constructed transformation matrix.

This is the first important idea:

Row operations are left-multiplications by elementary matrices.

Once you see this, elimination stops being a list of steps and becomes a structured sequence of matrix multiplications—each with a clear and analyzable effect.


Elementary Matrices: The Building Blocks

Let’s examine the three kinds of elementary matrices and the intuition behind them.

1. Row Swap (Permutation Matrix)

Swapping row i and row j corresponds to multiplying by a permutation matrix. A permutation matrix looks like the identity matrix, except two rows have traded places.

When you multiply a matrix by a permutation matrix, it simply rearranges the rows. No scaling, no distortion—just reordering. This might seem harmless, but you will soon see that permutation matrices are the backbone of pivoting strategies that save Gaussian elimination from instability.

2. Row Scaling

Multiplying row i by a nonzero scalar corresponds to multiplying by a diagonal matrix with that scalar in the ith diagonal position.

This is rarely used directly in numerical elimination, because scaling can degrade stability by magnifying rounding errors. Still, conceptually, it shows how each manipulation is a matrix transformation.

3. Row Replacement (Elimination Step)

This is the heart of elimination: replacing row j with rowj – m × rowi. The corresponding elementary matrix is an identity matrix with -m inserted in position (j, i). Multiplying by this matrix zeros out the target entry.

These elimination matrices are lower triangular with ones on the diagonal—exactly the shape of the L in LU decomposition. That is no accident.

This brings us to a profound insight:

Gaussian elimination is the construction of an LU factorization through elementary matrices.

What appears to be a procedure is in fact a factorization happening in real time.


The Accumulation of Transformations

When performing elimination by hand, it's easy to lose sight of how these operations accumulate. Each elimination step modifies the matrix and also adds another transformation to the growing sequence that defines the entire process.

If you apply elimination matrices E₁, E₂, …, Eₖ to a matrix A, the result is:

Eₖ ⋯ E₂ E₁ A = U

where U is the upper-triangular matrix produced by elimination.

Rearranging, you get:

A = (E₁⁻¹ E₂⁻¹ ⋯ Eₖ⁻¹) U

But all elimination matrices are easily invertible, and their inverses are also lower triangular with simple structure. This product of inverses is exactly the L matrix in LU decomposition.

In other words:

Elementary matrices are not just a conceptual tool. They are the formal foundation of LU.

And LU, as we’ll see, is the foundation of almost every practical linear system solver.


Why This Matters for Numerical Stability

Understanding row operations as transformations matters because the stability of Gaussian elimination depends on the behavior of these matrices.

A stable elimination process is one in which the elementary matrices:

  • do not amplify rounding errors excessively
  • do not create intermediate values too large or too small
  • preserve the structure of the matrix as much as possible

Unstable elimination corresponds to elementary matrices that are numerically dangerous—large multipliers, small pivots, or transformations that distort the matrix too aggressively.

And that brings us directly to the next essential topic: pivoting.


Transition to 4.3 Pivoting Strategies

If row operations are the tools of elimination, then pivoting is the method we use to choose the right tools in the right order. Without pivoting, elimination can easily select tiny pivots, create huge multipliers, and produce wildly unstable transformations. But with smart pivoting, elimination becomes not just usable, but robust and reliable.

To see how pivoting protects us—and why modern solvers rely on it—we now turn to the next section:

4.3 Pivoting Strategies

2025-09-19

Shohei Shimoda

I organized and output what I have learned and know here.