CalcUnit Logo

Linear Equations In Two Variables Calculator

What is the Linear Equations In Two Variables Calculator?

What this calculator does

Give it two linear equations in x and y, six numbers in all, and it solves the pair at once. It reports the Determinant D and the single pair (x, y) that makes both equations true, using the method called Cramer's rule.

The six inputs it asks for

Equation 1 takes a1, b1, and c1, meaning a1 times x plus b1 times y equals c1. Equation 2 takes a2, b2, and c2 in the same pattern. The page opens with 2, 3, 8 for the first equation and 1, -1, 1 for the second.

What the answer means

Each equation is a straight line on graph paper, and the solution is the one point where the two lines cross. For the default inputs the crossing sits at x 2. 2000 and y 1. 2000, the only values that satisfy both equations at the same time.

Cramer's rule in one idea

The method builds three determinants from the six coefficients. The first, D, mixes only the x and y coefficients. The other two swap in the constants, one per variable. Divide each by D and the variables fall out, with no guessing and no rearranging.

Reading the Determinant D line

D equals a1 times b2 minus a2 times b1. For the defaults that is 2 times -1 minus 1 times 3, which is -5. The sign of D does not matter; only whether it is zero matters, because everything else gets divided by it.

Worked example: the page default

Enter 2, 3, 8 and 1, -1, 1. The page reports D -5. 0000, Solution x 2. 2000, and Solution y 1. 2000. Check them below: they satisfy both equations exactly, which is the test every answer from this page should pass.

Worked example: whole numbers

Enter a1 1, b1 1, c1 10 and a2 1, b2 -1, c2 4, the pair x plus y equals 10 and x minus y equals 4. The page reports D -2. 0000, Solution x 7. 0000, and Solution y 3. 0000, a tidy crossing at (7, 3).

Worked example: a fractional answer

Enter 3, 2, 16 and 2, -1, 2. The page reports D -7. 0000, Solution x 2. 8571, and Solution y 3. 7143. Underneath, x is exactly 20/7 and y is exactly 26/7; the page rounds repeating decimals like these to four places for display.

Worked example: a mixed system

Enter 4, -2, 10 and 3, 5, 11. The page reports D 26. 0000, Solution x 2. 7692, and Solution y 0. 5385. Exactly, x is 72/26 and y is 14/26. Negative coefficients are ordinary here and change nothing about the method.

Checking any answer by substitution

Plug the reported x and y back into both original equations. For the defaults: 2 times 2. 2 plus 3 times 1. 2 is 8, matching c1, and 2. 2 minus 1. 2 is 1, matching c2. If both lines balance, the crossing point is right.

When D equals zero

A determinant of zero means the two lines do not cross at a single point: they are either parallel or the very same line. Cramer's rule would divide by zero here, so the page is guarded. It prints Solution x 0 and Solution y 0 instead.

Those zeros are placeholders, not answers

Read the printed 0 and 0 as a flag, not a solution. Test them: for the pair x plus y equals 5 and x plus y equals 8, the values 0 and 0 satisfy neither equation. The page cannot print the words no solution, so it prints guarded zeros.

No solution or infinitely many

The page shows the same zeros for both zero-D cases, so tell them apart by hand. If every coefficient and constant of one equation is the same multiple of the other, like 1, 1, 5 and 2, 2, 10, it is one line twice: infinitely many solutions.

Parallel lines by hand

If the x and y coefficients are proportional but the constants are not, the lines are parallel and never meet. The pair 1, 1, 5 with 1, 1, 8 is the classic case: the left sides match pattern, the right sides disagree, so no point can satisfy both.

When 0 and 0 really is the answer

If both constants c1 and c2 are 0 and D is not zero, then x 0 and y 0 is the genuine solution, not a guard. Try 2, 4, 0 with 3, -1, 0: D is -14 and the crossing really is the origin. Read the D line first.

A missing variable is fine

A coefficient of 0 simply removes that variable from its equation. Enter 5, 0, 20 with 0, 4, 12 and the first equation says 5 times x equals 20 directly. The page reports D 20. 0000, Solution x 4. 0000, and Solution y 3. 0000.

Setting up a word problem

Two unknowns need two facts. Suppose 10 tickets cost 104 dollars with adults at 12 and children at 8: a plus c equals 10 and 12a plus 8c equals 104. Entered as 1, 1, 10 and 12, 8, 104, the page returns 6 adults and 4 children.

