The General Solution of a System of Linear Equations using Gaussian elimination
This online calculator solves a system of linear algebraic equations using the Gaussian elimination method. It produces the result whether you have a unique solution, an infinite number of solutions, or no solution. It also outputs the result in floating point and fraction format.
The site already has one calculator that solves SLAE (System of Linear Algebraic Equations) by the Gauss–Jordan elimination (aka Gaussian elimination) method - Gaussian elimination. It even shows the solution step by step.
However, it has some disadvantages that the new calculator from this article will solve:
- the previous calculator gives the solution in floating point format, while in many problem books the answer is usually given as a fraction.
- the previous calculator only determines the fact that there are an infinite number of solutions, but does not give a general solution.
- the previous calculator works only in the case when the number of equations is the same as the number of unknowns, and thus cannot solve underdetermined (the number of unknowns is greater than the number of equations) and overdetermined systems (the number of unknowns is less than the number of equations).
As for the second and third points, the universality of the Gauss–Jordan elimination method makes it suitable for a systems of linear equations with any number of equations and unknowns.
The description of the Gaussian elimination method itself can be viewed at the link above, and below the calculator we look at the different systems of linear equations: those with one solution, with an infinite number of solutions, with no solution, and underdetermined and overdetermined systems.
The calculator finds a unique solution if it exists, or a general solution if an infinite number of solutions exist. The default data below is the example of a system with an infinite number of solutions:
1. System of linear equations which has a unique solution
Example: the system of linear equations:
After bringing the matrix to a trapezoidal form by the Gauss method, we get:
Using back substitution we find the only solution:
The system is consistent and defined.
2. System of linear equations which has an infinite number of solutions
Example: the system of linear equations:
After bringing the matrix to a trapezoidal form by the Gauss method, we get:
As a result, we get the system:
The last two equations are true for any values of the variables:
so they can be discarded.
To find solutions for the remaining two equations, x1 and x2 should be expressed in terms of x3 and x4.
In this case, x3 and x4 themselves can take any values
The resulting system is underdetermined. Formulas:
for arbitrary x3 and x4 describe an infinite set of solutions to this system.
3. System of linear equations which has no solutions
Example: the system of linear equations:
After bringing the matrix to a trapezoidal form by the Gauss method, we get:
The resulting system is inconsistent, since the last equation:
cannot be satisfied by any values of the unknowns.
This system is inconsistent, that is, it has no solution.
4. Overdetermined system of linear equations (the number of unknowns is less than the number of equations)
Example: the system of linear equations:
After reducing the matrix to a trapezoidal form by the Gauss method, we obtain
As you can see, in this case, the "extra" equation can simply be discarded and the problem is reduced to cases 1 or 2. Also, as a result of transformations, you can get the same equations, the “extra” of which can also be discarded - and again, the problem is reduced to cases 1 or 2.
5. Underdetermined system of linear equations (the number of unknowns is greater than the number of equations)
Example: the system of linear equations:
After bringing the matrix to a trapezoidal form by the Gauss method, we get:
The resulting equivalent system has the form:
As you can see, there are no equations in it that give single values for x3 and x4, which is equivalent to the equations:
which can be discarded.
Thus, this case is reduced to case 2 with an infinite set of solutions, which are described by the following formulas:
Comentários