Skip to main content

Section 1.2 Elementary Row Operations

In this section, we shall defined elementary row operations which is a backbone of all computations in linear algebra.

Subsection 1.2.1 Elmentary Row Operations

The solution of a system of linear equations is unchanged if the following operations are performed. In fact this is the basis for solving a system of linear equations.
  1. Multiply one of the equations by a nonzero real number. This is equivalent to multiplying one of the rows of the augmented matrix of the system by a non-zero real number.
  2. Multiply one of the equations by a real number and add the result to another equation, leaving the original equation unchanged. This is equivalent to multiplying one of the rows of the augmented matrix of the system by a real number and adding it to another row, leaving the original row unchanged.
  3. Interchanging two equations. This is equivalent to interchanging two rows of the augmented matrix of the system.
  4. Bring the equations which are equivalent to \(0 =0\) to the bottom row. This is equivalent to moving the zero rows (rows with zero entries) of the augmented matrix to the bottom.

Note 1.2.1.

If an equation of the system after the avove operations reduces to \(0 = \alpha\text{,}\) where \(\alpha \neq 0\text{,}\) then the system has no solution. This is equivalent to if a row of the augmented matrix is composed of zeros except for the last column, then the system has no solution.

Definition 1.2.2. Elementary row operations.

The following operations on a matrix are called elementary row operations.
  1. Interchange of two rows of a matrix;
  2. Multiplication of one row by a non-zero scalar \(\lambda\text{;}\)
  3. Adding any two rows.
In practice, most often, we combine second and third operations. This is equivalent to multiplying one of the rows by a nonzero real number and adding to another row.

Definition 1.2.3.

A matrix \(B\) is said to be equivalent or row equivalent to matrix \(A\text{,}\) in notation \(B\thicksim A\) , if \(B\) can be obtained from \(A\) by performing finite number of elementary row operations.
Row operations on a matrix can be obtained by matrix multiplication. Before we see this, let us look at the following observations.

Observation 1.2.4.

Let \(A\) be an \(n\times n\) matrix of real numbers. Let the columns of \(A\) are \(a_1,a_2,\ldots a_n\text{,}\) that is, \(A=\begin{bmatrix} a_1\amp a_2\amp\cdots \amp a_n\end{bmatrix}\text{.}\) Let the rows of \(A\) are given by \(R_1, R_2,\ldots, R_n\text{,}\) in particular, \(A=\begin{bmatrix} R_1\amp R_2\amp\cdots \amp R_n\end{bmatrix}^T\text{.}\) Let \(e_1, e_2, \ldots, e_n\) be standard coordinate vectors in \(\mathbb{R}^n\) , where \(e_i\) is the column matrix (vector) whose \(i\)-th entry is 1 and rest are zero. That is \(e_i=\begin{pmatrix} 0\\\vdots\\ 1\\\vdots \\0\end{pmatrix}\text{.}\) Then we have the following:
  1. \(a_j=Ae_j\) for each \(j=1,\ldots, n\text{.}\) That is, \(j\)-th column can be obtained by multiplying \(A\) by \(e_j\) on the right.
  2. \(R_i=e_i^TA\) for each \(i=1,\ldots, n\text{.}\) That is, \(i\)-th row can be obtained by multiplying \(A\) by \(e_i^T\) on the left.
  3. \(a_{ij}=e_i^TAe_j\) for \(1\leq i, j\leq n\text{.}\)
  4. Suppse \(B\) is a matrix such that \(AB\) exist. Also assume that columns of \(B\) are \(b_1,\ldots, b_n\text{.}\) In particular, that is, \(B=\begin{bmatrix} b_1\amp b_2\amp\cdots \amp b_n\end{bmatrix}\text{.}\) Then
    \begin{equation*} AB = \begin{bmatrix} Ab_1\amp Ab_2\amp\cdots \amp Ab_n\end{bmatrix}. \end{equation*}
    Similarly, we have
    \begin{equation*} AB = \begin{bmatrix} R_1B\\ R_2B\\\vdots \\ R_nB\end{bmatrix}. \end{equation*}
