Solving systems of linear equations is a common problem encountered in many disciplines. Solving such problems is so important that the techniques for solving them (substitution, elimination) are learned early on in algebra studies. This wiki will elaborate on the elementary technique of elimination and explore a few more techniques that can be obtained from linear algebra.
A system of equations can be represented in a couple of different matrix forms. One way is to realize the system as the matrix multiplication of the coefficients in the system and the column vector of its variables. The square matrix is called the coefficient matrix because it consists of the coefficients of the variables in the system of equations:
An alternate representation called an augmented matrix is created by stitching the columns of matrices together and divided by a vertical bar. The coefficient matrix is placed on the left of this vertical bar, while the constants on the right-hand side of each equation are placed on the right of the vertical bar:
The matrices that represent these systems can be manipulated in such a way as to provide easy to read solutions. This manipulation is called row reduction. Row reduction techniques transform the matrix into reduced row echelon form without changing the solutions to the system.
The reduced row echelon form of a matrix denoted is a matrix equal dimensions that satisfies:
- The leftmost non-zero element in each row is . This element is known as a pivot.
- Any column can have at most pivot. If a column has a pivot, then the rest of the elements in the column will be .
- For any two columns and that have pivots in rows and respectively, if pivot in is to the left of pivot in , then is above . In other words, for any two pivots and , if is to the right of , then is below .
- Rows that consist of only zeroes are in the bottom of the matrix.
To convert any matrix to its reduced row echelon form, Gauss-Jordan elimination is performed. There are three elementary row operations used to achieve reduced row echelon form:
- Switch two rows.
- Multiply a row by any non-zero constant.
- Add a scalar multiple of one row to any other row.
Find using Gauss-Jordan elimination, where
The leftmost element in the first row must be 1, so the first row is divided by 2:
The top left element is a pivot, so the rest of the elements in the first column must be 0. This can be done by subtracting the first row from the second row. Furthermore, the first row can be added to the third row to obtain the necessary 0s in the first column:
Now that the leftmost column is , the middle element can be made 1 by dividing the second row by 3:
The top and bottom elements in the second column can be made 0 with the appropriate row operations:
With the middle column now , the method proceeds to the third column by dividing the third row by 15:
In the final step of the process, multiples of the third row are added to the first and second rows so that the last column becomes
The following steps can be used to obtain the solutions to a system of linear equations:
- Convert the given equations to an augmented matrix.
- Perform row operations to get the reduced row echelon form of the matrix.
- Convert to augmented matrix back to a set of equations.
Once in this form, the possible solutions to a system of linear equations that the augmented matrix represents can be determined by three cases.
Case 1. If is the identity matrix, then the system has a unique solution.
When read row by row, this augmented matrix says and
Case 2. If contains a row of zeroes followed by a zero augmented value, then the system has infinitely many solutions.
Consider the following augmented matrix in reduced row echelon form. The last row reads or which is not a contradiction. The other rows read and This determines a value for but there are infinitely many pairs of real numbers and such that so this system has an infinite number of solutions:
Case 3. If contains a row of zeroes followed by a nonzero augmented value, then the system has no solution.
This case is similar to the first in that the bottom row contains mostly 0s. However, observe that the last row of the matrix reads , which reads as This is a contradiction; thus the system has no solutions:
Find the values of and satisfying the following system of equations:
For this example, row reduction techniques will be favored over standard elimination. The given system of equations can be written as the following augmented matrix:
Gauss-Jordan elimination is performed to produce the reduced row echelon form of the matrix:
The first row of this reduced form reads and the second row reads .
Note that this process is essentially the same as standard elimination. The main advantage of this procedure is the brevity of notation not having to write variable names such as and repetitively and ease of keeping track of steps taken.
As seen before, a system of equations can be represented by the matrix multiplication From here, the solution represented by the column matrix can be obtained by left multiplying both sides of the equation by the inverse of the coefficient matrix :
One pitfall of this method arises when Because the determinant of is 0, it cannot have an inverse, meaning this method will fail. In fact, is equivalent to containing a row of zeroes. As such, the system of equations that represents will not have a unique solution. However, the system could have infinitely many solutions or no solution and a different method will be needed to discover it.
Cramer's rule is a formula that uses determinants to provide a solution to a system of linear equations. The statement of the rule below uses only three variables, but the rule can be applied to a system of any size.
Consider a system of equations of three variables:
The solution to this system is given by
where is the coefficient matrix and each is with the column replaced with
- If and if any one of , or is not equal to , then the system has no solution.
- If and , and all equal 0, then a solution may or may not exist. If a solution does exist, then the system of equations will have infinitely many solutions.
- The computational complexity of this method increases on the order of so it is unwieldy after systems.
As previously stated, a system of equations can be represented as a product of matrices like
The determinant of the coefficient matrix is given by
If a column or row of a matrix is multiplied by a constant, then the value of its determinant is multiplied by that constant. So, in multiplying the first column by this equation becomes
At this point, it is worth pointing out that column reduction techniques can be used as though they were row reduction techniques while preserving the solution. So adding times the second column and times the third column to the first column yields
However, because and similarly for and the new first column is precisely That is,
By a similar construction,
According to Cramer's rule, the solution to the above system is