Linear Equation Solver
To solve a linear equation ax + b = cx + d, collect the x terms on one side and the numbers on the other: x = (d − b) ÷ (a − c). For 3x + 5 = x + 13 the solution is x = 4, and both sides equal 17.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
What Is a Linear Equation?
A linear equation in one variable is an equation in which the unknown x appears only to the first power, with no squares, roots or products of unknowns. Examples include 3x + 5 = 17 and 3x + 5 = x + 13. Its graph is a straight line, and solving it means finding the one x-value that makes both sides equal.
Linear equations are the most common type of equation in everyday life: working out when two prices or rates match, how many hours of work are needed, how many items to sell to break even. The same idea underlies every more advanced equation, because solving anything algebraic boils down to doing the same operation to both sides until x stands alone.
Three Possible Outcomes
| Situation | What happens | Example | Result |
|---|---|---|---|
| a ≠ c | The x terms do not cancel | 3x + 5 = x + 13 | One solution, x = 4 |
| a = c, b ≠ d | The x terms cancel, leaving a false statement | 2x + 3 = 2x + 5 | No solution |
| a = c, b = d | Both sides are identical | 2x + 3 = 2x + 3 | Infinitely many solutions |
Solving ax + b = cx + d
aandcare the coefficients of x on the left and right sides.banddare the constants on the left and right sides.- Step one subtracts cx from both sides and subtracts b from both sides.
- Step two divides both sides by (a − c).
The golden rule is that whatever you do to one side, you must do to the other. If you have a pair of equations in two unknowns, use the system of equations calculator.
How Is It Calculated? Worked Examples
3x + 5 = x + 13
- Subtract x from both sides: 2x + 5 = 13.
- Subtract 5 from both sides: 2x = 8.
- Divide both sides by 2: x = 4.
- Check: left side 3(4) + 5 = 17, right side 4 + 13 = 17 ✓.
No Solution and Infinitely Many Solutions
- 2x + 3 = 2x + 5: subtracting 2x leaves 3 = 5, which is never true. There is no solution.
- 2x + 3 = 2x + 3: subtracting 2x leaves 3 = 3, which is always true. Every x works.
A Taxi Comparison
Company A charges a $3 fee plus $2 per km. Company B charges $1 plus $2.50 per km. They cost the same when 3 + 2x = 1 + 2.5x. Subtract 2x and 1: 2 = 0.5x, so x = 4 km. For trips shorter than 4 km, Company B is cheaper because of its lower starting fee, while for longer trips Company A wins.
With a Fractional Answer
2x + 3 = 2.5x + 1 gives 0.5x = 2, so x = 4 and each side equals 11. Not every equation gives a whole number, and the solution may be a decimal or fraction.
How to Use This Linear Equation Solver
- Write your equation as ax + b = cx + d. If a term is missing, use 0 for it.
- Enter a, b, c and d. For 3x + 5 = x + 13, enter 3, 5, 1, 13. For 4x = 20, enter 4, 0, 0, 20.
- Read the solution for x, or the message for no solution or infinitely many.
- Open the steps to follow the algebra, and use the check lines showing both sides at the solution.
Where Linear Equations Are Used
- Budgeting and pricing: finding the break-even point between two plans, such as phone tariffs or taxi fares.
- Science: unit conversions and rates, such as distance = speed × time.
- Business: cost and revenue lines meeting at the break-even quantity.
- Everyday puzzles: age problems, mixing and sharing problems.
- Higher mathematics: every system of linear equations and every line equation builds on this skill.
What Are the Most Common Mistakes With the Linear Equation Solver?
- Changing only one side. Every operation must be applied to both sides.
- Sign errors when moving terms. Moving +5 across the equals sign makes it −5.
- Dividing only part of an expression. If you divide by 2, you must divide every term.
- Forgetting to check. Substitute the answer back to catch mistakes.
- Misreading the special cases. “No solution” is not the same as “x = 0”.
- Applying it to non-linear equations. If x is squared, use the quadratic solver instead.
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
- OpenStax: algebra and calculus textbooks
- NIST Digital Library of Mathematical Functions
- Wolfram MathWorld
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
How do you solve a linear equation?
Move all x terms to one side and all numbers to the other, then divide by the coefficient of x. For 3x + 5 = x + 13: 2x = 8, so x = 4.
What does “no solution” mean?
The equation reduces to a false statement such as 3 = 5, which happens when the x terms cancel but the constants differ. No value of x can satisfy it.
What does “infinitely many solutions” mean?
The equation reduces to a true statement such as 3 = 3, so every value of x makes both sides equal.
How do I check my solution?
Substitute x into both sides of the original equation. If both sides give the same number, the solution is right. For x = 4: 17 = 17.
Can the solution be a fraction or decimal?
Yes. Linear equations often have non-integer solutions, such as x = 2.5 or x = 7/3.
What is the difference between a linear equation and an inequality?
An equation has an equals sign and usually one solution. An inequality uses <, >, ≤ or ≥ and has a whole range of solutions.