Free Online Linear Equation Solver
Solve two or three simultaneous linear equations.
Enter the coefficients of each equation in the form ax + by + cz = d. Empty cells are treated as zero.
Step-by-step working
- Enter the coefficients to see the elimination steps.
About the Linear Equation Solver
A system of linear equations asks for values that satisfy several equations at once. Two equations with two unknowns describe two lines, and the solution is the point where they cross. Three equations with three unknowns describe three planes, and the solution is their common intersection. This solver accepts a 2×2 or 3×3 system, applies Gaussian elimination with partial pivoting, and reports the unknowns, the determinant and whether the system is unique, inconsistent or underdetermined.
How Gaussian elimination works
The equations are written as an augmented matrix: the coefficients on the left and the constants on the right. The calculator chooses the largest available pivot in each column to reduce rounding error, swaps rows when needed, and eliminates the entries below the pivot. The result is an upper-triangular system that is easy to solve from the bottom up. The final back-substitution stage substitutes known values into the rows above, producing x, y and z one at a time. Each row operation is listed so you can follow the transformation.
Reading the determinant and system type
The determinant of the coefficient matrix measures whether the equations are independent. A nonzero determinant means the system has exactly one solution. A zero determinant means the rows are linearly dependent: the equations may be inconsistent, with no solution at all, or they may describe the same constraint, giving infinitely many solutions. The solver distinguishes these cases by checking whether an eliminated row becomes 0 = 0 (infinite) or 0 = a nonzero constant (no solution).
Pivoting and numerical stability
Partial pivoting swaps the current row with a lower row that has the largest absolute value in the pivot column. This avoids dividing by a tiny number, which can amplify floating-point error. For textbook systems with small integers the difference is invisible, but for engineering data with values of very different magnitudes it matters. The determinant sign changes with each row swap, and the solver accounts for that when reporting the determinant of the original coefficient matrix.
Practical uses and limits
Linear systems appear in circuit analysis, mixture problems, budget allocation, supply planning, geometry and regression. The solver assumes the equations are linear and the coefficients are ordinary real numbers. It does not handle inequalities, nonlinear terms, complex coefficients or systems larger than three unknowns. Decimals are accepted, and empty cells are treated as zero, which is convenient when a variable is missing from an equation. Results are rounded for display, so verify critically ill-conditioned systems with exact arithmetic.
Frequently asked questions
What does an infinite number of solutions mean?
It means at least one equation is a multiple or combination of the others, so it adds no new constraint. The variables satisfy a family of values rather than one point. This solver reports the condition but does not parameterize the full solution set.
Why is my determinant zero but the system still has solutions?
A zero determinant only rules out a unique solution. The equations may be consistent and dependent, producing infinitely many solutions. The system-type card checks the eliminated rows to tell the difference.
Can I enter fractions?
Enter the decimal equivalent, such as 0.25 for one quarter. The solver uses floating-point arithmetic, so exact fractions are not preserved in the display.