Section 1.1 Elementary Row Operations
In this section, we shall defined elementary row operations which is a backbone of all computations in linear algebra.
Subsection 1.1.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.
- 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.
- 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.
- Interchanging two equations. This is equivalent to interchanging two rows of the augmented matrix of the system.
- 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.
Definition 1.1.2. Elementary row operations.
The following operations on a matrix are called elementary row operations.
- interchange of two rows of a matrix;
- multiplication of one row by a non-zero scalar \(\lambda\text{;}\)
- adding a scalar \(\lambda\) times a row to another row.
Definition 1.1.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.1.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\) are 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:
- \(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.
- \(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.
- \(a_{ij}=e_i^TAe_j\) for \(1\leq i, j\leq n\text{.}\)
Definition 1.1.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?)
Theorem 1.1.6. Elementary Matrix Theorem.
Let \(e\) be an elementary row operation and \(E\text{,}\) the corresponding \(m\times m\) elementary matrix defined by \(E = e(I_m)\text{.}\) Then, for any \(m\times n\) matrix \(A\text{,}\) \(e(A) = E\cdot A\text{.}\)
Checkpoint 1.1.7.
If \(E\) is an elemtray matrix (except multiplying identity matrix by zero), then it is invertible. Can you see it why?
Example 1.1.8.
-
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{?}\)
- Let \(A_2\) be the matrix obtained by multiplying 2nd row of \(A\) by a scalar \(\alpha\text{.}\) Then \(A_2=EA\) 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{?}\)
- Let \(A_3\) be the matrix obtained by adding 2 times 2nd row to the 3rd rows of \(A\) in place of the 3rd row. Then \(A_3=EA\) 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{?}\)
Theorem 1.1.9.
Two matrices \(A\) and \(B\) are row equivalent if and only if there exists a non singular matrix \(P\) such that \(B=PA\text{.}\)
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.1.2 Matrix Inversion via Elementary Row Operations
We can use the theorem Theorem 1.1.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.1.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.
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}\)