Now we verify the item 4 of ObservationΒ 1.2.4

Definition 1.2.5.

Let \(e\) denote an elementary row operation and \(e(A)\) the result of applying \(e\) to a \(A\text{.}\) Let \(E\) be a matrix obtained by applying \(e\) to the identity matrix. That is, \(E=e(I)\text{.}\) Then \(E\) is called the elementary matrix corresponding to the elementary row operation \(e\text{.}\) It is easy to see that an elementary matrix is non singular. (why?)

Proof.

Example 1.2.7.

  1. Let \(A=[a_{ij}]\) be a rectangular matrix of order \(3\times 4\text{.}\) Let \(A_1\) be a matrix obtained by interchanging 2nd and 3rd rows of \(A\text{.}\) Then \(A_1=EA\) where \(E=\begin{pmatrix}1 \amp 0 \amp 0\\0 \amp 0 \amp 1\\0 \amp 1 \amp 0\end{pmatrix}\text{.}\)
    What is \(E^{-1}\text{?}\)
  2. Let \(A_2\) be the matrix obtained by multiplying 2nd row of \(A\) by a scalar \(\alpha\text{.}\) Then \(A_2=EA\text{,}\) where \(E=\begin{pmatrix}1\amp 0 \amp 0\\0 \amp \alpha \amp 0\\0 \amp 0 \amp 1\end{pmatrix}\text{.}\) What is \(E^{-1}\text{?}\)
  3. Let \(A_3\) be the matrix obtained by adding 2 times the 2nd row to the 3rd rows of \(A\) in place of the 3rd row. Then \(A_3=EA\text{,}\) where \(E=\begin{pmatrix}1 \amp 0 \amp 0\\0 \amp 1 \amp 0\\0 \amp 2 \amp 1\end{pmatrix}\text{.}\) What is \(E^{-1}\text{?}\) It is easy to see that \(E^{-1}=\begin{pmatrix}1 \amp 0 \amp 0\\0 \amp 1 \amp 0\\0 \amp -2 \amp 1\end{pmatrix}\) whihc is obtained by adding -2 times the 2nd row to the 3rd rows of \(A\text{.}\)
The above examples suggest the following result.

Proof.

Suppose \(E\) is an elementary matrix obtained by interchanging \(i\)-th and \(j\)-th rows of the identity matrix. Let us denote it by \(E_{i \leftrightarrow j}\text{.}\) It is easy to see that \(E_{i \leftrightarrow j}E_{i \leftrightarrow j}=I\text{.}\) Hence \(E_{i \leftrightarrow j}\) is invertible with \(E_{i \leftrightarrow j}^{-1}=E_{i \leftrightarrow j}\text{.}\)
Suppose \(E\) is an elementary matrix obtained by multiplying the \(i\)-th row by a non zero scalar \(\alpha\) denoted by \(E_{i \leftarrow \alpha i} \text{.}\) Then
\begin{equation*} E_{i \leftarrow \alpha i}E_{i \leftarrow \frac{1}{\alpha} i}=I. \end{equation*}
Hence \(E_{i \leftarrow \alpha i}^{-1} =E_{i \leftarrow \frac{1}{\alpha} i}\text{.}\)
Suppose \(E\) is an elementary matrix obtained by adding the \(j\)th row of the identity matrix to the \(i\)-th row. Let us denote it by \(E_{i\leftarrow i+j}\text{.}\) Then
\begin{equation*} E_{i\leftarrow i+j} E_{i\leftarrow i-j}=I. \end{equation*}
Hence \(E_{i\leftarrow i+j}^{-1}= E_{i\leftarrow i-j}\text{.}\)
Since any elementary matrix is obtained by a sequence of elemetary matrix, it is a product of intertible matrices and hence invertible.

Proof.

Since \(B\) is row equivalent to \(A\text{,}\) there exists \(k\) elementary row matrices \(E_1, \ldots, E_k\) such that write \(B=E_k\cdot E_{k-1}\cdots E_1A\text{.}\) Define \(P=E_k\cdot E_{k-1}\cdots E_1\text{,}\) which is a non singular.

