🧮 System of Equations Solver – Gaussian Elimination & Linear Algebra
A system of equations is a set of two or more equations sharing the same unknowns. Solving them together — finding values that satisfy every equation simultaneously — is one of the most fundamental problems in mathematics, engineering, and science. This tool automates that process for linear systems of up to 6 variables, giving you exact numeric answers, a complete row-operation log, and a classification of the solution type.
📐 What Is a Linear System?
A linear system contains only first-degree terms: no powers (x²), no products of variables (xy), and no transcendental functions (sin x). Every equation takes the form:
a₁x₁ + a₂x₂ + … + aₙxₙ = bwhere the aᵢ are coefficients (real numbers you supply) and b is the constant on the right-hand side. Written as a matrix equation: Ax = b, where A is the coefficient matrix, x is the unknown vector, and b is the constants vector.
✍️ How to Enter Equations
Type each equation using the variable names you defined (default: x, y, z). Coefficients immediately precede the variable with no space:
2x + y - z = 8
-3x - y + 2z = -11
-2x + y + 2z = -3Accepted coefficient formats include:
2x— integer coefficient-3.5y— negative decimal coefficientx— coefficient of 1 (omitted)-z— coefficient of −1
X and x are treated as different variables.🔢 The Solving Algorithm: Gaussian Elimination
The solver converts your equations into an augmented matrix [A|b] and applies Gaussian elimination with partial pivoting:
- Forward elimination — row operations reduce the matrix to upper-triangular form. At each step the largest available pivot is chosen to minimise floating-point error.
- Rank check — the tool counts the non-zero rows of A and of [A|b] to classify the system before back-substitution.
- Back-substitution — starting from the last equation (which has only one unknown), values are substituted upward to find every variable.
- Verification — computed values are substituted back into the original equations; residuals close to zero confirm correctness.
📊 Understanding the Solution Types
| System Type | Condition | Geometric Meaning |
|---|---|---|
| Unique Solution | rank(A) = rank([A|b]) = number of variables | Lines/planes intersect at exactly one point |
| Infinite Solutions | rank(A) = rank([A|b]) < number of variables | Lines/planes coincide or share an infinite set of points |
| No Solution | rank(A) < rank([A|b]) | Lines/planes are parallel — never intersect |
🎓 Rank and Determinant Explained
The rank of a matrix is the number of linearly independent rows (or columns). Intuitively, it counts how many "independent pieces of information" the system contains. When rank is less than the number of variables, the system is underdetermined — some variables are free.
The determinant is computed for square systems only. A non-zero determinant guarantees a unique solution; det(A) = 0 signals that the system is either dependent (infinite solutions) or inconsistent (no solution). The determinant also scales volumes and appears throughout physics and engineering.
📋 Reading the Step-by-Step Output
When Show Steps is enabled, the solver logs each row operation in the format:
R2 = R2 − 3·R1
R3 = R3 + (2/3)·R1
Swap R1 ↔ R2Each operation is applied to the full augmented matrix and the intermediate result is shown so you can follow every transformation. This is valuable for students checking hand-calculations or teachers preparing worked examples.
🔬 Common Applications
- Circuit analysis — Kirchhoff's current and voltage laws produce linear systems of node voltages or mesh currents.
- Structural engineering — force balance at joints yields simultaneous equations for member forces.
- Economics — supply-and-demand equilibrium, input-output models, and LP relaxations all involve linear systems.
- Computer graphics — ray-plane intersection tests and coordinate transformations rely on solving Ax = b in real time.
- Chemistry — balancing chemical equations by satisfying atom conservation for each element.
💡 Tips for Best Results
- Use the same variable names consistently across all equations.
- If you get unexpected results, enable Show Steps and inspect the augmented matrix at each step to spot input errors.
- For systems with infinitely many solutions, try fixing one variable to a specific value and re-solving the reduced system to get a particular solution.
- Copy results with the Copy button to paste into your report, notes, or spreadsheet.