In high school, we have seen many system of linear equations with a unique solution, and we know how to solve it. Here we are going to learn how to obtain all solutions of a system of linear equation when its solution is not unique.
Consider the system of linear equations
Step 1: Transform the system into the augmented matrix
We may record the coefficients on the left into a matrix and the constants on the right into a vector . By setting
we know the system of linear equations is equivalent to , and we may represent this system by the augmented matrix
Step 2: Make it into an echelon form
By running Gaussian elimination, which is a sequence of row operations, we may obtain
This stair-like structure is called an echelon form . The term echelon is a way to arrange the troops in military; see the pictures in Wikipedia: Echelon formation to get a better sense of this name.
Note that, if preferred, one may run Gaussian elimination further to get the reduced echelon form
Step 3: Recognize the leading variables and the free variables
The echelon form we used above is equivalent to
The first (left-most) variable with nonzero coefficient on each equation is called a leading variable . In this case, we have three leading variables , , and . Any variable that is not a leading variable is called a free variable . In this case, and are the free variables.
Note that given any numbers for the free variables, the leading variables are uniquely determined, as we will see in the next two steps.
Step 4: Find a special solution
For example, we may assign and . Thus, we solve, from right to left, that , , and . Recording these numbers as a vector
we call it as a special solution of the , which means it is one of the solution.
Step 5: Find the homogeneous solutions
In fact, we may assign and to get all solutions. Thus, we have
Note that is usually not a solution of ; instead, it is a solution of . This is not suprising after a second thought. By assigning and , we get the solution , so . By assigning and , we get the solution , so . Combining these two facts along with some algebra, it is straightforward to see
Indeed, is the unique solution of with and . Therefore, here is another way to obtain . First, consider the homogeneous equation . By running the Gaussian elimination, we know it is equivalent to
which are the same equations we have been using except that the constants on the right are replaced by zeros. By solving this homogeneous system with and , we see again that
In a similar way, one may obtain without calculating all the parametrization. (Give it a try!)
Now, the set
is the solution set of . It is also called the homogeneous solution of , since we have to replace by . On the other hand, the set
is the solution set of . It is also called the general solution of , in contrast to a special solution.
As a summary, the general solution is equal to a special solution plus the homogeneous solution.
This note can be found at Course website > Learning resources.