How To Solve A System Of Linear Equations Calculator
Two equations with two unknowns have a single solution whenever the two lines cross at exactly one point, and Cramer's rule finds that point with nothing more than determinants.
Value of x
2
- Value of y
- 3
- Determinant of the coefficients
- -14
- First equation with the solved values
- 13
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
The formula this calculator uses
D = a1 b2 - a2 b1
- a1, b1, c1
- The coefficients and constant of the first equation
- a2, b2, c2
- The coefficients and constant of the second equation
- D
- The determinant of the coefficient matrix
- x, y
- The values that satisfy both equations at once
How to check the result by hand
- 1
Write both equations in standard form
Each equation must read ax + by = c, with the unknowns on the left in that order and the constant alone on the right. Rearranging first prevents coefficients from being read off in the wrong order.
- 2
Build the determinant from the coefficients
Multiply the first x coefficient by the second y coefficient and subtract the second x coefficient times the first y coefficient. For 2x + 3y = 13 and 4x - y = 5 that is 2 times -1 minus 4 times 3, giving -14.
- 3
Check that the determinant is not zero
A zero determinant means the lines are parallel or identical, so there is no single solution. Comparing the ratio of the x coefficients with the ratio of the y coefficients reveals the parallel case before any division is attempted.
- 4
Replace the x column with the constants
Keep the y coefficients where they are and put the two constants in the x column. The numerator is c1 b2 minus c2 b1, which for the example is -28, and dividing by -14 gives x = 2.
- 5
Replace the y column and check the answer
Swap the constants into the y column for a numerator of a1 c2 minus a2 c1, giving y = 3. Substitute both values back into the original equations; each must return its stated constant.
For worked examples, common mistakes and the limits of this formula, read the full How To Solve A System Of Linear Equations page.