Linear Equation Solver
Table of Contents
- Linear equation definition
- Parts of a linear equation
- How to solve a linear equation
- Special cases
- Frequently asked questions
Linear equation definition
A linear equation in one variable is an equation in which the unknown, x, appears only to the first power: there is no x², no √x and no x in a denominator. Every linear equation can be rearranged into the standard form:
a * x + b = 0
where a and b are known numbers and a is not zero. A linear equation has exactly one solution.
It is called linear because its graph, y = a * x + b, is a straight line, and the solution is the point where that line crosses the x-axis.
Working out a price before tax, a travel time at a constant speed, or how many items fit a budget all come down to a linear equation. For two or three unknowns at once, see the system of 2 equations and the system of 3 equations solvers.
Parts of a linear equation
You enter the coefficient (a) and the constant (b), and the tool shows the solution (x).
Coefficient (a)
The coefficient is the number that multiplies the unknown x. It can be any number except zero, positive or negative, whole or decimal. On the graph it is the slope: the larger it is, the steeper the line.
Constant (b)
The constant (or constant term) is the number on its own, without x. On the graph it is where the line crosses the y-axis.
Solution (x)
The solution (or root) is the value of x that makes the equation true. Move b to the other side and divide by a:
x = -b / a
How to solve a linear equation
Any linear equation can be solved in three steps:
- Bring it to standard form. Move every term to the left side, so that the right side is 0, and combine the x terms and the plain numbers.
- Isolate the x term. Subtract b from both sides:
a * x = -b - Divide by the coefficient.
x = -b / a
Example: solve 3x + 7 = 19.
- Standard form:
3x + 7 - 19 = 0, which is3x - 12 = 0, soa = 3andb = -12. - Isolate:
3x = 12 - Divide:
x = 12 / 3 = 4
Putting it back into the equation confirms it: 3 × 4 + 7 = 19.
Special cases
When the coefficient a is 0, the equation has no x left:
- No solution: if
a = 0and b isn't, the equation readsb = 0, which is never true. For example,0x + 5 = 0has no solution; its line is parallel to the x-axis and never crosses it. - Infinitely many solutions: if
a = 0andb = 0, the equation reads0 = 0, which is true for every x.
In both cases this tool doesn't show a solution.
Frequently asked questions
How do you solve ax + b = 0?
Subtract b from both sides and divide by a: x = -b / a. For example, 2x + 6 = 0 gives x = -6 / 2 = -3.
How do you solve a linear equation with x on both sides?
Move all the x terms to one side and all the numbers to the other. For 5x - 3 = 2x + 9, subtract 2x from both sides to get 3x - 3 = 9, add 3 to get 3x = 12, and divide by 3 to get x = 4.
What makes an equation linear?
The unknown appears only to the first power and is never multiplied by itself. 4x - 1 = 0 is linear, while x² - 1 = 0 is a quadratic equation.