Hello it's a me again drifter1! Today we continue with Linear Algebra getting into how we solve Linear Systems using the Gauss Method. I will first give you some theory that we need and then get into how we apply the Gauss method. So, without further do, let's get straight into it!
A Linear System contains 2 or more Linear Equations that contain 1, 2, ... n variables. Each linear equation will contain some or all of those common variables that will be multiplied by some coefficients.
So, an Linear System looks like this:
Where:
We can create a matrix that contains all the coefficients. This matrix looks like this:
We can also create two column-vectors, where one contains only the variables and the other only the constants of the linear system. Those two will be called x and b and so our Linear System will now be a multiplication between A and x that gives us b!
This looks like this:
Another important matrix is called the Augmented matrix that contains matrix A and b, having b be added to the end of matrix A.
So, an Augmented matrix A/b looks like this:
This last matrix will help us in the Gaussian Elimination method!
Example:
Suppose we have a linear system like this one:
The matrix representation of the same system is:
You should be very careful when putting the coefficients in the A matrix, cause in your system the order may not be right. Each column needs to contain the coeffiecients of a specific variable and when we don't have one we will have to put 0!
A linear system can have 3 possible outcomes:
An combination of values for the n variables that verifies all the linear equations of the linear system at the same time is called a solution.
A homogeneous linear system is a special case where the b matrix is a zero-column matrix and has only 0. This special linear system has always a solution, the all-zero solution, and so can either have one unique solution that is the all-zero solution or has infinite solutions if we find another one that is different to the all-zero solution.
Such a linear system looks like this:
After talking about the matrix representation we can now start talking about how we can make changes to it. This can be done using some elementary operations that actually are simple operations between rows or columns.
We can do the following elementary operations:
The matrix that we get after doing elementary operations is called an elementary matrix and this matrix is equivalent to the matrix we started with. So, 2 matrixes are called equivalent when one is the result of elementary operations on the other matrix. Using those operations we can "simplify" our matrix.
In the Gaussian method we talk about row/column (reduced) echelon forms of a given matrix. We will get each of those types depending on if we did elementary operations on the rows or columns.
A matrix is an row echelon form when:
Such a matrix looks like this:
This means that we order the rows, having the rows with "more" non-zero coefficients be on top of the ones without. Zero-rows will be on the bottom of the matrix.
A matrix is in a form called row canonical form when:
Such a matrix looks like this:
You can see that the rules of the row echelon form are still true, but the coefficient of each row is '1' and is also the only nonzero coefficient of it's column. This second form is also unique for each linear system.
These exact form will lead us to how we solve a linear system using the Gauss Method.
The Gauss Method uses the Matrix Representation of A*x = b and starts doing elementary operations on the augmented A/b matrix until we end up with an canonical form!
So, the steps of the Gaussian method are:
The most essential step of the Gaussian method is how we get the canonical form. It's actually not so difficult, but you will have to follow some specific steps.
Steps:
You can stop after reaching step 4, cause this is the Gauss Method. If you continue getting into step 5 and get up to the canonical form the method will be called Gauss-Jordan. But, we mostly tend to simply call it Gauss!
In wikipedia there is a nice full-on example where you can see this steps in action.
And this is actually it and I hope you enjoyed it!
Next time we will get into how we solve a square system using determinants.
Bye!