System of Linear Equations, Row Echelon Form
Two Equations and Two Unknowns
This is a general system of equations with 2 equations and 2 unknowns
this is the augmented matrix:
We want to solve for the unknown and . In matlab, we just use the linsolve function, and in practice we do not solve these by hand. But how is linsolve solving this? Elementary Row Operations
There are three things we can do to rows of the augmented matrix that do not change the solution to the linear system, they are called elementary row operations, and are very intuitive:
- Switch two rows in the matrix: we can move a row up or down, the system is still the same
- Replace an existing row by the sum of the row and a multiple of another row:
- Multiply all column values of a row by the same non-zero constant:
Using rule 3, we can multiple a row from an augmented matrix by Z
Using rule 2, we can add up Z times a row from an augmented matrix and Y times another row:
Row Echelon Form
After using elementary row operations to create as many zeros as possible in the lower left side of the matrix, we end up with a matrix that is equivalent to the original matrix that is in the Row Echelon Form, more formally:
- Leading Zero: A row of a matrix is said to have, k leading zero, if the first k elements of the row are all zeros and the subsequent elements of the row are not zero. (SB P131)
- Row Echelon Form: a matrix is in row echelon form if each row has more leading than row preceding (above) it. (SB P131)
- Pivot: the first non-zero element in each row of a matrix that is in row echelon form is called a pivot
Row Echelon Form with 2 Equations and 2 Unknowns
Let's study our system with just 2 equations and 2 unkowns. We can arrive at the row-echelon form in two steps:
Starting with: : - Multiply second row by :
- Subtract the first row from the second row:
We now have the row-echelon form, because we have as many zeros as possible in the lower left side
Reduced Row Echelon Form
We can simplify the matrix more and get to the reduced row echelon form.
- A row echelon matrix in which each pivot is a 1 and in which each column containing a pivot contains no other non-zero entries a is said to be in reduced row echelon form. (SB P133)
When we are solving a system of N equations with N unknowns, the reduced row echelon form gives the solution for the unknowns. With 2 dimensions, the solution is the intersection of 2 lines, and with 3 dimension, the solution is the point intersection of 3 surfaces.
Reduced Row Echelon Form with 2 Equations and 2 Unknowns
Starting with the row echelon form: : - Divide second row by : , which simplifies to:
- Subtract from first row b times second row :
- Divide the first row by a:
Now we have the reduced row echelon form, which tells us that:
and