7.1. Gaussian elimination for Linear Systems of Equations#
Definition: System of linear equations
A system of equations is a collection of equations. For example, the following \(m\) equations form a system of (linear) equations.
In terms of summation notation, the above linear equation can be written as
Definition: Consistent and inconsistent linear systems
A system of equations is called inconsistent when there is no solution for this system of equations, and it is called consistent when there is at least one solution for it.
We start this section with an example. Consider the following system
This system of linear equations has three equations and four variables. We can express this in the form of a matrix (an array of numbers) as follows
This matrix is called the augmented matrix of the system.
Definition: Augmented Matrix of a Linear System
For the following system of equations \begin{align} \begin{cases} a_{11}x_1+\ldots+a_{1n}x_{n}=b_1\ a_{21}x_1+\ldots+a_{2n}x_{n}=b_2\ \vdots \ a_{m1}x_1+\ldots+a_{mn}x_{n}=b_m, \end{cases} \end{align*} the augmented matrix can be expressed as follows \begin{align} \left[\begin{array}{cccc|c} a_{11} & a_{12} & \dots & a_{1n} & b_{1} \ a_{21} & a_{22} & \dots & a_{2n} & b_{2} \ \vdots & \vdots & \ddots & \vdots & \vdots \ a_{m1} & a_{m2} & \dots & a_{mn} & b_{m}\ \end{array}\right] \end{align*}
Example: Express the following linear system in the augmented matrix form.
Solution: We have,
Definition: Elementary Operations
The following operations, called elementary operations, can routinely be performed on systems of linear equations to produce equivalent systems.
Interchange two equations.
Multiply one equation by a nonzero number.
Add a multiple of one equation to a different equation.
In hand calculations (and in computer programs) we manipulate the rows of the augmented matrix rather than the equations.
Definition: Elementary row operations
Elementary row operations on a matrix:
Interchange two rows.
Multiply one row by a nonzero number.
Add a multiple of one row to a different row.
Note that in the previous example,
Definition: Equivalent Matrices
The matrix \(B\) is equivalent to the matrix \(A\) if \(B\) can be produced by a sequence of elementary row operations starting with \(A\).
For a matrix \(A\),
Step 1. If the matrix \(A\) only consists entirely of zeros, stop. It is already in REF.
Step 2. Otherwise, identify the first column from the left comprising a nonzero entry (let’s call this entry \(a\)) and move the row containing that entry to the top position.
Step 3. Now multiply the new top row by \(1/a\) to produce a leading 1.
Step 4. By subtracting multiples of that row from rows underneath it, make each entry below the leading 1 zero. This completes the first row, and all additional row operations are conducted on the rest of the rows.
Step 5. Repeat steps 1 – 4 on the matrix composed of the remaining rows. The process is carried out iteratively until either no rows remain at step 5 or the remaining rows consist entirely of zeros.
Definition: Back-Substitution
Back-substitution is a process of solving a linear system of equations using its REF or RREF. In this process, the last equation is solved first, then the second last equation is solved next, etc.
Example: Solve the following linear system using back-substitution.
Solution: The corresponding augmented matrix is
Use the first row to make the first entry of the second row and third row zero. That is
and
Multiply the second row by -1/11 to create a leading 1. We have
By subtracting 5 times of the second row from the third row, make entry below the leading 1 zero.
Finally, we can multiply the last row by 1/4 to create a leading 1. That is
This REF augmented matrix is equivalent to the following linear system:
Therefore, \(x_{1}=-1\), \(x_{2}=0\) and \(x_{3}=1\).
Theorem: Gaussian elimination
For a square matrix \(A\), there exists at least one non-singular matrix \(M\) such that
where \(U\) is an upper triangular matrix.
First, assume that \(A\) is a given \(n\times n\) square matrix as follows with none of the entries on its main diagonal is zero. Then, let \(\tilde{A}^{(1)}\) be the augmented matrix defined as follows,
Observe that the above matrix is a \(n \times (n+1)\) matrix. \newpage Assume that \(a_{ij}^{(k)}\), for \(2\leq k \leq n\), denotes the \(ij\)-th entry of matrix \(\tilde{A}^{(k)}\) which is defined using entries of matrix \(\tilde{A}^{(k-1)}\) as follows,
and
Here, \(\tilde{A}^{(k)}\) denotes the equivalent linear system for which the variable \(x_{k-1}\) has just been removed from equations \(E_{k}\), \(E_{k+1}\), \ldots , \(E_{n}\).
Observe that if any of \(a_{11}^{(1)}\), \(a_{22}^{(2)}\), \ldots, \(a_{n-a}^{(n-1,n-1)}\) is zero, the above process fails. For this reason, we use \textbf{pivot element}.
Example: Represent the linear system
as an augmented matrix and use Gaussian Elimination to find its solution.
Solution: The corresponding augmented matrix is
Performing the following operations,
Thus,
Also, we have perform the following operation \(E_{3} -\dfrac{5}{11}E_{2} \rightarrow E_{3}\),
Now, we have,