How to use the system of equations solver
- Enter the coefficients a₁, b₁ and the constant c₁ for your first equation:
a₁x + b₁y = c₁. - Enter the coefficients a₂, b₂ and the constant c₂ for your second equation:
a₂x + b₂y = c₂. - The system of equations solver computes the result automatically as you type.
- Read the values of x and y below the inputs, or check the error message if the lines do not intersect at a single point.
How the substitution method works
The substitution method solves a system of two linear equations by isolating one variable in the first equation and plugging that expression into the second. For the equations a₁x + b₁y = c₁ and a₂x + b₂y = c₂, assume b₁ is not zero.
First, isolate y in equation 1: y = (c₁ - a₁x) / b₁. Next, substitute this into equation 2: a₂x + b₂((c₁ - a₁x) / b₁) = c₂. Multiply through by b₁ to clear the fraction, then collect the x terms. The algebra simplifies to a single formula for x:
x = (c₁b₂ - c₂b₁) / (a₁b₂ - a₂b₁)
Once x is known, plug it back into the isolated y expression. The denominator D = a₁b₂ - a₂b₁ is called the determinant. If D is zero, the two lines are either parallel or identical, meaning no unique solution exists.
Worked example
Consider the system 2x + 3y = 7 and 4x - y = 5. Here a₁=2, b₁=3, c₁=7, a₂=4, b₂=-1, c₂=5.
Calculate the determinant: D = (2)(-1) - (4)(3) = -2 - 12 = -14. Since D is not zero, a unique solution exists.
Find x: x = (7(-1) - 5(3)) / -14 = (-7 - 15) / -14 = -22 / -14 = 11/7 ≈ 1.5714.
Find y using the first equation rearranged: y = (7 - 2(11/7)) / 3 = (49/7 - 22/7) / 3 = (27/7) / 3 = 9/7 ≈ 1.2857.
You can verify by plugging both values back into the original equations. Both sides will balance.
Common systems and their solutions
This table shows a few standard systems you might encounter in algebra homework or practical applications.
| Equation 1 | Equation 2 | x | y |
|---|---|---|---|
| x + y = 5 | x - y = 1 | 3 | 2 |
| 2x + y = 8 | x + y = 5 | 3 | 2 |
| 3x + 2y = 16 | x - y = 1 | 3.6 | 2.6 |
| x + 2y = 4 | 2x + 4y = 8 | Infinite solutions (same line) | |
| x + y = 3 | x + y = 5 | No solution (parallel lines) | |
When there is no unique solution
A system of equations solver must handle cases where the lines do not cross at exactly one point. This happens when the determinant D = a₁b₂ - a₂b₁ equals zero.
- Parallel lines: The left sides of the equations are proportional, but the constants are not. For example,
x + y = 3andx + y = 5can never be true at the same time. There is no solution. - Identical lines: One equation is just a multiple of the other, including the constant. For example,
x + y = 3and2x + 2y = 6describe the exact same line. Every point on the line is a solution, so there are infinitely many.
In both cases, this tool reports that no unique solution exists rather than guessing a single point.
Substitution versus elimination
Substitution and elimination are the two standard ways to solve simultaneous equations by hand. Substitution works best when one variable already has a coefficient of 1 or negative 1, making it easy to isolate. Elimination works best when the coefficients are larger or when adding the equations quickly cancels a variable.
This tool uses the substitution approach internally because it maps cleanly to a single set of formulas. For simple problems like those found in a linear equation solver, either method gives the same answer. For systems with three or more variables, matrix methods such as Gaussian elimination become more practical.
Worked examples
Each result below was produced by the same code the tool runs, so you can check your own numbers against them.
| Example | Input | Result |
|---|---|---|
| Standard intersection | Equation 1: coefficient of x (a₁): 2; Equation 1: coefficient of y (b₁): 3; Equation 1: constant (c₁): 7; Equation 2: coefficient of x (a₂): 4; Equation 2: coefficient of y (b₂): -1; Equation 2: constant (c₂): 5 | x: 1.57142857143; y: 1.28571428571; Determinant (D): -14 |
| Simple integers | Equation 1: coefficient of x (a₁): 1; Equation 1: coefficient of y (b₁): 1; Equation 1: constant (c₁): 5; Equation 2: coefficient of x (a₂): 1; Equation 2: coefficient of y (b₂): -1; Equation 2: constant (c₂): 1 | x: 3; y: 2; Determinant (D): -2 |
| Decimal coefficients | Equation 1: coefficient of x (a₁): 0.5; Equation 1: coefficient of y (b₁): 1.5; Equation 1: constant (c₁): 4; Equation 2: coefficient of x (a₂): 2; Equation 2: coefficient of y (b₂): -0.5; Equation 2: constant (c₂): 3 | x: 2; y: 2; Determinant (D): -3.25 |
| Negative constants | Equation 1: coefficient of x (a₁): 3; Equation 1: coefficient of y (b₁): -2; Equation 1: constant (c₁): -4; Equation 2: coefficient of x (a₂): 1; Equation 2: coefficient of y (b₂): 5; Equation 2: constant (c₂): 11 | x: 0.117647058824; y: 2.17647058824; Determinant (D): 17 |
FAQ
What is a system of equations?
A system of equations is a set of two or more equations that share the same variables. The solution is the set of values that makes every equation in the system true at the same time.
Why does the solver say there is no unique solution?
This happens when the determinant of the coefficients is zero. It means the two lines are either parallel (no intersection) or identical (infinite intersections).
Can I use decimals or fractions as coefficients?
Yes. You can enter any real number, including decimals like 0.5 or negative values. The system of equations solver handles them using standard floating-point arithmetic.
Does this tool work for three variables?
No. This page is designed specifically for two linear equations with two unknowns (x and y). Systems with three or more variables require a matrix calculator or Gaussian elimination.
Is my data sent to a server?
No. All calculations run entirely in your browser. Nothing you type is uploaded anywhere.
How do I check my answer?
Substitute the computed x and y values back into both original equations. If both equations balance (the left side equals the right side), your solution is correct.