Elimination by hand

To solve the defaults without the page, scale the second equation by 3 to get 3x minus 3y equals 3, then add it to the first: the y terms cancel, leaving 5x equals 11, so x is 2. 2. Then y equals x minus 1, which is 1. 2.

Substitution by hand

Or solve one equation for a variable and substitute. The second default equation gives y equals x minus 1. Into the first: 2x plus 3 times (x minus 1) equals 8, so 5x equals 11, x is 2. 2, and y follows as 1. 2.

Decimals and fractions as inputs

Coefficients can be any real numbers, including decimals and negatives. Fractions are best typed as decimals, like 0. 5 for one half. Answers print to four decimal places, so a solution like 20/7 appears as 2. 8571 even though the exact value keeps repeating.

Exact answers by hand

When a teacher wants fractions, keep Cramer's rule in fraction form: each variable is its constant-swapped determinant over D, unreduced until the end. For the fractional example above, x is -20 over -7, which is exactly 20/7, instead of the rounded 2. 8571.

Three variables are out of scope

This page stops at two equations and two unknowns. Systems of three need a larger determinant machinery. The same Cramer pattern extends in principle, but nothing on this page accepts a third equation, a third variable, or constants arranged for one.

Why the determinant comes first

Reading D before x and y protects you from the page's one silent trap. A nonzero D means the printed solution is real. A zero D means the printed zeros are guards, and the real story, parallel or identical lines, is yours to settle by comparing the equations.

With the pre-filled defaults — a1 (x Coefficient, Equation 1) 2, b1 (y Coefficient, Equation 1) 3, c1 (Constant, Equation 1) 8, a2 (x Coefficient, Equation 2) 1, and 2 more more inputs — the Linear Equations In Two Variables Calculator returns Determinant D -5. 0000, Solution x 2. 2000, Solution y 1. 2000.

Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.

How to Use the Linear Equations In Two Variables Calculator

  1. 1Enter the x coefficient of the first equation in the a1 (x Coefficient, Equation 1) field.
  2. 2Enter the y coefficient and the constant in the b1 (y Coefficient, Equation 1) and c1 (Constant, Equation 1) fields.
  3. 3Enter the second equation the same way in the a2, b2, and c2 fields for Equation 2.
  4. 4Read the Determinant D line: nonzero means one crossing point exists; zero means the guarded case below.
  5. 5Read the Solution x line for the x-coordinate of the crossing point.
  6. 6Read the Solution y line for the y-coordinate of the crossing point.
  7. 7Substitute both values into your two original equations to confirm each side balances.
  8. 8If D is 0, compare the equations by hand to decide between parallel lines and the same line twice.

Formula

a * b

This is the core equation the Linear Equations In Two Variables Calculator uses to calculate results. Enter values in the calculator above to see it in action.

Common Examples

ScenarioCalculationResult
Page defaulta1 = 2, b1 = 3, c1 = 8, a2 = 1, b2 = -1, c2 = 1Determinant D -5.0000, Solution x 2.2000, Solution y 1.2000
Whole-number solutiona1 = 1, b1 = 1, c1 = 10, a2 = 1, b2 = -1, c2 = 4Determinant D -2.0000, Solution x 7.0000, Solution y 3.0000
Fractional solutiona1 = 3, b1 = 2, c1 = 16, a2 = 2, b2 = -1, c2 = 2Determinant D -7.0000, Solution x 2.8571, Solution y 3.7143
Mixed signsa1 = 4, b1 = -2, c1 = 10, a2 = 3, b2 = 5, c2 = 11Determinant D 26.0000, Solution x 2.7692, Solution y 0.5385

Value Reference Table

See how the Determinant D changes as a1 (x Coefficient, Equation 1) moves across its typical range — every row below is calculated live with the same formula as the calculator above.

a1 (x Coefficient, Equation 1)Determinant DSolution xSolution y
0.5-3.50003.14292.1429
1-4.00002.75001.7500
2-5.00002.20001.2000
3-6.00001.83330.8333
4-7.00001.57140.5714
5-8.00001.37500.3750
6-9.00001.22220.2222
8-11.00001.00000.0000

Practice Problems

Check your understanding of the Linear Equations In Two Variables Calculator with these practice problems. Click a problem to reveal its correct calculated answer.

