Linear System Solver

Solve a system of two linear equations (ax + by = c, dx + ey = f) using Cramer's rule. Find x and y, or detect parallel/coincident lines.

Examples

2x + 3y = 8, x - y = -1

Unique solution: x = 1, y = 2

x coefficient
2 none
y coefficient
3 none
constant
8 none
x coefficient
1 none
y coefficient
-1 none
constant
-1 none
Solution
x = 1, y = 2
x
1
y
2
Determinant
-5 none
Solution Type
Unique solution
Solution steps

det=(2)(1)(1)(3)=5\det = (2)(-1) - (1)(3) = -5

x=(8)(1)(1)(3)5=1x = \frac{(8)(-1) - (-1)(3)}{-5} = 1

y=(2)(1)(1)(8)5=2y = \frac{(2)(-1) - (1)(8)}{-5} = 2

Embed this calculator

Copy a free iframe snippet for articles, learning pages, forums, wikis, newsletters, and internal docs.

How It Works

Formula

det=a1b2a2b1\det = a_1 b_2 - a_2 b_1

x=c1b2c2b1detx = \frac{c_1 b_2 - c_2 b_1}{\det}

y=a1c2a2c1dety = \frac{a_1 c_2 - a_2 c_1}{\det}

Variables, symbols and units

a1a_1

Coefficient of x in equation 1

b1b_1

Coefficient of y in equation 1

c1c_1

Constant term of equation 1

a2a_2

Coefficient of x in equation 2

b2b_2

Coefficient of y in equation 2

c2c_2

Constant term of equation 2
Calculation method explained

Enter coefficients for two equations: a1x + b1y = c1 and a2x + b2y = c2. The solver computes the determinant (a1b2 - a2b1). If non-zero, it applies Cramer's rule. If zero, it checks whether the system is inconsistent or dependent.

Examples

2x + 3y = 8, x - y = -12 none · 3 nonex = 1, y = 2

Unique solution: x = 1, y = 2

x coefficient
2 none
y coefficient
3 none
constant
8 none
x coefficient
1 none
y coefficient
-1 none
constant
-1 none
Solution
x = 1, y = 2
Parallel lines1 none · 1 noneNo solution

x + y = 1 and 2x + 2y = 5 have no solution

x coefficient
1 none
y coefficient
1 none
constant
1 none
x coefficient
2 none
y coefficient
2 none
constant
5 none
Solution
No solution
3x - 2y = 7, x + 4y = 93 none · -2 nonex = 3.285714, y = 1.428571

Finding the intersection point

x coefficient
3 none
y coefficient
-2 none
constant
7 none
x coefficient
1 none
y coefficient
4 none
constant
9 none
Solution
x = 3.285714, y = 1.428571

Frequently Asked Questions

What is a system of linear equations?
A system of two linear equations is a pair of equations, each describing a straight line. The solution is the point where the lines intersect.
What is Cramer's rule?
Cramer's rule uses determinants to solve linear systems. For 2 equations: x = (c1*b2 - c2*b1) / det, y = (a1*c2 - a2*c1) / det, where det = a1*b2 - a2*b1.
What if the determinant is zero?
A zero determinant means the lines are either parallel (no solution) or coincident (infinitely many solutions). The calculator detects which case applies.
Can this solve 3 or more equations?
This calculator is designed for 2x2 systems. For larger systems, Gaussian elimination or matrix methods are needed.
What are parallel vs coincident lines?
Parallel lines never meet (no solution). Coincident lines are the same line (infinitely many solutions). Both cases have a zero determinant.

Related Calculators

All calculators