The application General linear equations calculator let you find the solution of a system of linear equations.

In practice, several cases occur: system has 1. One solution, 2. Infinite solutions or 3. No solution.

Example:

3has solution *x* = 2, *y* = -2.

Popular calculators as CASIO fx-991/fx-570 can solve system of two or three equations: press [MODE] 5 EQN and then select 1 or 2. Enter 3 2 2 as the first equation and 1 1 0 into the second row then. When finished, get back by pressing [MODE] 1 COMP.

That happens if there are less equations than unknowns or if some equations from the set are dependent. The determinant of the matrix = 0. Example:

36

has infinite solutions and it can be shown that the determinant
of the left hand side (LHS) is 0. So not only *x* = 2, *y* = -2 is solution, also
*x* = 0, *y* = 1 is.

It might appear that the two above equations bound well the solution but a further observation tells us there is in fact only one equation (as the second one from the set is a multiple of the first one and thus is not helpful). Oftentimes this dependency is not that obvious.

In this case only an approximate solution—which fits best all the given equations—can be found. In most cases the least squares method is employed to achieve that. Example:

3has no solution. A solution could be determined from the first two equations but it
won't satisfy the last one. And so on. In real world it is common that the system is overdetmined
and the task is carried then to find the **best fit.** There are many definitions
what this best fit is. The most used criterion is that the solution is best fit if sum
of squares Σ(RHS - LHS)^{2} is at minimum (it is not the *utmost best*
fit around but *this* definition is easy to describe and solve). That
gives the best fit as *x* = 1.333, *y* = -1.111. If we substitute the best fit
back into the set of equations, then we get

0.222 = 0

3.702 = 3

So it is not a solution indeed but it is close to it. Σ(RHS - LHS)^{2} =
(0.221^{2} + 0.222^{2} + 0.702^{2} = 0.591). It is highly unlikely
you would find a better solution (with the sum Σ(RHS - LHS)^{2} smaller):
the above solution was carried analytically (not shown here though).

(c) 2016 Miroslav Stibor, back to the table of contents