The formula
ax + b = cx + d → x = (d − b) ÷ (a − c)
Why it works
A linear equation says two expressions are equal. Solving it means isolating x, and the only rule you need is that whatever you do to one side you do to the other. Collect the x terms on one side, the numbers on the other, and divide.
How to solve it by hand
- Move every x term to the left by subtracting cx from both sides
- Move every constant to the right by subtracting b from both sides
- You now have (a − c)x = d − b
- Divide both sides by (a − c)
What is worth knowing
Two cases catch people out, and both happen when a equals c. If the constants also match, the x cancels and you are left with something like 5 = 5: true for every value, so the equation has infinitely many solutions. If the constants differ, you get 5 = 7, which is false for every value, so there is no solution at all. Neither is an error in your working — they are genuine answers, and recognising them is most of what a first algebra course is teaching.