From a Row Operation to a Matrix
An elementary matrix is built by making one permitted row operation on an identity matrix. This turns a description such as “swap rows 1 and 3” into a specific matrix with a specific order. The construction is direct: first write the identity matrix, then change exactly the row or rows named by the operation. The identity matrix must have enough rows for every index used.
All matrices and scalars in this tutorial are over \(\mathbb{R}\). For \(n\in\mathbb{N}\), the identity matrix \(\mathbf{I}_n\) has order \(n\), and its \(k\)th row is \(\mathbf{e}_k^{\top}\), where \(\mathbf{e}_k\) is the \(k\)th standard basis column in \(\mathbb{R}^n\). Thus, for example, the rows of \(\mathbf{I}_3\) are \((1,0,0)\), \((0,1,0)\), and \((0,0,1)\).
The three elementary row operations are: swapping two distinct rows \(R_i\) and \(R_j\); scaling a row \(R_i\) by a nonzero scalar \(c\); and replacing one row \(R_i\) by \(R_i+cR_j\), where \(i\ne j\) and \(c\in\mathbb{R}\). The indices name rows, not the number of rows in the matrix. Consequently, the order \(n\) must be at least as large as the greatest row index named by the operation. For instance, an operation involving row 3 requires an identity matrix of order at least 3.
The Three Row Patterns
The definition gives a simple way to describe every row of an elementary matrix. A row not named by the operation stays equal to its row in the identity matrix. A named row is changed according to the operation. In the swap case, both named rows change places.
- For \(R_i\leftrightarrow R_j\), with \(i\ne j\), row \(i\) becomes \(\mathbf{e}_j^{\top}\), row \(j\) becomes \(\mathbf{e}_i^{\top}\), and every other row \(k\) remains \(\mathbf{e}_k^{\top}\).
- For \(R_i\to cR_i\), with \(c\ne0\), row \(i\) becomes \(c\mathbf{e}_i^{\top}\), and every other row remains \(\mathbf{e}_k^{\top}\).
- For \(R_i\to R_i+cR_j\), with \(i\ne j\), row \(i\) becomes \(\mathbf{e}_i^{\top}+c\mathbf{e}_j^{\top}\), and every other row remains \(\mathbf{e}_k^{\top}\).
Proof. The \(k\)th row of \(\mathbf{I}_n\) is \(\mathbf{e}_k^{\top}\). A swap interchanges the original rows \(i\) and \(j\), so those rows become \(\mathbf{e}_j^{\top}\) and \(\mathbf{e}_i^{\top}\), respectively; all other rows are untouched. Scaling row \(i\) multiplies its original row \(\mathbf{e}_i^{\top}\) by \(c\), while leaving every other row untouched. For a replacement, the original row \(i\) is \(\mathbf{e}_i^{\top}\) and the original row \(j\) is \(\mathbf{e}_j^{\top}\), so the new row \(i\) is \(\mathbf{e}_i^{\top}+c\mathbf{e}_j^{\top}\); the other rows are untouched. These descriptions specify every row, so in each case they determine exactly one matrix. \(\square\)
The replacement condition \(i\ne j\) matters: the row being changed and the row being added must be different. The scaling condition \(c\ne0\) also matters. Multiplying a row by zero is not one of the permitted elementary row operations.
Proof. In a replacement, row \(i\) is \(\mathbf{e}_i^{\top}+c\mathbf{e}_j^{\top}\). Since \(i\ne j\), the \(i\)th component of this row is \(1+0=1\), and its \(j\)th component is \(0+c=c\). Every other component is zero, and every other row remains an identity row. In a scaling, row \(i\) is \(c\mathbf{e}_i^{\top}\), whose \(i\)th component is \(c\) and whose other components are zero; all other rows remain unchanged. This proves both entry descriptions. \(\square\)
Worked Constructions
Worked Example: Swapping Rows 1 and 3
Construct the elementary matrix for \(R_1\leftrightarrow R_3\). The greatest row index named is 3, so choose an identity matrix of order 3. Its rows, in order, are \((1,0,0)\), \((0,1,0)\), and \((0,0,1)\). Swap the first and third rows, leaving the second row unchanged:
The result is the elementary matrix for the specified swap. Its first row is the original third row, its third row is the original first row, and its second row is unchanged. These row-by-row checks confirm that the stated operation was applied to \(\mathbf{I}_3\).
Worked Example: Scaling Row 2 by \(-2\)
Construct the elementary matrix for \(R_2\to -2R_2\). Row 2 is the greatest index named, so order 2 is sufficient. Start with \(\mathbf{I}_2\), whose rows are \((1,0)\) and \((0,1)\). Multiply the second row by \(-2\):
The first row remains \((1,0)\), and the second row is \(-2(0,1)=(0,-2)\). The new row therefore has the required entries, and the scaling factor is nonzero as required for an elementary row operation.
Worked Example: Adding a Multiple of Another Row
Construct the elementary matrix for \(R_1\to R_1+3R_2\). Both indices are at most 2, so begin with \(\mathbf{I}_2\). The original first row is \((1,0)\), and the original second row is \((0,1)\). The new first row is
The second row is unchanged, giving
Checking the rows against the instruction, row 1 is \((1,3)\), exactly the sum calculated above, and row 2 is still \((0,1)\). No other row is present to change.
Worked Example: A Replacement with a Negative Fraction
Construct the elementary matrix for \(R_3\to R_3-\tfrac12R_1\). The greatest row index named is 3, so use \(\mathbf{I}_3\). The original rows 1 and 3 are \((1,0,0)\) and \((0,0,1)\). Calculate the new third row using those identity rows:
Rows 1 and 2 are unchanged. Therefore the elementary matrix is
Its third row has \(-\tfrac12\) in column 1 and \(1\) in column 3, as the replacement calculation requires. Its first and second rows are still the corresponding identity rows.
Common Mistakes and Practical Checks
Using an identity matrix with too few rows. A tempting but invalid construction for \(R_1\leftrightarrow R_3\) is to start with \(\mathbf{I}_2\) and attempt to swap its first and third rows. The matrix \(\mathbf{I}_2\) has only rows 1 and 2, so row 3 does not exist and the operation cannot be performed. The correction is to use \(\mathbf{I}_3\), since the order must be at least the greatest named row index, 3. The corrected result is \(\begin{bmatrix}0&0&1\\0&1&0\\1&0&0\end{bmatrix}\).
Changing the wrong row in a replacement. For \(R_1\to R_1+3R_2\), changing row 2 instead would produce \(\begin{bmatrix}1&0\\3&1\end{bmatrix}\), which corresponds to \(R_2\to R_2+3R_1\), not the requested operation. The replacement changes the row on the left of the arrow; the row on the right is used as the added row and stays unchanged.
Allowing a zero scaling factor. Replacing \(R_i\to cR_i\) with \(c=0\) would erase row \(i\). For example, scaling row 2 of \(\mathbf{I}_2\) by zero gives \(\begin{bmatrix}1&0\\0&0\end{bmatrix}\), but this is not an elementary matrix for a permitted scaling operation: the scaling factor must be nonzero.
Before accepting a construction, check the order, the changed row or rows, and the entries in those rows. A swap must exchange exactly two identity rows; a scaling must alter exactly the specified row; and a replacement must alter the target row by adding the stated multiple of a different row. These checks make the construction mechanical and help prevent index errors.
Check Your Understanding
For each item, state a suitable order and write the elementary matrix by applying the operation to the identity matrix.
- Construct the elementary matrix for \(R_2\leftrightarrow R_4\). Why is order 2 not sufficient?
- Construct the elementary matrix for \(R_1\to 5R_1\) using the smallest suitable order.
- Construct the elementary matrix for \(R_2\to R_2-2R_1\) using order 3.
- Which row changes in \(R_3\to R_3+\tfrac14R_2\), and which row remains unchanged?
- Explain why \(R_1\to 0R_1\) is not one of the three permitted elementary row operations.