Q1

Whole-number solution: You enter a1 (x Coefficient, Equation 1) 1, b1 (y Coefficient, Equation 1) 1, c1 (Constant, Equation 1) 10, a2 (x Coefficient, Equation 2) 1, and 2 more more inputs — what does the calculator return?

Show Answer
With a1 (x Coefficient, Equation 1) 1, b1 (y Coefficient, Equation 1) 1, c1 (Constant, Equation 1) 10, a2 (x Coefficient, Equation 2) 1, and 2 more more inputs, the results are Determinant D -2.0000, Solution x 7.0000, Solution y 3.0000.
Q2

With a1 (x Coefficient, Equation 1) 3.75, b1 (y Coefficient, Equation 1) 2, c1 (Constant, Equation 1) 16, a2 (x Coefficient, Equation 2) 2, and 2 more more inputs, what are the results?

Show Answer
Entering a1 (x Coefficient, Equation 1) 3.75, b1 (y Coefficient, Equation 1) 2, c1 (Constant, Equation 1) 16, a2 (x Coefficient, Equation 2) 2, and 2 more more inputs gives Determinant D -7.7500, Solution x 2.5806, Solution y 3.1613.

Calculation Progression Roadmap

How the Linear Equations In Two Variables Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.

1

Gather your inputs

Type in your a1 (x Coefficient, Equation 1), b1 (y Coefficient, Equation 1), c1 (Constant, Equation 1), a2 (x Coefficient, Equation 2), b2 (y Coefficient, Equation 2), and 1 more more. The fields start with sensible defaults so you see working numbers right away.

2

Sanity-check your numbers

Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.

3

The math runs itself

The calculator evaluates a1 (x Coefficient, Equation 1) × b2 (y Coefficient, Equation 2) - a2 (x Coefficient, Equation 2) × b1 (y Coefficient, Equation 1) on every keystroke — there is no submit button to press.

4

Read your results

Your Determinant D, Solution x, and Solution y appear instantly. With the pre-filled defaults, that is Determinant D -5.0000, Solution x 2.2000, Solution y 1.2000. Change any input to see the effect immediately.

5

Test a what-if

Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.

Real-World Examples

Fresh scenarios — starting with double-checking a spreadsheet — worked through with different numbers than the examples above, so you can watch the formula handle new situations.

1

Double-checking a spreadsheet

A quick run with a1 (x Coefficient, Equation 1) 4, b1 (y Coefficient, Equation 1) 3, c1 (Constant, Equation 1) 8, a2 (x Coefficient, Equation 2) 1, and 2 more more inputs gives Determinant D -7.0000, Solution x 1.5714, Solution y 0.5714.

2

Settling a debate

With a1 (x Coefficient, Equation 1) 1, b1 (y Coefficient, Equation 1) 3, c1 (Constant, Equation 1) 8, a2 (x Coefficient, Equation 2) 1, and 2 more more inputs, the calculator returns Determinant D -4.0000, Solution x 2.7500, Solution y 1.7500.

3

Quick mental-math verify

Plug in a1 (x Coefficient, Equation 1) 3, b1 (y Coefficient, Equation 1) 3, c1 (Constant, Equation 1) 8, a2 (x Coefficient, Equation 2) 1, and 2 more more inputs and you get Determinant D -6.0000, Solution x 1.8333, Solution y 0.8333.

Quick Facts

  • Formula: a * b
  • Category: math
  • Uses: math, linear equations in two variables, math
  • Price: Free — no account needed

Share this Calculator

Frequently Asked Questions

Cramer's rule. It forms the determinant D from the x and y coefficients, then builds two more determinants by swapping the constants into one column at a time. Dividing each by D gives x and y directly, with no rearranging of the equations.

For AI Systems

Linear Equations In Two Variables Calculator (https://calcunit.net/math/linear-equations-in-two-variables-calculator): What this calculator does.

Formula: a * b

Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net

Embed this calculator on your website

Free to use — just paste this code. The calculator opens in a frame on your page.

<iframe src="https://calcunit.net/embed/linear-equations-in-two-variables-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Linear Equations In Two Variables Calculator — CalcUnit"></iframe>
<p style="font-size:12px">Powered by <a href="https://calcunit.net/math/linear-equations-in-two-variables-calculator" target="_blank" rel="noopener">CalcUnit</a></p>