System of Linear Equations Calculator (2 Variables)
Enter the six coefficients of a₁x + b₁y = c₁ and a₂x + b₂y = c₂. The tool applies Cramer's Rule, then cross-checks with elimination and substitution.
The calculator above solves a system of two linear equations with Cramer's rule and explains the same result with substitution and elimination.
Formulas used
- D ≠ 0: one unique solution (the two lines intersect).
- D = 0, Dx or Dy ≠ 0: no solution (parallel lines).
- D = Dx = Dy = 0: infinitely many solutions (the lines coincide).
Worked example
Solve x + y = 5 and x − y = 1. Here D = −2, Dx = −6, Dy = −4, so:
Enter the same values in the calculator above to see every step of the solution.
How to use the calculator
- Enter the coefficients a₁, b₁, c₁ and a₂, b₂, c₂.
- Press the calculate button. The result appears instantly.
- Read the step-by-step solution, rendered with KaTeX, to check your own work.
🎯 Practice quiz: systems of linear equations
Ten multiple-choice questions with four options each, built on the sections above: recognizing a linear system, checking a solution pair, computing D and Dx, the elimination method, the substitution method, the case D = 0, a system with infinitely many solutions, a system with a parameter m and a word problem. Pick an answer: the correct option turns green, a wrong one turns red, and the worked solution appears right below with a ⚠️ Traps box explaining why the wrong options are tempting. You can enter the coefficients from any question into the calculator above to check every step.
1️⃣ Recognizing a linear system Question 1. Which of the following is a system of two linear equations in two variables:
Correct answer: B. 2x − y = 1 and x + 3y = 4
A linear equation in two variables has the form ax + by = c, where a and b are not both zero. Each variable appears only to the first power, the variables are not multiplied together, and neither sits in a denominator. Only system B has two equations of this form:
Enter these six coefficients in the calculator above: D = 2·3 − 1·(−1) = 7 and Dx = Dy = 7, so the system has the unique solution (1; 1).
⚠️ Traps
- A: y is squared, so the first equation is quadratic.
- C: xy is a product of two variables, so xy = 2 has degree 2.
- D: x appears in the denominator of 1/x, so the equation is not linear (and it also requires x ≠ 0).
2️⃣ Checking a solution pair Question 2. Which pair (x; y) is a solution of the system 2x + y = 5 and x − y = 1:
Correct answer: B. (2; 1)
A pair is a solution of the system when it satisfies both equations. Substitute x = 2, y = 1:
Adding the two equations also gives 3x = 6, so x = 2 and y = x − 1 = 1. Geometrically, (2; 1) is where the lines y = 5 − 2x and y = x − 1 intersect.
⚠️ Traps
- A: satisfies equation (1) because 2·1 + 3 = 5, but 1 − 3 = −2 ≠ 1. The point lies only on the first line.
- C: satisfies equation (2) because 3 − 2 = 1, but 2·3 + 2 = 8 ≠ 5.
- D: wrong sign for y: 2·2 + (−1) = 3 ≠ 5 and 2 − (−1) = 3 ≠ 1.
3️⃣ Computing the determinant D Question 3. The determinant D of the system 3x − 2y = 4 and 5x + y = 11 is:
Correct answer: A. 13
Read the coefficients with their signs: a₁ = 3, b₁ = −2, a₂ = 5, b₂ = 1. Using D = a₁b₂ − a₂b₁:
Since D = 13 ≠ 0, the system has a unique solution: its two lines intersect, as in the left panel of the figure above.
⚠️ Traps
- B (−7): drops the minus sign of b₁ and computes 3·1 − 5·2.
- C (−13): subtracts in the wrong order, computing a₂b₁ − a₁b₂.
- D (−11): multiplies along the rows instead of the diagonals: a₁b₁ − a₂b₂ = −6 − 5.
4️⃣ Computing Dx and x Question 4. For the system 3x − 2y = 4 and 5x + y = 11 (with D = 13), the value of Dx and the solution x are:
Correct answer: A. Dx = 26, x = 2
Dx replaces the x column with the constants column c₁ = 4, c₂ = 11:
Similarly Dy = 3·11 − 5·4 = 13, so y = 1. Check: 3·2 − 2·1 = 4 and 5·2 + 1 = 11. Enter a₁ = 3, b₁ = −2, c₁ = 4, a₂ = 5, b₂ = 1, c₂ = 11 in the calculator above to see all three determinants. When Dx/D does not divide evenly, simplify the fraction with the fraction calculator.
⚠️ Traps
- B: computes 4·1 − 11·2, forgetting that b₁ = −2 turns the subtraction into an addition.
- C: 13 is Dy, not Dx. Dx replaces the x column, Dy replaces the y column.
- D: finds Dx correctly but divides the wrong way, D/Dx instead of Dx/D.
5️⃣ Elimination method Question 5. Solve 2x + 3y = 13 and 2x − y = 1 by elimination. Subtracting equation (2) from equation (1) gives:
Correct answer: A. 4y = 12
Both equations have the same x coefficient, 2, so subtracting them eliminates x:
Substitute y = 3 into (2): 2x − 3 = 1, so x = 2. The solution is (2; 3). Cross-check with Cramer’s rule: D = 2·(−1) − 2·3 = −8, Dx = 13·(−1) − 1·3 = −16, Dy = 2·1 − 2·13 = −24, so x = 2 and y = 3.
⚠️ Traps
- B: 3y − (−y) = 4y, not 2y; the sign of a negative term must change when you subtract it.
- C: adds the equations instead of subtracting, so x is not eliminated.
- D: subtracts the left-hand sides but adds the right-hand sides: 13 − 1 = 12, not 14.
6️⃣ Substitution method Question 6. Solve x − 2y = 1 and 3x + y = 10 by substitution. Solving equation (1) for x and substituting into equation (2) gives:
Correct answer: A. 3 + 7y = 10
From (1), x = 1 + 2y. Substitute into (2), keeping the whole expression in parentheses:
So y = 1 and x = 1 + 2·1 = 3. The solution is (3; 1); check: 3 − 2 = 1 and 9 + 1 = 10. You can check the one-variable equation 7y − 7 = 0 with the linear equation calculator and the expansion of 3(1 + 2y) with the algebraic expression simplifier.
⚠️ Traps
- B: substitutes without parentheses, writing 3·1 + 2y + y, so the 3 multiplies only the 1.
- C: moves −2y across with the wrong sign, getting x = 1 − 2y.
- D: multiplies 3 by 2y but forgets to multiply it by 1.
7️⃣ The case D = 0 Question 7. The system 2x − 4y = 3 and −x + 2y = 1:
Correct answer: B. has no solution
D = 0 but Dx ≠ 0, so the system has no solution. Direct check: multiplying (2) by −2 gives 2x − 4y = −2, which contradicts (1): 2x − 4y = 3. In slope-intercept form the equations are y = x/2 − 3/4 and y = x/2 + 1/2: same slope, different intercepts, so the lines are parallel, as in the middle panel of the figure above. See the equation of a line calculator for the slope-intercept form.
⚠️ Traps
- A: a unique solution requires D ≠ 0.
- C: infinitely many solutions require D, Dx and Dy to be 0 together; here Dx = 10.
- D: D = 0 does not stop you from deciding; you just look at Dx and Dy next.
8️⃣ Infinitely many solutions Question 8. The solution set of the system x − 3y = 2 and −2x + 6y = −4 is:
Correct answer: C. S = {(2 + 3t; t) | t ∈ ℝ}
All three determinants are 0: equation (2) is equation (1) multiplied by −2, so the two lines coincide. Let y = t be any real number; then (1) gives x = 2 + 3t. The system has infinitely many solutions of the form (2 + 3t; t), for example (2; 0), (5; 1) and (−1; −1).
⚠️ Traps
- A: D = 0 alone does not mean no solution; you must also check Dx and Dy.
- B: (2; 0) is just one solution (t = 0); there are infinitely many others.
- D: every pair is a solution only when both equations reduce to 0 = 0; here (0; 0) does not satisfy x − 3y = 2.
9️⃣ System with a parameter m Question 9. For which value of m does the system mx + 2y = 1 and 2x + y = 3 have no solution:
Correct answer: A. m = 4
The system can have no solution or infinitely many only when D = 0, that is m = 4. Then
so the system has no solution. Check: with m = 4, (1) is 4x + 2y = 1, while (2) multiplied by 2 is 4x + 2y = 6, a contradiction. Enter a₁ = 4, b₁ = 2, c₁ = 1, a₂ = 2, b₂ = 1, c₂ = 3 in the calculator above to see the two parallel lines in the Geometric interpretation step.
⚠️ Traps
- B: m ≠ 4 gives D ≠ 0, which is the condition for a unique solution.
- C: computes D = m + 4, getting the sign of − a₂b₁ wrong.
- D: assumes D = 0 always means infinitely many solutions; you must check Dx, and Dx = −5 ≠ 0.
🔟 Word problem Question 10. A cinema sells adult tickets for $5 and child tickets for $3. One afternoon it sold 120 tickets and took in $440. How many adult tickets were sold:
Correct answer: A. 40 tickets
Let x be the number of adult tickets and y the number of child tickets (positive integers):
So x = −80/(−2) = 40 and y = −160/(−2) = 80. Check: 40 + 80 = 120 tickets and 5·40 + 3·80 = 200 + 240 = $440. Enter a₁ = 1, b₁ = 1, c₁ = 120, a₂ = 5, b₂ = 3, c₂ = 440 to see the full solution.
⚠️ Traps
- B (80 tickets): that is the number of child tickets y.
- C (60 tickets): splits the 120 tickets in half and ignores the total; that would bring in 5·60 + 3·60 = $480, not $440.
- D (88 tickets): divides 440 by 5, as if every ticket were an adult ticket.
🔗 Related calculators
- Linear equation calculator ax + b = 0 (the one-variable equation after substitution)
- Quadratic equation calculator with step-by-step solution
- Equation of a line calculator: each equation of the system is a line
- Linear inequalities in two variables: graph the solution region
- Fraction calculator: simplify solutions x = Dx/D written as fractions
- Algebraic expression simplifier: expand brackets when substituting