Skip to main content

Section 2.5 Elementary matrix

In chemistry, the periodic table reveals that all matter is composed of fundamental elements—combining these building blocks in different ways produces the vast diversity of materials we encounter. In linear algebra, elementary matrices play a remarkably similar role: they are the fundamental building blocks from which all invertible matrices can be constructed.
This perspective transforms our understanding of matrix operations in a profound way. When we perform row operations to solve systems of equations or compute inverses, we are not just manipulating rows—we are implicitly multiplying by elementary matrices. This realization bridges the gap between algorithmic procedures (like Gaussian elimination) and algebraic structures (like matrix multiplication), revealing that these seemingly different approaches are actually two sides of the same coin.
The power of this connection cannot be overstated. By expressing algorithms as matrix multiplications, we gain several significant advantages:
  • Theoretical Clarity: Row operations become matrix equations, making proofs more rigorous and relationships more transparent.
  • Computational Efficiency: Matrix multiplication is highly optimized in modern computing, allowing us to leverage powerful hardware and software libraries.
  • Compositional Understanding: Just as molecules are built from atoms, complex transformations can be decomposed into products of elementary matrices, revealing their internal structure.
  • Universal Language: The language of matrix multiplication is understood across mathematics, physics, computer science, and engineering, making our results broadly applicable.
In this section, we will explore how elementary matrices serve as the "periodic table" of linear algebra. We will see how every invertible matrix can be expressed as a product of elementary matrices, and how this factorization provides deep insights into the structure and properties of linear transformations. This perspective will not only deepen our understanding of matrix operations but also prepare us for more advanced topics in linear algebra and its applications.

Subsection 2.5.1 Elementary Matrices and Their Properties

Definition 2.5.1.

An elementary matrix is a matrix that is obtained by performing a single elementary row operation on an identity matrix.

Example 2.5.2. The Three Types of Elementary Matrices.

There are exactly three types of elementary matrices, corresponding to the three types of elementary row operations. Let’s construct each type explicitly and understand how they are obtained.
Type 1: Row Swap Matrix
To obtain an elementary matrix that swaps two rows, we perform that swap on the identity matrix.
Example: Let’s create the elementary matrix that swaps rows 1 and 3 in a \(3 \times 3\) matrix.
Start with the \(3 \times 3\) identity matrix:
\begin{equation*} I_3 = \begin{pmatrix} 1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 1 \end{pmatrix} \end{equation*}
Swap rows 1 and 3 to get:
\begin{equation*} E_1 = \begin{pmatrix} 0 \amp 0 \amp 1 \\ 0 \amp 1 \amp 0 \\ 1 \amp 0 \amp 0 \end{pmatrix} \end{equation*}
Type 2: Row Scaling Matrix
To obtain an elementary matrix that multiplies a row by a nonzero scalar, we perform that scaling on the identity matrix.
Example: Let’s create the elementary matrix that multiplies row 2 by \(c = 5\) in a \(3 \times 3\) matrix.
Start with the \(3 \times 3\) identity matrix:
\begin{equation*} I_3 = \begin{pmatrix} 1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 1 \end{pmatrix} \end{equation*}
Multiply row 2 by 5 to get:
\begin{equation*} E_2 = \begin{pmatrix} 1 \amp 0 \amp 0 \\ 0 \amp 5 \amp 0 \\ 0 \amp 0 \amp 1 \end{pmatrix} \end{equation*}
Type 3: Row Addition Matrix
To obtain an elementary matrix that adds a multiple of one row to another row, we perform that operation on the identity matrix.
Example: Let’s create the elementary matrix that adds \(c = 3\) times row 1 to row 3 in a \(3 \times 3\) matrix.
Start with the \(3 \times 3\) identity matrix:
\begin{equation*} I_3 = \begin{pmatrix} 1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 1 \end{pmatrix} \end{equation*}
Add 3 times row 1 to row 3 to get:
\begin{equation*} E_3 = \begin{pmatrix} 1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 3 \amp 0 \amp 1 \end{pmatrix} \end{equation*}

Proof.

