What is a linear equation in one variable?
A linear equation can be rearranged into ax + b = 0, where a and b are constants and x appears only to the first power. Its graph is a straight line, and a typical one-variable equation has one value of x that makes the left and right sides equal. Parentheses, fractions, or x-terms on both sides can hide the linear structure without changing it.
For example, 3(x − 2) + 5 = 2x + 1 is linear because distribution and combining like terms reduce it to x − 1 = 0. An input containing x², x under a radical, or x in a denominator is not an ordinary linear equation and needs a different method.
How to solve a linear equation step by step
The balance principle is the central idea: applying the same valid operation to both sides preserves equality. A reliable order prevents unnecessary sign errors, especially when the variable appears on both sides.
- Remove grouping symbols with the distributive property and simplify fractions if needed.
- Combine like terms separately on the left side and the right side.
- Move variable terms to one side by adding or subtracting the same term on both sides.
- Move constants to the other side, then divide by the nonzero coefficient of x.
- Substitute the result into the original equation and compare both sides.
You may choose different but equivalent moves. Moving the smaller x-term often keeps the working coefficient positive, but it is not a mathematical requirement. What matters is that every transformation is valid and clearly applied to the whole side.
Worked example: 5x + 9 = 2x − 12
Start by collecting x-terms on the left. Subtract 2x from both sides: 5x + 9 − 2x = 2x − 12 − 2x, so 3x + 9 = −12. Next subtract 9 from both sides: 3x = −21. Divide both sides by 3 to obtain x = −7.
Check the original equation, not only the last simplified line. The left side is 5(−7) + 9 = −35 + 9 = −26. The right side is 2(−7) − 12 = −14 − 12 = −26. Because both sides match, −7 is a solution.
Linear equations with fractions or decimals
Fractions do not change the method. You can preserve exact rational arithmetic or multiply every term on both sides by the least common denominator. For x/3 + 1/2 = 5/6, multiplying the entire equation by 6 gives 2x + 3 = 5, then 2x = 2 and x = 1.
Terminating decimals can be converted to fractions or handled exactly by the calculator. Avoid rounding during intermediate work because a rounded coefficient can create a slightly incorrect final value. Exact fractions also make substitution checks easier to audit.
One solution, no solution, or infinitely many solutions
Not every linear equation ends with x equal to a number. If variable terms cancel and the remaining statement is false, such as 0 = 5, the equation has no solution. The two sides represent parallel expressions that never become equal.
If everything cancels to a true identity such as 0 = 0, every real value in the stated domain is a solution. For example, 2(x + 3) = 2x + 6 is true for all real x. A complete linear equation calculator must report these classifications rather than dividing by zero or inventing a single answer.
Common linear-equation mistakes to catch
Distribute a negative sign to every term inside parentheses, apply operations to the whole side, and keep fraction bars grouped. When dividing by a coefficient, divide every term in that line—not just the variable symbol. Also remember that moving a term is shorthand for adding its opposite to both sides.
Use the displayed steps as a diagnostic record. If your answer differs, locate the first unequal line, identify the rule used there, and redo that transformation before continuing.