LINEAR ALGEBRA • SYSTEMS OF LINEAR EQUATIONS & MATRICES

Elementary Matrices

Simple building-block matrices that capture every row operation used to solve systems of equations.

Historical Context & Motivation

For centuries, mathematicians have been solving systems of equations — sets of equations that share the same unknowns. As problems grew more complicated (think: dozens of equations with dozens of unknowns), people needed a faster, more organized method than just substituting one equation into another.

The idea of using rectangular grids of numbers — called matrices — to organize and solve these systems developed over hundreds of years. Along the way, mathematicians realized that the basic steps you take to solve a system (like swapping two equations or multiplying both sides by a number) could themselves be represented as special matrices. These special matrices are the elementary matrices we study today.

~200 BCE
Ancient Chinese Systems
The Chinese text The Nine Chapters on the Mathematical Art used rectangular arrays of numbers to solve systems of equations, an early form of what we now call matrices.
1750s
Cramer's Rule & Determinants
Gabriel Cramer published a formula for solving systems using determinants, showing that structured methods could replace guess-and-check approaches.
1858
Cayley Formalizes Matrices
Arthur Cayley formally defined matrix algebra, including how to multiply matrices. This made it possible to express row operations as matrix multiplication.
1940s–1950s
Computers & Row Reduction
Early computers used Gaussian elimination (row reduction) to solve huge systems. Elementary matrices became a key theoretical tool for understanding and programming these algorithms.

The central question that elementary matrices answer is this: can we break down the process of solving a system of equations into tiny, reversible steps — and can each step be described by its own matrix? The answer is yes, and that turns out to be incredibly useful.

Core Principles & Definitions

Before we dive in, let's make sure we share some vocabulary. A matrix is a rectangular grid of numbers arranged in rows and columns. The identity matrix (usually written as I) is a special square matrix that has 1s along its main diagonal and 0s everywhere else. Multiplying any matrix by the identity matrix leaves it unchanged — kind of like multiplying a number by 1.

An elementary matrix is a matrix you get by performing exactly one row operation on the identity matrix. There are three types of row operations, so there are three types of elementary matrices.

1

Row Swap

Switch two rows with each other. For example, swap Row 1 and Row 3. The elementary matrix for this is the identity matrix with those two rows swapped.
2

Row Scaling

Multiply every entry in one row by a nonzero constant. For example, multiply Row 2 by 5. The elementary matrix has that constant in place of the 1 on the diagonal.
3

Row Replacement

Add a multiple of one row to another row. For example, add 3 × Row 1 to Row 2. The elementary matrix has that multiplier (3) in the off-diagonal spot.

A key fact is that multiplying a matrix A by an elementary matrix E on the left (writing E × A) has the exact same effect as performing that row operation directly on A. This is what makes elementary matrices so powerful: they turn row operations into multiplication.

KEY TAKEAWAY
Think of elementary matrices like cooking instructions written on cards. Each card says one simple thing: "swap the eggs and flour," "double the sugar," or "mix the salt into the butter." One card by itself is easy. But if you stack up a sequence of cards, you can describe an entire recipe. In the same way, every complicated row reduction can be broken into a sequence of elementary matrices.

Visual Explanation

The diagram below shows all three types of elementary matrices for a 3 × 3 system. Each one starts from the 3 × 3 identity matrix and applies exactly one row operation. Notice how the change appears in just one or two entries.

Each elementary matrix is built by modifying the identity matrix with exactly one row operation. The row swap matrix exchanges rows 1 and 3. The row scaling matrix replaces the 1 in row 2 with a 5. The row replacement matrix places a 3 in the (2,1) position, meaning "add 3 times row 1 to row 2."

Look at how few entries change in each elementary matrix. In the row swap matrix, the 1s moved from their diagonal positions to off-diagonal positions in rows 1 and 3. In the row scaling matrix, only one diagonal entry changed (from 1 to 5). In the row replacement matrix, only one off-diagonal entry changed (from 0 to 3). This simplicity is the whole point — each elementary matrix records one small, clear step.

Mathematical Framework

Let's formalize how elementary matrices work. The magic property is that left-multiplying a matrix A by an elementary matrix E produces the same result as performing that row operation on A directly.

ELEMENTARY MATRIX MULTIPLICATION
E × A = (result of applying the row operation to A)
E = an elementary matrix (built from I by one row operation), A = any matrix with the same number of rows as E.

For example, suppose we have a 2 × 2 matrix A and we want to swap its two rows. The elementary matrix for swapping rows in a 2 × 2 system is:

ROW SWAP EXAMPLE (2×2)
E = [ 0 1 ] A = [ a b ] E × A = [ c d ] [ 1 0 ] [ c d ] [ a b ]
The rows of A are swapped. The first row of the result is the second row of A, and vice versa.

Every elementary matrix is invertible (reversible). This means you can always "undo" a row operation. Swapping rows twice gets you back to the start. Multiplying a row by 5 can be undone by multiplying by 1/5. Adding 3 times row 1 to row 2 can be undone by subtracting 3 times row 1 from row 2.

INVERSE OF AN ELEMENTARY MATRIX
E × E⁻¹ = I
E⁻¹ is the inverse of E. It is also an elementary matrix — the one that reverses the original row operation. Multiplying E by E⁻¹ gives back the identity matrix I.

Finally, here is a big-picture result. If you can row-reduce a square matrix A all the way to the identity matrix I, then A equals the product of the inverses of those elementary matrices:

MATRIX AS A PRODUCT OF ELEMENTARY MATRICES
A = E₁⁻¹ × E₂⁻¹ × … × Eₖ⁻¹
E₁, E₂, …, Eₖ are the elementary matrices used (in order) to reduce A to I. This tells us that every invertible matrix can be written as a product of elementary matrices.

Detailed Classification & Inverses

Let's organize the three types of elementary matrices, their notation, and — importantly — what their inverses look like. The table below is a handy reference.

Summary of the three types of elementary matrices and their inverses.
TypeRow OperationHow E Differs from IInverse E⁻¹
Row SwapSwap Rᵢ ↔ RⱼRows i and j of I are swappedSame matrix (swap again = undo)
Row ScalingMultiply Rᵢ by c (c ≠ 0)The 1 in position (i, i) becomes cReplace c with 1/c on diagonal
Row ReplacementRᵢ ← Rᵢ + c × RⱼA c appears in position (i, j)Replace c with −c in position (i, j)

The diagram below shows a concrete example: performing a row replacement on a 3 × 3 matrix A by multiplying it on the left by an elementary matrix E.

The elementary matrix E encodes "add 2 times Row 1 to Row 2." When we multiply E × A, only Row 2 changes. The new Row 2 is calculated as 2 × (old Row 1) + 1 × (old Row 2), which gives [6, 11, 10].
💡 Quick Check
Notice that rows 1 and 3 of the result are identical to rows 1 and 3 of A. That's because the corresponding rows of E are the same as the identity matrix — they say "keep this row exactly as it is."

Worked Example

Let's work through a full example. We'll write a matrix A as a product of elementary matrices by row-reducing it to the identity matrix and then reversing the process.

Express A as a Product of Elementary Matrices
1
Step 1 — State the MatrixLet A = [ 1 2 ] / [ 3 8 ]. Our goal is to row-reduce A to the 2 × 2 identity matrix I, keeping track of each elementary matrix we use.
A = [ 1 2 ; 3 8 ]
2
Step 2 — Eliminate the 3 in position (2,1)We perform R₂ ← R₂ − 3·R₁. This uses the elementary matrix E₁ = [ 1 0 ; −3 1 ]. Multiplying: E₁ × A = [ 1 2 ; 0 2 ].
After E₁: [ 1 2 ; 0 2 ]
3
Step 3 — Scale Row 2 to get a leading 1We perform R₂ ← (1/2)·R₂. This uses E₂ = [ 1 0 ; 0 1/2 ]. Multiplying: E₂ × E₁ × A = [ 1 2 ; 0 1 ].
After E₂: [ 1 2 ; 0 1 ]
4
Step 4 — Eliminate the 2 in position (1,2)We perform R₁ ← R₁ − 2·R₂. This uses E₃ = [ 1 −2 ; 0 1 ]. Multiplying: E₃ × E₂ × E₁ × A = [ 1 0 ; 0 1 ] = I.
After E₃: I = [ 1 0 ; 0 1 ]
5
Step 5 — Solve for ASince E₃ × E₂ × E₁ × A = I, we can solve for A by multiplying both sides on the left by the inverses: A = E₁⁻¹ × E₂⁻¹ × E₃⁻¹. The inverses are: E₁⁻¹ = [ 1 0 ; 3 1 ], E₂⁻¹ = [ 1 0 ; 0 2 ], E₃⁻¹ = [ 1 2 ; 0 1 ].
A = [ 1 0 ; 3 1 ] × [ 1 0 ; 0 2 ] × [ 1 2 ; 0 1 ]
Verify Your Answer
You can always check your work by multiplying the elementary matrices together. If you get back the original A, you know you did it right! Try it: [ 1 0 ; 3 1 ] × [ 1 0 ; 0 2 ] = [ 1 0 ; 3 2 ], and then [ 1 0 ; 3 2 ] × [ 1 2 ; 0 1 ] = [ 1 2 ; 3 8 ] = A. ✓

