Algebra

How to solve linear equations

To solve a linear equation, isolate the variable on one side by applying inverse operations in reverse order. Whatever operation you perform on one side of the equals sign, you must also apply to the other.

Formula

ax + b = c \;\Rightarrow\; x = \frac{c - b}{a}

In the equation ax + b = c, x is the unknown variable, a is the coefficient, and b and c are constant values.

Calculator

How to Solve a Linear Equation Step by Step

To find the unknown variable in a standard equation like ax + b = c, your goal is to get x completely by itself. Begin by undoing any addition or subtraction attached to the variable term. Subtract b from both sides of the equation to leave ax = c - b.

Next, undo the multiplication or division. Since a is multiplied by x, divide both sides by a. This leaves x = (c - b) / a. For example, if you have 3x + 5 = 20, subtract 5 from both sides to get 3x = 15, then divide both sides by 3 to reach x = 5.

If an equation contains fractions or brackets, clear them first. Expand brackets using the distributive property, multiply through by the common denominator to remove fractions, and combine like terms before isolating the variable.

Where Linear Equations Are Used

Linear equations are the foundation of secondary school algebra, appearing in GCSE, SAT, and ACT math tests. They are essential for understanding coordinate geometry, graphing straight lines, and setting up systems of equations.

Outside the classroom, you use linear equations whenever you calculate rates and budgets. Working out how many hours you must work at a set wage to afford a purchase, finding unit costs during shopping, or calculating fuel consumption all rely on this exact relationship.

In physics and chemistry, linear equations describe steady motion, Ohm's law (V = IR), and temperature conversions between Celsius and Fahrenheit.

Common Mistakes to Avoid

The most frequent error is applying an operation to only one side of the equals sign. Always remember that an equation is like a balanced scale; adding, subtracting, multiplying, or dividing must happen equally to both sides.

Watch your negative signs carefully. When subtracting a negative number, such as subtracting -4 from both sides, remember that subtracting a negative is equivalent to adding. Sign errors are the leading cause of incorrect solutions in algebra.

Another common slip is dividing incorrectly when a variable has a negative coefficient. If you have -2x = 10, you must divide by -2, not positive 2, giving x = -5.

Quick Mental Check and Substitution

You can always verify your answer by substituting your solution back into the original equation. Replace the variable with your result and calculate the arithmetic on the left-hand side. If it equals the right-hand side, your answer is guaranteed to be correct.

For the equation 3x + 5 = 20 with x = 5, calculate 3(5) + 5. This gives 15 + 5 = 20. Because 20 equals 20, the solution is verified.

Developing the habit of running this quick check takes only a few seconds and eliminates calculation errors on homework and exams.

Worked examples

Example 1Solve the equation 3 x + 5 = 20.

  1. Move the x terms to the left side and the numbers to the right side

    3x = 20 - (5)
  2. Simplify both sides

    3x = 15
  3. Divide both sides by the coefficient of x

    x = \frac{15}{3} = 5
  4. Check by substituting the result into the equation

    3 \cdot 5 + (5) = 20, \quad 20
Answerx = 5Verified by computation

Example 2Solve the equation 5 x - 7 = 2 x + 2.

  1. Move the x terms to the left side and the numbers to the right side

    5x - 2x = 2 - (-7)
  2. Simplify both sides

    3x = 9
  3. Divide both sides by the coefficient of x

    x = \frac{9}{3} = 3
  4. Check by substituting the result into the equation

    5 \cdot 3 + (-7) = 8, \quad 2 \cdot 3 + (2) = 8
Answerx = 3Verified by computation

Example 3Solve the equation 4 x + 9 = -1.

  1. Move the x terms to the left side and the numbers to the right side

    4x = -1 - (9)
  2. Simplify both sides

    4x = -10
  3. Divide both sides by the coefficient of x

    x = \frac{-10}{4} = -\frac{5}{2}
  4. Check by substituting the result into the equation

    4 \cdot (-\frac{5}{2}) + (9) = -1, \quad -1
Answerx = -2.5Verified by computation

Questions and answers

What is a linear equation in simple terms?

In a linear equation in one variable, the variable occurs only to the first power. Collect like terms on each side before isolating the unknown.

Why do you do the opposite operation to solve equations?

Inverse operations undo each mathematical step applied to the variable, allowing you to isolate the unknown term while keeping both sides balanced.

What do you do if there are variables on both sides of the equation?

Collect the variable terms on one side by adding or subtracting them across the equals sign, then move all constant numbers to the opposite side.

Can a linear equation have no solution?

Yes. If simplifying an equation leads to an impossible statement like 0 = 7, there is no solution. If it simplifies to a universally true statement like 3 = 3, there are infinitely many solutions.

Solve your own problem

Different numbers or a harder variant? Type it in and get the steps.

Enter solves, Shift+Enter adds a line