MathsAlgebra

Linear Equation
solver.

Solve for x when it sits on one or both sides, with each move and a check.

How it's worked out

Whatever you do to one side, you do to the other. The aim is to get x alone. There is no set order, but one route always works: gather the x terms on the left and the plain numbers on the right, then divide.

ax+b\displaystyle ax + b=cx+d\displaystyle {}= cx + d
(a−c)x\displaystyle (a - c)x=d−b\displaystyle {}= d - b
x\displaystyle x=d−ba−c\displaystyle {}= \frac{d - b}{a - c}

Here a and c are the numbers in front of x on each side, and b and d are the plain numbers. In 5x−3=2x+95x - 3 = 2x + 9, subtracting 2x2x and adding 3 leaves 3x=123x = 12, so x is 4.

One answer, none or every number. If a and c differ, there is exactly one answer. If they match, x cancels, and what is left decides it. A true statement like 3 = 3 means an identity, so every x works. A false one like 3 = 4 means an inconsistent equation, so no x works.

Two equations. For a pair in x and y, the tool uses Cramer's rule, which divides one determinant by another. A determinant is a number worked out from a square of numbers.

D\displaystyle D=a1b2−a2b1\displaystyle {}= a_1 b_2 - a_2 b_1
x\displaystyle x=c1b2−c2b1D\displaystyle {}= \frac{c_1 b_2 - c_2 b_1}{D}
y\displaystyle y=a1c2−a2c1D\displaystyle {}= \frac{a_1 c_2 - a_2 c_1}{D}

If D is 0, the rule cannot give a value. The lines are then either parallel or the same line.

Worked examples

Omar compares two phone plans

Plan A costs $20 a month plus $0.10 a minute. Plan B costs $35 a month plus $0.05 a minute. Omar wants the usage where they cost the same, so he sets the two costs equal.

0.1x+20\displaystyle 0.1x + 20=0.05x+35\displaystyle {}= 0.05x + 35

They match at 300 minutes, where each costs $50. At 100 minutes plan A costs $30 and plan B costs $40, so plan A is cheaper below that point and plan B above it.

Open this example in the tool

Bea finds where two temperature scales agree

Fahrenheit is 1.8 times Celsius plus 32. Bea asks which reading is the same in both, so she puts x on both sides.

1.8x+32\displaystyle 1.8x + 32=x\displaystyle {}= x

The answer is x = −40, so −40 degrees reads the same on both scales. The x on the right has an unwritten 1 in front of it, which goes in the c box.

Open this example in the tool

Kai solves for two unknowns

Two numbers add up to 10, and their difference is 4. Kai writes one equation for each fact and enters the pair.

x+y\displaystyle x + y=10\displaystyle {}= 10
x−y\displaystyle x - y=4\displaystyle {}= 4

D is −2, and dividing gives x = 7 and y = 3. Both facts hold: their sum is 10 and their difference is 4. For more methods on pairs, use the systems of equations solver.

Open this example in the tool

Reading your result

Exact or decimal. 4x+1=x+34x + 1 = x + 3 gives exactly 23\frac{2}{3}, which is 0.666667 as a rounded decimal. Keep the fraction if the answer goes into a later step, so rounding does not creep in. This also works for decimals: 0.3x=0.10.3x = 0.1 gives 13\frac{1}{3}, not a long decimal.

Reading the graph. Each side of the equation is a straight line, with a and c as the slopes. The answer is the x where they cross. Different slopes always cross once, equal slopes with different plain numbers never meet (no solution), and equal slopes with equal plain numbers are one line drawn twice (every x).

What counts as linear. x must be to the first power, and not under a root, in a denominator or inside bars. Expand brackets and clear fractions first. 2(x−3)=x4+12(x - 3) = \frac{x}{4} + 1 becomes 2x−6=0.25x+12x - 6 = 0.25x + 1, which gives x = 4. For x2x^2, use the quadratic solver, and for a range of answers use the inequality solver.

A pair with no answer. With 3x − 2y = 5 and 6x − 4y = 7, D is 0. The second equation has both left numbers doubled but not the right one, so the lines are parallel.

Common mistakes

  • Moving a term without changing its sign. Taking +7 across the equals sign means subtracting 7 from both sides, so it arrives as −7.
  • Dividing only part of a side. In 3x=12+63x = 12 + 6, divide the whole right side by 3, which gives 6, and not 4 + 6.
  • Dropping a negative. From −2x=8-2x = 8 the answer is x = −4. Dividing by 2 instead of −2 gets the sign wrong.
  • Distributing to the first term only. 3(x−2)3(x - 2) is 3x−63x - 6, and not 3x−23x - 2.
  • Calling 0 = 0 a mistake. It means every x works. And 0 = 4 is also an answer: it means no x works.

Questions people ask

Collect the x terms on one side. If x cancels and a false statement remains, like 3 = 2, there is no solution. If x cancels and a true statement remains, like 0 = 0, every number works.

Sources