We verify this for each type of elementary row operation:
  1. Row swap: If \(E\) swaps rows \(i\) and \(j\text{,}\) then \(E^{-1} = E\) (swapping the same rows again returns to the original matrix).
  2. Row scaling: If \(E\) multiplies row \(i\) by nonzero scalar \(c\text{,}\) then \(E^{-1}\) multiplies row \(i\) by \(1/c\text{.}\)
  3. Row addition: If \(E\) adds \(c\) times row \(j\) to row \(i\text{,}\) then \(E^{-1}\) adds \(-c\) times row \(j\) to row \(i\text{.}\)
In each case, \(EE^{-1} = E^{-1}E = I\text{,}\) confirming that elementary matrices are invertible.

Activity 2.5.1. Finding Inverses of Elementary Matrices.

For each elementary matrix below, determine its inverse and verify that \(EE^{-1} = I\text{.}\)
(a)
Let \(E_1\) be the elementary matrix that swaps rows 1 and 3 of the \(3 \times 3\) identity matrix.
  1. Write out \(E_1\) explicitly.
  2. Find \(E_1^{-1}\text{.}\)
  3. Verify that \(E_1 E_1^{-1} = I\text{.}\)
Hint.
What operation would undo swapping rows 1 and 3?
(b)
Let \(E_2\) be the elementary matrix that multiplies row 2 of the \(3 \times 3\) identity matrix by 5.
  1. Write out \(E_2\) explicitly.
  2. Find \(E_2^{-1}\text{.}\)
  3. Verify that \(E_2 E_2^{-1} = I\text{.}\)
Hint.
What scalar would you multiply by to undo multiplication by 5?
(c)
Let \(E_3\) be the elementary matrix that adds 3 times row 1 to row 3 of the \(3 \times 3\) identity matrix.
  1. Write out \(E_3\) explicitly.
  2. Find \(E_3^{-1}\text{.}\)
  3. Verify that \(E_3 E_3^{-1} = I\text{.}\)
Hint.
What operation would undo adding 3 times row 1 to row 3?
Use the Sage cell below to check your answers:
Examples:

Example 2.5.6. Expressing RREF as a Product of Elementary Matrices.

Let’s consider the \(2 \times 3\) matrix:
\begin{equation*} A = \begin{pmatrix} 2 \amp 4 \amp 6 \\ 1 \amp 3 \amp 5 \end{pmatrix} \end{equation*}
We will find the reduced row echelon form of \(A\) and express it as a product of elementary matrices.
Now let’s perform the row operations step by step and identify the corresponding elementary matrices:
Step 1: Swap rows 1 and 2 to get a pivot in position (1,1):
\begin{equation*} E_1 = \begin{pmatrix} 0 \amp 1 \\ 1 \amp 0 \end{pmatrix} \end{equation*}
Step 2: Add -2 times row 1 to row 2:
\begin{equation*} E_2 = \begin{pmatrix} 1 \amp 0 \\ -2 \amp 1 \end{pmatrix} \end{equation*}
Step 3: Multiply row 2 by \(-\frac{1}{2}\text{:}\)
\begin{equation*} E_3 = \begin{pmatrix} 1 \amp 0 \\ 0 \amp -\frac{1}{2} \end{pmatrix} \end{equation*}
Step 4: Add -3 times row 2 to row 1:
\begin{equation*} E_4 = \begin{pmatrix} 1 \amp -3 \\ 0 \amp 1 \end{pmatrix} \end{equation*}
Therefore, the reduced row echelon form \(B\) of \(A\) can be expressed as:
\begin{equation*} B = E_4 E_3 E_2 E_1 A \end{equation*}
where \(E_1, E_2, E_3, E_4\) are the elementary matrices corresponding to the row operations performed above.

Exercises Exercises

1.
Consider the matrix:
\begin{equation*} A = \begin{pmatrix} 1 \amp 2 \amp 3 \\ 2 \amp 5 \amp 7 \\ 3 \amp 7 \amp 9 \end{pmatrix} \end{equation*}
  1. Find the reduced row echelon form of \(A\text{.}\)
  2. Express the RREF as a product of elementary matrices multiplying \(A\text{.}\) That is, find elementary matrices \(E_1, E_2, \ldots, E_k\) such that \(E_k \cdots E_2 E_1 A = \text{RREF}(A)\text{.}\)
  3. Verify your answer by computing the product in SageMath.
Hint.
Perform row operations systematically: first create zeros below the first pivot, then below the second pivot, then make pivots equal to 1, and finally eliminate above the pivots.
Answer.