Click to show tips
Try an Example
Pick a scenario to see how the calculator works, then adjust the values
Simple 2x2 System
Solve 2x + 3y = 7 and x - y = 1 using Gaussian elimination
Key values: 2×2 system · Unique solution · x=2, y=1
3x3 Engineering System
Solve a 3-variable system commonly found in circuit analysis
Key values: 3×3 system · Cramer's Rule · 3 unknowns
Parallel Lines (No Solution)
Explore what happens when two equations have no intersection
Key values: 2×2 system · Inconsistent · No solution
Documentation Contents
How to Use This Solver
Solve any system of 2 or 3 linear equations in three simple steps.
- Enter the system: Choose the system size (2x2 or 3x3) and enter the coefficient of each variable and the right-hand side for each equation. For example, the equation uses coefficients 2, 3 and RHS 7.
- Choose a method: Select Gaussian Elimination (default), Cramer's Rule, or Matrix Inverse. Each method produces a different step-by-step trace.
- Read the results: The solver classifies the system, computes the solution (or explains why no unique solution exists), and provides a verification check.
Tip
If the determinant is zero, the system either has infinitely many solutions (dependent) or no solution (inconsistent). The solver will classify this automatically using the Rouche-Capelli theorem.
Solving Methods
Gaussian Elimination
The most general method. Converts the augmented matrix to row-echelon form using elementary row operations with partial pivoting, then back-substitutes.
Best for: any system, especially 3x3 and larger. Always works.
Cramer's Rule
Computes each variable using ratios of determinants: . Each replaces column of with the constant vector .
Best for: 2x2 systems or when you need determinant analysis. Requires .
Matrix Inverse
Computes by finding the inverse of the coefficient matrix and multiplying by the constant vector.
Best for: theoretical understanding. Requires (non-singular matrix).
Key Formulas
Matrix Form
Any system of linear equations can be written in matrix form as:
where is the coefficient matrix, is the unknown vector, and is the constant vector.
2x2 Determinant
3x3 Determinant (Sarrus Rule)
Cramer's Rule
For a system with :
where is matrix with column replaced by .
Rouche-Capelli Theorem
A system is:
- Consistent if and only if
- Unique solution if (number of unknowns)
- Infinite solutions if with free parameters
System Classification
Every system of linear equations falls into one of three categories:
Unique Solution (consistent, independent): The lines (2D) or planes (3D) intersect at exactly one point. and .
Infinitely Many Solutions (consistent, dependent): The equations are redundant. In 2D, the lines are coincident (identical). In 3D, the planes intersect along a line or are coincident. and .
No Solution (inconsistent): The equations are contradictory. In 2D, the lines are parallel. In 3D, the planes do not share a common point. .
Real-World Examples
Example 1: Chemistry Mixture Problem
A chemist needs 300 mL of 30% acid solution by mixing a 20% solution and a 50% solution. How much of each?
Setup: Let = mL of 20% solution, = mL of 50% solution.
Solution: mL, mL
Takeaway: Mixture problems always yield a 2x2 system -- one equation for quantity, one for concentration.
Example 2: Kirchhoff's Circuit Laws
A circuit has three loop currents . Applying Kirchhoff's voltage law to each loop gives:
Solution: Solved via Gaussian elimination (det(A) = 171): , , . The negative signs indicate current flows opposite to the assumed direction.
Takeaway: Electrical engineering relies heavily on systems of linear equations for circuit analysis using Kirchhoff's laws.
Example 3: Supply-Demand Equilibrium
Supply: . Demand: . Find the equilibrium price and quantity.
Setup: Rewrite as the system and .
Solution: units,
Takeaway: Market equilibrium occurs at the intersection of supply and demand curves -- a classic 2x2 linear system application.
Example 4: Traffic Flow Network
At three intersections, traffic conservation gives:
Solution: , , vehicles/hour
Takeaway: Traffic engineering uses conservation equations at each node, producing systems that scale with the number of intersections.
Common Mistakes
- Confusing "no solution" with x = 0: A system with "no solution" means no values satisfy all equations simultaneously. This is completely different from , which is a valid solution.
- Applying Cramer's rule when det(A) = 0: Cramer's rule requires . When the determinant is zero, the system is either inconsistent or has infinitely many solutions -- Cramer's rule cannot distinguish between these cases.
- Ignoring free variables in infinite-solution systems: When a system has infinitely many solutions, you must express the solution in terms of free parameters. The solution is not indeterminate -- it is a parametric family.
- Arithmetic errors in row operations: When performing Gaussian elimination by hand, sign errors in the multiplier or during subtraction are the most common mistake. Always double-check the multiplier: if you are eliminating from row 2 using row 1, the multiplier is .
- Not verifying the solution: Always substitute your solution back into all original equations. A correct solution must satisfy every equation, not just the ones you used to find it.
Frequently Asked Questions
What does "no solution" mean geometrically?
For a 2x2 system, "no solution" means the two lines are parallel -- they have the same slope but different y-intercepts, so they never intersect. For a 3x3 system, it means the three planes do not share a common point (they may form a triangular prism or other non-intersecting configuration).
What are free variables?
In a system with infinitely many solutions, free variables are parameters that can take any real value. Other variables (called pivot variables) are expressed in terms of these free variables. The number of free variables equals .
Why does the solver use partial pivoting?
Partial pivoting swaps rows to use the largest available pivot element in each column. This reduces rounding errors in floating-point arithmetic and prevents division by very small numbers, making the algorithm numerically stable.
What does the condition number warning mean?
A high condition number (above ) means the system is ill-conditioned: small changes in coefficients cause large changes in the solution. For example, and have a unique solution, but the near-parallel lines make it numerically sensitive.
Can this solver handle systems with more than 3 equations?
This calculator supports 2x2 and 3x3 systems. For larger systems (4x4, 5x5, etc.), use a dedicated matrix calculator or a computer algebra system like MATLAB, Octave, or Python with NumPy.
Is this solver free?
Yes, completely free with no paywalls or sign-ups. Unlike Symbolab and Mathway which charge for step-by-step solutions, this solver shows every step at no cost.
References
- Strang, G. Introduction to Linear Algebra, 5th ed., Wellesley-Cambridge Press, 2016.
- Golub, G.H. & Van Loan, C.F. Matrix Computations, 4th ed., Johns Hopkins University Press, 2013.
- Wolfram MathWorld. “Gaussian Elimination.” https://mathworld.wolfram.com/GaussianElimination.html
- Wolfram MathWorld. “Cramer’s Rule.” https://mathworld.wolfram.com/CramersRule.html
- Wikipedia. “Rouché–Capelli theorem.” https://en.wikipedia.org/wiki/Rouch%C3%A9%E2%80%93Capelli_theorem
Disclaimer
This linear system solver is provided for educational and informational purposes only. While the solver uses mathematically rigorous algorithms (Gaussian elimination with partial pivoting, Cramer's rule, matrix inverse via LU decomposition), floating-point arithmetic can introduce small rounding errors, especially for ill-conditioned systems. Always verify critical results independently. Do not rely on this tool for safety-critical engineering or medical calculations without independent verification by a qualified professional.
Specialized Calculators
Choose from 4 specialized versions of this calculator, each optimized for specific use cases and calculation methods.
Purpose
2 CalculatorsMethod Focus
2 CalculatorsRelated Calculators
6 CalculatorsMore Math calculators