Linear Equation Solver (2×2)
Solve for x and y in a 2×2 system.
Result
How it is calculated
The tool solves two equations a1x + b1y = c1 and a2x + b2y = c2 with Cramer's rule. First it computes the determinant D = a1b2 − a2b1. Then x = (c1b2 − c2b1) / D and y = (a1c2 − a2c1) / D. All six numbers must be entered; a missing one gives no result. If D = 0 the lines are parallel or identical, so there is no single solution and the tool returns nothing. Answers are rounded to two decimals.
Worked example
Solve 2x + 3y = 13 and x − y = −1. Here a1=2, b1=3, c1=13, a2=1, b2=−1, c2=−1. D = 2·(−1) − 1·3 = −5. For x: (13·(−1) − (−1)·3) / −5 = −10 / −5 = 2. For y: (2·(−1) − 1·13) / −5 = −15 / −5 = 3. The solution is x = 2.00 and y = 3.00. Check: 2·2 + 3·3 = 13 and 2 − 3 = −1.
Common mistakes
- Writing the equation in a different form, such as 2x + 3y − 13 = 0, and entering −13 as c. The constant must be on the right side: c = 13.
- Dropping a sign, especially when a coefficient is negative, as with the −y term.
- Leaving a field empty when a variable is missing from an equation; every field needs a value, so enter 0 for the absent term.
- Expecting an answer for dependent equations such as x + y = 2 and 2x + 2y = 4; D is 0 and there are infinitely many solutions.
- Swapping the x and y coefficients between the two equations.
About this calculator
This solver finds x and y for a system of two linear equations in two unknowns, using elimination/substitution logic equivalent to Cramer's rule with determinants, and flags the system as having no solution (parallel lines) or infinite solutions (identical lines) when that's the case.
It's used by students checking algebra homework, and by anyone solving a real-world two-variable problem that reduces to simultaneous equations, like finding a break-even point, mixing two solutions to a target concentration, or balancing a simple budget with two constraints.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Each equation has to be written as ax + by = c, so move every term to the left and the constant to the right before typing. When the two lines are parallel or the same line, the determinant is zero and no answer appears; the tool cannot tell you which of the two cases you have. Before relying on the result, substitute x and y back into both original equations. Would you like a version for three unknowns?