How to use the calculator
Type one equation per line, the way you would write it on paper. You can use brackets, fractions, decimals and terms on both sides, so 2(x − 1) + y/3 = 4 works without tidying it up first. Any letters can be the unknowns: x and y, a, b and c, or subscripted names such as I1 and I2 for currents. The solver handles up to 10 equations and 10 unknowns, and the number of equations does not have to match the number of unknowns.
If your system is already written as an augmented matrix, paste it with one row per line, such as 2 1 −1 | 6. The bar is optional. The last number in each row is the constant.
Choose a method for the working: Gauss–Jordan elimination, Gaussian elimination with back substitution, substitution, Cramer’s rule or the inverse matrix. The answer is the same whichever you pick, and it is exact: fractions stay as fractions, with a decimal next to them. The result also shows the ranks, the determinant when there is one, and a check that substitutes the answer into every equation. For two unknowns, you also get a graph of the lines.
What a system of linear equations is
A system of linear equations is a set of equations that share the same unknowns, where each unknown appears only to the first power. Unknowns are never multiplied together, and none appears in a denominator. 3x + 2y = 16 is linear, but xy = 6, x² + y = 5 and 1/x + y = 2 are not.
A solution is a set of values that makes every equation true at once. With two unknowns, each equation is a straight line, and the solution is where the lines cross. With three unknowns, each equation is a flat plane in space. Beyond three, you can no longer picture it, but the algebra works exactly the same way.
One solution, no solution or infinitely many
A linear system always has exactly one solution, no solution, or infinitely many. It can never have exactly two. Two lines either cross once, run parallel and never meet, or lie on top of each other.
The calculator decides which case applies by comparing two ranks. The rank counts how many of the equations are independent, meaning they say something new. Write r for the rank of the coefficient matrix A, r′ for the rank of the augmented matrix [A | b], and n for the number of unknowns.
- One solution: r = r′ = n. The system is consistent and independent. For a square system this is the same as det(A) ≠ 0.
- Infinitely many: r = r′ < n. The system is consistent and dependent, with n − r free variables.
- No solution: r < r′. The system is inconsistent. Elimination produces a row that reads 0 = 1 or something similar.
This rank test is known as the Rouché–Capelli theorem. It works for any number of equations, including systems with more equations than unknowns, or fewer.
Choosing a method
Take 3x + 2y = 16 and x − 4y = −4, which has the solution x = 4, y = 2.
- Substitution. Solve one equation for one unknown and substitute it into the others. The second equation gives x = 4y − 4. Then 3(4y − 4) + 2y = 16, so 14y = 28 and y = 2, and x = 4(2) − 4 = 4. This is quickest when some unknown already has a coefficient of 1.
- Elimination. Add a multiple of one equation to another so that an unknown cancels. Doubling the first equation gives 6x + 4y = 32. Adding the second equation removes y: 7x = 28, so x = 4. This is the hand method most people use for two or three equations.
- Gaussian elimination. This is elimination done systematically on the augmented matrix. You clear the entries below each pivot to get a staircase (row echelon) shape, then back-substitute from the bottom row up.
- Gauss–Jordan elimination. This keeps going until every pivot is 1 and is the only nonzero entry in its column (reduced row echelon form). The answer can then be read straight off the matrix. It is also the clearest method for spotting free variables and contradictions.
- Cramer’s rule. Each unknown is a ratio of determinants. Here det(A) = 3(−4) − 2(1) = −14. Replacing the x column with the constants gives det = 16(−4) − 2(−4) = −56, so x = −56 ÷ −14 = 4. It is neat for 2 × 2 and 3 × 3 systems, but it only works when the system is square and det(A) ≠ 0.
- Inverse matrix. Write the system as Ax = b and multiply by A⁻¹, giving x = A⁻¹b. This pays off when you need to solve with the same coefficients but several different right-hand sides. It has the same restriction as Cramer’s rule.
If you pick Cramer’s rule or the inverse method for a system they cannot handle, the calculator explains why and shows Gauss–Jordan elimination instead.
Reading an answer with free variables
When a system has infinitely many solutions, some unknowns can take any value. These are the free variables, and the others are written in terms of them. For x + 2y − z = 3, 2x − y + z = 1 and 3x + y = 4, the third equation is just the first two added together. So there are only two independent equations for three unknowns. Taking z as free gives x = 1 − z/5 and y = 1 + 3z/5.
The parametric form says the same thing as a starting point plus a direction: (x, y, z) = (1, 1, 0) + t(−1, 3, 5). This uses z = 5t to avoid fractions. Every value of t gives a solution, and together they form a line in space where all three planes meet. With two free variables, the solutions form a plane.
When there is no solution: the closest fit
Real measurements rarely agree perfectly. Suppose you want a line y = mx + c through the points (0, 1), (1, 3) and (2, 4). That gives three equations, c = 1, m + c = 3 and 2m + c = 4, which cannot all be true. When a system has more equations than unknowns and no exact solution, the calculator also gives the least-squares answer. These are the values that make the sum of the squared errors as small as possible. They come from solving the normal equations AᵀAx = Aᵀb. Here the best-fit line is y = 1.5x + 7/6, and its squared errors add up to 1/6. This is the same method used to fit trend lines in statistics and spreadsheets.
Where systems of equations come up
- Mixtures and blends. To make 12 kg of coffee worth $15 per kg from beans at $12 and $20 per kg, you need x + y = 12 and 12x + 20y = 180. The answer is 7.5 kg of the cheaper beans and 4.5 kg of the dearer ones.
- Splitting money. $9,000 split between accounts paying 3% and 5% earns $370 a year in interest. So x + y = 9000 and 0.03x + 0.05y = 370, giving $4,000 at 3% and $5,000 at 5%.
- Electrical circuits. Kirchhoff’s laws give one equation per junction and one per loop. For a 20 V source with 2 Ω, 4 Ω and 12 Ω resistors, I1 − I2 − I3 = 0, 2I1 + 4I2 = 20 and 4I2 − 12I3 = 0. The currents are 4 A, 3 A and 1 A.
- Fitting curves. A parabola y = ax² + bx + c through three points gives three equations in a, b and c. Through (1, 4), (2, 3) and (4, 7), the parabola is y = x² − 4x + 7.
- Balancing chemical equations. In C₃H₈ + a O₂ → b CO₂ + c H₂O, each element must balance. Carbon gives b = 3, hydrogen gives 2c = 8, and oxygen gives 2a = 2b + c. Solving gives a = 5, b = 3 and c = 4.
- Economics and engineering. Supply and demand equilibrium, input–output models, structural forces and network flows all come down to linear systems, often with many unknowns.
Tips and common mistakes
- Define every unknown first. Write down what x and y stand for, with units. Most word-problem errors come from mixing up which quantity is which.
- Count independent facts, not equations. x + y = 10 and 2x + 2y = 20 are one fact written twice. If the rank is lower than the number of unknowns, you need more information.
- Watch the signs when eliminating. Subtracting an equation subtracts every term, including the constant.
- Check every original equation. A slip can produce values that satisfy one equation but not the others. The calculator substitutes into all of them for you.
- Make sure the answer makes sense. The algebra may give a negative number of tickets or half a person. That usually means the setup or the data is wrong, not that the maths has failed.
- Avoid rounding along the way. Rounding in the middle of elimination can change the answer noticeably, especially when two equations are nearly parallel. Exact fractions avoid this.