Subsection 1.2.2 Matrix Inversion via Elementary Row Operations

We can use the theorem TheoremΒ 1.2.9 to find the inverse of a matrix using elementary row operations. If a matrix \(A\) is non singular and is row equivalent to the identity matrix \(I\) by a sequence of elementary row operations say \(E_1,\ldots, E_k\text{,}\) then we have, \(I= E_k\cdot E_{k-1}\cdots E_1A\text{.}\) This implies \(E_k\cdot E_{k-1}\cdots E_1 \times I =A^{-1}\text{.}\) In other words, the sequence of elementary row operations required to turn \(A\) into \(I\) also turns \(I\) into \(A^{-1}\) . Thus to find inverse of \(A\text{,}\) we adjoin \(I\) to \(A\) on the right to give the augmented matrix \([A~|~I]\text{,}\) and perform elementary row operations on \([A~|~I]\) that successively reduces \(A\) to the identity matrix and then extract \(A^{-1}\) from the right half of the transformed augmented matrix.

Example 1.2.10.

Find the inverse of \(A=\begin{pmatrix}1 \amp 0 \amp 2\\2 \amp -1 \amp 3\\4 \amp 1 \amp 8\end{pmatrix}\) using row operations.
Solution.
\begin{equation*} [A, I]= \begin{pmatrix}1\amp 0\amp 2\amp |\amp 1\amp 0\amp 0\\2\amp -1\amp 3\amp |\amp 0\amp 1\amp 0\\4\amp 1\amp 8\amp |\amp 0\amp 0\amp 1\end{pmatrix} \end{equation*}
\begin{equation*} \xrightarrow{ \begin{array}{c} R_2\to R_2-2R_1 \\ R_3\to R_3-4R_1 \end{array}} \begin{pmatrix}1\amp 0\amp 2\amp |\amp 1\amp 0\amp 0\\0\amp -1\amp -1\amp |\amp -2\amp 1\amp 0\\0\amp 1\amp 0\amp |\amp -4\amp -0\amp 1\end{pmatrix} \end{equation*}
\begin{equation*} \xrightarrow{ \begin{array}{c} R_2\to (-1)R_2 \\R_3\to R_3-R_2 \\ \end{array}} \begin{pmatrix}1\amp 0\amp 2\amp |\amp 1\amp 0\amp 0\\0\amp 1\amp 1\amp |\amp 2\amp -11\amp 0\\0\amp 0\amp -1\amp |\amp -6\amp 1\amp 1\end{pmatrix} \end{equation*}
\begin{equation*} \xrightarrow{\begin{array}{c} R_3\to (-1)R_3\end{array}} \begin{pmatrix}1\amp 0\amp 2\amp |\amp 1\amp 0\amp 0\\0\amp 1\amp 1\amp |\amp 2\amp -11\amp 0\\0\amp 0\amp 1\amp |\amp 6\amp -11\amp -11\end{pmatrix} \end{equation*}
\begin{equation*} \xrightarrow{ \begin{array}{c} R_2\to R_2-R_3 \\R_1\to R_1-2R_3\end{array}} \begin{pmatrix}1\amp 0\amp 1\amp |\amp -11\amp 2\amp 2\\0\amp 1\amp 0\amp |\amp -4\amp 0\amp 1\\0\amp 0\amp 1\amp |\amp 6\amp -1\amp -1\end{pmatrix} \end{equation*}
Hence
\begin{equation*} A^{-1}=\begin{pmatrix}-11 \amp 2 \amp 2\\-4 \amp 0 \amp 1\\6 \amp -1 \amp -1 \end{pmatrix} \end{equation*}
Let us solve the abobe problem step by step in Sage. Sage has inbuilt functions to do elementary row operations.
Sage can directly find the inverse of a matrix.

Activity 1.2.1. Sage Exercise.

Use the Sage to find the inverse of the following matrix using the step by step elementary row operation. \(\begin{pmatrix}2\amp 1\amp 1\amp 1\\1\amp 0\amp 1\amp 1\\1\amp 1\amp -2\amp 1\\1\amp 1\amp 1\amp -1\end{pmatrix}\)