Strengths & Limitations

Elementary matrices are a powerful theoretical tool, but like anything in math, they come with trade-offs. Understanding when to use them — and when another method might be easier — is an important skill.

Strengths and limitations of elementary matrices.
StrengthsLimitations
Every row operation becomes a precise, reversible matrix multiplication.For large matrices, writing out every elementary matrix is tedious. People usually just do row reduction directly.
They prove that every invertible matrix can be built from simple pieces.They only apply to invertible (non-singular) matrices. If a matrix cannot be reduced to I, the decomposition doesn't work.
Inverses are trivially easy to find — just reverse the one operation.The number of elementary matrices needed grows quickly. A 5 × 5 matrix might need 10+ elementary matrices.
They provide a deep understanding of why row reduction works.In practice, computers use optimized algorithms, not explicit elementary matrix products.
KEY TAKEAWAY
Elementary matrices are like the LEGO bricks of linear algebra. You wouldn't describe a full LEGO spaceship brick by brick in everyday life — you'd just show someone the finished model. But knowing that every model is built from the same simple bricks helps you understand how to build, modify, or take apart any structure. Similarly, you may not write out every elementary matrix in practice, but knowing they exist gives you a deep understanding of how matrices work.

Connection to Advanced Topics

Elementary matrices are a stepping stone to several powerful ideas in linear algebra. Here's a preview of where they lead as you continue studying.

How elementary matrices connect to topics you'll see later in linear algebra.
Elementary Matrix IdeaAdvanced Topic It Connects To
Every invertible matrix = product of elementary matricesMatrix inverses — to find A⁻¹, row-reduce [A | I] to [I | A⁻¹] using elementary matrices.
Row swap changes the sign of the determinantDeterminants — the determinant of a row-swap elementary matrix is −1. Scaling by c gives determinant c.
Row reduction tracks linear independenceRank and dimension — the number of pivots after row reduction reveals the dimension of the column space.
Decomposing A into elementary matrix factorsLU Decomposition — a more efficient factorization where A = L × U, used in computer algorithms.

One of the most important connections is to LU decomposition. Instead of storing every single elementary matrix from row reduction, mathematicians bundle the row-replacement steps into a single lower-triangular matrix L and the final reduced form into an upper-triangular matrix U. This is essentially a compressed version of the elementary matrix approach, and it's what computers actually use to solve huge systems of equations in science and engineering.

Practice Problems

PROBLEM 1CONCEPTUAL
What is the difference between a row-swap elementary matrix and a row-replacement elementary matrix? How can you tell them apart just by looking at the matrix?
PROBLEM 2BASIC CALCULATION
Write the 3 × 3 elementary matrix E that performs the operation: multiply Row 3 by 4. Then find E⁻¹.
PROBLEM 3INTERMEDIATE
Let A = [ 2 1 ; 6 4 ]. Perform row reduction to turn A into the identity matrix, and list each elementary matrix used in order.
PROBLEM 4APPLIED
A robotics engineer uses a matrix T to transform coordinates. She discovers that T = E₁ × E₂ where E₁ is a row-swap matrix (swap rows 1 and 2) and E₂ scales Row 1 by 3 (both 2 × 2). What is the matrix T, and what is T⁻¹?
PROBLEM 5CRITICAL THINKING
Suppose a 3 × 3 matrix B cannot be row-reduced to the identity matrix — row reduction stops at a matrix with a row of all zeros. Can B be written as a product of elementary matrices? Explain your reasoning.

Summary

An elementary matrix is the identity matrix with exactly one row operation applied to it. There are three types: row swaps (exchange two rows), row scalings (multiply a row by a nonzero constant), and row replacements (add a multiple of one row to another). Multiplying a matrix A on the left by an elementary matrix E performs that row operation on A.

Every elementary matrix is invertible, and its inverse is also an elementary matrix that undoes the original operation. A major theorem states that every invertible matrix can be written as a product of elementary matrices. This idea connects directly to Gaussian elimination, computing matrix inverses, understanding determinants, and the more advanced LU decomposition used by computers.

Varsity Tutors • Linear Algebra • Elementary Matrices