Linear Equation Solver | Solve ax+b=c
Solve linear equations in one variable (ax + b = c) with step-by-step solutions.
What Is the Linear Equation Solver | Solve ax+b=c?
The Linear Equation Solver finds exact solutions for one-variable equations (ax + b = c) and two-variable systems (2×2). It shows every algebraic step, classifies special cases (no solution, infinite solutions), converts results to slope-intercept form for graphing, and verifies solutions by substitution.
- ›One-variable mode: solves ax + b = c with step-by-step working; handles a=0 edge cases.
- ›2×2 system mode: uses Cramer's Rule (determinant method) to solve two simultaneous equations; detects parallel lines (no solution) and identical lines (infinite solutions).
- ›Slope-intercept output: converts ax + by = c to y = mx + b form for graphing.
- ›Solution verification: substitutes the answer back into the original equation(s) to confirm.
- ›Fraction-friendly: displays solutions as exact fractions when they aren't whole numbers.
- ›Preset problems: one-click loading of real-world algebra problems (distance/rate, cost/profit, mixture).
Formula
| Mode | Formula | Cramer's Rule |
|---|---|---|
| One variable | ax + b = c | x = (c − b) / a |
| Two variables (x) | a₁x + b₁y = c₁, a₂x + b₂y = c₂ | x = (c₁b₂ − c₂b₁) / D |
| Two variables (y) | same system | y = (a₁c₂ − a₂c₁) / D |
| Determinant D | — | D = a₁b₂ − a₂b₁ |
How to Use
- 1Select mode: "One variable" (ax + b = c) or "Two variables" (2×2 system).
- 2For one variable: enter a, b, and c. For two variables: enter all 6 coefficients for the two equations.
- 3Press Solve (or Enter) to see the solution, step-by-step working, and solution verification.
- 4For 2×2 systems, toggle "Show slope-intercept form" to convert both equations to y = mx + b for graphing.
- 5Use preset problems (break-even analysis, mixture problems, distance problems) to see worked examples.
- 6Check the "Show determinant" toggle to see D = a₁b₂ − a₂b₁ and how Cramer's Rule applies.
- 7Click Reset (or Escape) to clear all fields.
Example Calculation
Example 1, One variable
Solve: 3x + 7 = 22
Example 2, 2×2 system
Solve: 2x + 3y = 12 and 4x − y = 10
Understanding Linear Equation | Solve ax+b=c
Why Linear Equations Are Fundamental
Linear equations model any relationship where one quantity changes at a constant rate relative to another, the most common type of relationship in science, economics, and everyday reasoning. From Ohm's Law (V = IR) to cost analysis (total cost = fixed cost + unit cost × quantity) to geometric problems (distance = rate × time), linear equations describe the world's most tractable relationships.
The one-variable case (ax + b = c) has exactly one solution when a ≠ 0, which can always be found by isolating x. The two-variable case (a system of two equations) has exactly one solution when the lines are not parallel, found by substitution, elimination, or Cramer's Rule (the determinant method).
Cramer's Rule: How It Works
Cramer's Rule solves a system of linear equations using determinants. For a 2×2 system:
- ›The coefficient determinant D = a₁b₂ − a₂b₁ (the "denominator" for both variables)
- ›x = D_x / D where D_x replaces the x-coefficients column with the constants: c₁b₂ − c₂b₁
- ›y = D_y / D where D_y replaces the y-coefficients column with the constants: a₁c₂ − a₂c₁
- ›If D = 0, the system either has no solution (lines parallel, inconsistent) or infinite solutions (same line, dependent)
Cramer's Rule generalizes to 3×3 and larger systems using 3×3 determinants, and is the theoretical foundation for matrix inversion (Ax = b → x = A⁻¹b). For large systems, Gaussian elimination is computationally more efficient, but Cramer's Rule is elegant for 2×2 and 3×3 hand calculations.
Real-World Applications
- ›Break-even analysis: revenue = price × quantity; cost = fixed + variable × quantity. Set equal: solve for break-even quantity.
- ›Mixture problems: "How much of solution A (30% salt) and solution B (10% salt) gives 100 L at 18%?" → system of two linear equations.
- ›Distance/rate problems: two trains, speeds, and times, often lead to a 2×2 system for relative speeds or departure times.
- ›Physics: Kirchhoff's voltage laws in circuits produce systems of linear equations with as many unknowns as there are loops.
- ›Economics: supply and demand equilibrium is the intersection of two linear functions, a 2×2 system.
Slope-Intercept Form and Graphing
The standard form ax + by = c is algebraically clean but not ideal for graphing. Converting to slope-intercept form y = mx + b makes the behavior immediately visible:
- ›Slope m = −a/b tells you how steeply the line rises or falls
- ›Y-intercept b = c/b tells you where the line crosses the y-axis
- ›Parallel lines have the same slope (m₁ = m₂) but different intercepts, no intersection, no solution
- ›Identical lines have the same slope AND intercept, infinite solutions
- ›Perpendicular lines have slopes that are negative reciprocals: m₁ × m₂ = −1
Frequently Asked Questions
What makes an equation "linear"?
A linear equation has each variable raised only to the first power, no x², no √x, no x·y products, no sin(x). The graph is always a straight line (in 2D) or a flat plane (in 3D).
The term "linear" comes from the Latin "linea" (line), solution sets form lines, planes, or hyperplanes. Non-linear equations (quadratic, trigonometric, exponential) produce curved graphs and are generally harder to solve. Linearity makes systems tractable: every linear system has either exactly one solution, no solution, or infinitely many, those three and nothing else.
What is the difference between substitution and elimination methods for 2×2 systems?
Substitution: solve one equation for one variable (e.g., y = (c₁ − a₁x)/b₁) then substitute into the other equation. Best when one equation already has a simple isolated variable like y = 3x + 2.
Elimination (addition method): multiply equations by constants so that one variable has the same coefficient in both, then add/subtract to eliminate it. Best for equations in standard form. Both methods always give the same answer, choose whichever produces simpler arithmetic. Cramer's Rule is a systematic, determinant-based version of elimination that works without case-by-case choices.
When does a 2×2 linear system have no solution?
No solution occurs when the two lines are parallel, they never intersect. Algebraically, this happens when the determinant D = a₁b₂ − a₂b₁ = 0 (same slope) but the constants don't match (different y-intercepts).
When you try elimination on a parallel system, you get a contradiction like 0 = 5, a false statement that signals no solution exists. The system is called inconsistent. The numerators D_x and D_y in Cramer's Rule are non-zero even though D = 0, confirming the inconsistency.
When does a 2×2 system have infinitely many solutions?
Infinite solutions occur when both equations describe the same line, one equation is just a scalar multiple of the other. Algebraically: D = 0 AND both numerators D_x = D_y = 0.
When you eliminate a variable, both sides cancel and you get a true identity like 0 = 0. The solution is all points on the line, expressed parametrically: for any value of t, x = t, y = (c − ax)/b. The system is called dependent. Check: if a₁/a₂ = b₁/b₂ = c₁/c₂, the equations are proportional and the system is dependent.
How do I solve a system with 3 unknowns?
Three equations with three unknowns require 3×3 determinants (Cramer's Rule extended) or Gaussian elimination (row reduction). The standard approach:
- ›Set up the augmented matrix [A|b] with coefficients and constants
- ›Apply elementary row operations (swap, scale, add multiples) to reach row echelon form
- ›Back-substitute to find each variable in turn
A unique solution exists if and only if the determinant of the coefficient matrix A is non-zero. Gaussian elimination is what all computational solvers use, it generalizes cleanly to any n×n system and is the basis for the LU decomposition used in numerical software.
How do I convert a word problem into a linear equation?
Three steps: (1) identify the unknowns and define variables; (2) translate each relationship sentence into an algebraic equation; (3) check for any implicit constraints.
Example: "Two trains start 300 miles apart, heading toward each other at 60 mph and 40 mph. When do they meet?" Let t = hours to meeting. Combined distance = 60t + 40t = 100t = 300 → t = 3 hours.
For two-variable problems, each condition gives one equation. The key skill is converting phrases like "total cost," "combined rate," "5 years older than," or "twice as many" into algebraic expressions.