Understanding your system's solution
A linear system falls into exactly one of three categories, determined by how the equations' lines (or planes) relate geometrically.
| Case | Geometric meaning (2×2) | Number of solutions |
|---|---|---|
| Independent, consistent | Two lines intersect at exactly one point | Exactly one unique solution |
| Dependent | The two equations describe the same line | Infinitely many solutions |
| Inconsistent | The two lines are parallel and never meet | No solution |
- This calculator reports both the dependent and the inconsistent case as 'No unique solution' because Gaussian elimination alone cannot distinguish them without further row-reduction of the augmented matrix; both are equally valid outcomes when the coefficient matrix is singular.
- Numerical results are rounded to 6 decimal places. For systems with coefficients that are exact integers or simple fractions, small non-zero decimals in the output (e.g. 1.999999 instead of 2) reflect standard floating-point rounding and can be treated as the nearby exact value.
- Partial pivoting is used to reduce numerical error, but systems that are 'nearly singular' (a determinant very close to zero) can still produce results sensitive to small input changes — a property known as ill-conditioning in numerical linear algebra.
What is a system of linear equations?
A system of linear equations is a collection of two or more linear equations that share the same set of variables. A solution to the system is a set of values — one for each variable — that makes every equation in the system true at the same time. Geometrically, a 2-variable linear equation is a straight line, and solving a 2×2 system means finding where two lines intersect. A 3-variable linear equation is a plane in three-dimensional space, and a 3×3 system finds the point where three planes meet.
This calculator represents each equation as a row of an augmented matrix: the coefficients of each variable followed by the constant on the right-hand side of the equals sign. For a 2×2 system, six numbers are entered in row-major order — a₁, b₁, c₁, a₂, b₂, c₂ — representing a₁x + b₁y = c₁ and a₂x + b₂y = c₂. A 3×3 system follows the same pattern with twelve numbers across three rows of four coefficients each.
The solver uses Gaussian elimination with partial pivoting, a standard numerical linear algebra method that systematically eliminates variables row by row to reduce the augmented matrix to a form from which each unknown can be read off directly. Partial pivoting — selecting the row with the largest absolute coefficient in each column before eliminating — improves numerical stability compared with naive elimination.
How to use this system of equations calculator
- Choose the number of unknowns: 2 for a two-equation, two-variable system (x, y), or 3 for a three-equation, three-variable system (x, y, z).
- Enter the coefficients as a comma-separated list in row-major order. For a 2×2 system, enter a₁, b₁, c₁, a₂, b₂, c₂ for the equations a₁x + b₁y = c₁ and a₂x + b₂y = c₂ — six numbers total.
- For a 3×3 system, enter twelve numbers: a₁, b₁, c₁, d₁, a₂, b₂, c₂, d₂, a₃, b₃, c₃, d₃ for a₁x + b₁y + c₁z = d₁ and the two following equations.
- Read the solved values of x, y (and z for a 3×3 system). If the system is singular — the equations are dependent or contradictory — the calculator reports 'No unique solution' instead of numeric values.
The formula behind Gaussian elimination
Gaussian elimination transforms the augmented matrix [A | b] into an equivalent, easier-to-solve form by applying row operations that do not change the solution set: swapping rows, scaling a row by a nonzero constant, and adding a multiple of one row to another. This calculator performs elimination to reduced form and reads the solution directly from the resulting diagonal matrix, using partial pivoting (choosing the largest available pivot in each column) to reduce floating-point rounding error.
Worked example (2×2): solve 2x + y = 5 and x − y = 1. Adding the two equations eliminates y: 3x = 6, so x = 2. Substituting into the second equation: 2 − y = 1, so y = 1. Verification: 2(2) + 1 = 5 ✓ and 2 − 1 = 1 ✓.
A system is singular — has no unique solution — when its coefficient matrix has a zero determinant, equivalently when Gaussian elimination produces a pivot column with only (numerically) zero entries. A singular system is either inconsistent (the equations contradict each other, e.g. x + y = 2 and x + y = 5, giving no solution) or dependent (one equation is a multiple of another, e.g. x + y = 2 and 2x + 2y = 4, giving infinitely many solutions). Determining which of the two applies requires inspecting the equations directly; this calculator reports both cases as 'no unique solution'.
Common mistakes
- Entering coefficients out of row-major order — the calculator expects each equation's coefficients followed by its constant, row by row, not column by column.
- Forgetting that a 3×3 system needs twelve numbers (four per row), not nine — the constant term on the right-hand side of each equation must be included.
- Assuming 'no unique solution' always means no solution exists — it can equally mean infinitely many solutions exist (a dependent system); the two cases require checking the original equations by hand to distinguish.
- Mixing up which side of the equation a constant belongs on — all variable terms must be moved to the left-hand side and the equation written in the form a₁x + b₁y (+ c₁z) = constant before entering coefficients.
- Expecting exact fractions in the output — results are decimal approximations rounded to six places, so a true solution of 1/3 displays as 0.333333.
Frequently asked questions
How do you solve a system of two linear equations?
One common method is elimination: add or subtract multiples of the equations to cancel one variable, solve for the remaining variable, then substitute back. For 2x + y = 5 and x − y = 1, adding the equations eliminates y, giving 3x = 6, so x = 2; substituting gives y = 1. This calculator automates the equivalent process — Gaussian elimination — for both 2×2 and 3×3 systems.
What does it mean when a system has no unique solution?
It means the equations do not intersect at exactly one point. This happens in two distinct ways: the equations may be inconsistent (contradictory, like x + y = 2 and x + y = 5), giving no solution at all, or dependent (one equation is a scaled copy of another, like x + y = 2 and 2x + 2y = 4), giving infinitely many solutions. Both cases correspond to a coefficient matrix with a zero determinant.
How many equations are needed to solve for 3 unknowns?
In general, a system needs at least as many independent equations as unknowns to have a unique solution — three independent equations for three unknowns (x, y, z). Fewer independent equations leave at least one degree of freedom, producing infinitely many solutions rather than a single unique one.
What is Gaussian elimination?
Gaussian elimination is a systematic method for solving linear systems by using row operations — swapping rows, scaling a row, and adding a multiple of one row to another — to transform the augmented matrix into a simpler triangular or diagonal form from which the solution can be read directly. It is the standard method taught in linear algebra and used internally by most numerical equation solvers, including this calculator.
Can this calculator solve nonlinear systems, like equations with x²?
No. This calculator solves only linear systems, where every variable appears to the first power with no products between variables (no x², no xy terms). Nonlinear systems require different methods, such as substitution combined with the quadratic formula, or numerical root-finding techniques.
Why does the calculator show decimals instead of exact fractions?
The solver performs floating-point (decimal) Gaussian elimination, which is the standard approach for numerical linear algebra, rather than symbolic fraction arithmetic. A true solution of 1/3 will display as 0.333333 (rounded to six decimal places). For systems with clean integer coefficients, the decimal output typically resolves to an exact or near-exact whole number.
References
- Strang G. Linear Algebra and Its Applications. 4th ed. Cengage Learning, 2006. (Gaussian elimination and matrix rank.)
- Lay DC, Lay SR, McDonald JJ. Linear Algebra and Its Applications. 5th ed. Pearson, 2015.
- Burden RL, Faires JD. Numerical Analysis. 9th ed. Cengage Learning, 2011. (Partial pivoting and numerical stability.)