System of 2 Equations Solver
A₂X + B₂Y = C₂
Table of Contents
- System of 2 equations definition
- Parts of a system of 2 equations
- How to solve a system of 2 equations
- Number of solutions
- Frequently asked questions
System of 2 equations definition
A system of 2 equations is a pair of linear equations with the same two unknowns, x and y, that must both be true at once. In standard form:
a1 * x + b1 * y = c1
a2 * x + b2 * y = c2
Each equation on its own is a straight line, with infinitely many solutions. The solution of the system is the one pair of values that fits both: the point where the two lines cross.
Systems of two equations come up whenever two unknowns are tied by two facts, such as two prices from two receipts. For one unknown, use the linear equation solver; for three, the system of 3 equations solver.
Parts of a system of 2 equations
You enter the six numbers of the two equations, and the tool shows the solution, x and y.
Coefficients and constants
The coefficients are the numbers that multiply the unknowns: a1 and a2 go with x, and b1 and b2 with y. The number 1 or 2 says which equation they belong to, and a missing term has a coefficient of 0.
The constants c1 and c2 are the numbers on the right side of the equations.
Solution (x, y)
The solution is the pair of values that makes both equations true. By Cramer's rule:
x = (c1 * b2 - c2 * b1) / (a1 * b2 - a2 * b1)y = (a1 * c2 - a2 * c1) / (a1 * b2 - a2 * b1)
The denominator, a1 * b2 - a2 * b1, is the determinant of the system. There is a single solution only when it is not zero.
How to solve a system of 2 equations
There are three common methods, and they always give the same answer. Each is shown here on the same example:
2 * x + 3 * y = 8
x - y = -1
Substitution
Solve one equation for one unknown, and put the result into the other.
- From the second equation:
x = y - 1 - Into the first:
2 * (y - 1) + 3 * y = 8, which gives5 * y = 10, soy = 2. - Back into the first step:
x = 2 - 1 = 1
Elimination
Multiply the equations so that one unknown has opposite coefficients, then add them to make it disappear.
- Multiply the second equation by 3:
3 * x - 3 * y = -3 - Add it to the first:
5 * x = 5, sox = 1. - Put
x = 1into the second equation:1 - y = -1, soy = 2.
Cramer's rule
Use the formulas above directly. This is the method this tool uses.
- The determinant:
2 × (-1) - 1 × 3 = -5 x = (8 × (-1) - (-1) × 3) / (-5) = -5 / -5 = 1y = (2 × (-1) - 1 × 8) / (-5) = -10 / -5 = 2
All three methods give x = 1 and y = 2, and both equations agree: 2 + 6 = 8 and 1 - 2 = -1.
Number of solutions
Two straight lines can meet in three ways:
- One solution: the lines cross at a single point. The determinant is not zero.
- No solution: the lines are parallel and never meet, such as
x + y = 2andx + y = 5. The determinant is zero. - Infinitely many solutions: both equations describe the same line, such as
x + y = 2and2x + 2y = 4. The determinant is zero.
When the determinant is zero, this tool doesn't show a solution, since there isn't a single one.
Frequently asked questions
How do you solve a system of two equations?
Use substitution, elimination or Cramer's rule. Cramer's rule gives the answer straight away: x = (c1 * b2 - c2 * b1) / (a1 * b2 - a2 * b1) and y = (a1 * c2 - a2 * c1) / (a1 * b2 - a2 * b1).
Which method is the easiest?
Substitution is easiest when one unknown already has a coefficient of 1 or -1, and elimination when the coefficients line up. Cramer's rule is the most direct when you just want the numbers.
How do you know if a system has no solution?
Calculate the determinant, a1 * b2 - a2 * b1. If it is zero, the two lines are parallel or the same line, so there is either no solution or infinitely many.