What is a linear equation?
A linear equation in one variable is an equation of the form a times x plus b equals 0. The default on this page is 2x minus 6 equals 0, and its solution is x equals 3, because 2 times 3 minus 6 is 0. The word linear means the graph is a straight line, and the solution is the point where that line crosses the x-axis.
Linear equations are the simplest equations with an unknown, and they are also the most common. A phone plan that costs 500 rupees plus 2 rupees a minute, a taxi fare with a base charge plus a per-kilometre rate, a recipe scaled up for more people — all of them are linear equations waiting to be solved.
This calculator takes a and b and gives you x, plus a check row that plugs x back into the equation. The result updates live as you type. Nothing is uploaded and there is no sign-up, so you can check a homework answer in seconds.
How a linear equation calculator works
The calculator uses one step: x equals minus b divided by a. For the default, a is 2 and b is minus 6, so x is 6 divided by 2, which is 3. The check row then computes a times x plus b: 2 times 3 minus 6 is 0, which confirms the answer. If the check is not 0, the answer is wrong.
The formula comes from undoing the operations in reverse. The equation says a times x plus b equals 0. Subtract b from both sides to get a times x equals minus b, then divide both sides by a to get x equals minus b divided by a. Each step keeps the equation balanced, which is the whole rule of solving equations.
If a is zero, there is no x term at all, and the equation is either always true or never true. The equation 0x plus 5 equals 0 has no solution, because 5 never equals 0. The calculator shows dashes for that case instead of dividing by zero.
The coefficients a and b, explained
The coefficient a is the number multiplying x, and it sets the slope of the line. A large a means the line is steep and x is small; a small a means the line is shallow and x is large. For 2x minus 6 equals 0, a is 2, so the line rises 2 units for every 1 unit across, and the root is 3.
The constant b is the value of the expression when x is 0, and it sets where the line crosses the y-axis. For 2x minus 6, b is minus 6, so the line crosses the y-axis at minus 6 and the x-axis at 3. Changing b slides the line up or down and moves the root with it.
The sign of b is the detail people get wrong most often. In 2x minus 6, b is minus 6, so minus b is plus 6, and x is 3. In 2x plus 6, b is plus 6, so minus b is minus 6, and x is minus 3. The formula x equals minus b divided by a exists to catch exactly this sign flip.
A worked example: 2x − 6, 4x + 8, and 5x + 10
The default on this page is 2x minus 6 equals 0. Here a is 2 and b is minus 6, so x is 6 divided by 2, which is 3. The check is 2 times 3 minus 6, which is 0. The answer is exact and the check confirms it in the same view.
Try a is 4 and b is 8, which is 4x plus 8 equals 0. Then x is minus 8 divided by 4, which is minus 2. The check is 4 times minus 2 plus 8, which is minus 8 plus 8, which is 0. A negative root is perfectly normal: it means the line crosses the x-axis to the left of the origin.
Try a is 5 and b is 10, which is 5x plus 10 equals 0. Then x is minus 10 divided by 5, which is minus 2 again, and the check is 5 times minus 2 plus 10, which is 0. The same root from a different equation is a coincidence of the numbers, not a rule — the root depends on the ratio of b to a, not on either number alone.
Where linear equations actually get used
Money is the biggest everyday use. A plumber charges 500 rupees to visit plus 300 rupees an hour: the bill is 500 plus 300 times the hours. Set the bill equal to 2,000 and solve: 300 times the hours equals 1,500, so the hours are 5. That is a linear equation, solved the same way this page solves 2x minus 6 equals 0.
Science uses linear equations for calibration. A thermometer that reads 32 at freezing and 212 at boiling converts between scales with a linear formula. A spring stretches in proportion to the force applied, which is Hooke's law, a linear equation. Whenever two quantities grow in proportion, a linear equation describes them.
Business uses linear equations for break-even analysis. If fixed costs are 50,000 rupees and each unit contributes 250 rupees, the break-even point is 200 units: 250 times the units equals 50,000. The break-even calculator does this with the business numbers filled in, while this page does the raw algebra.
Linear equation calculator vs quadratic equation calculator
A linear equation has one root and a straight-line graph. A quadratic equation has up to two roots and a parabola for a graph. The linear equation 2x minus 6 equals 0 has the single root 3, while the quadratic x squared minus 3x plus 2 equals 0 has the roots 2 and 1. The tools solve different equations with different formulas.
Use the linear calculator when the highest power of x is 1. Use the quadratic equation calculator when the highest power is 2. If you type a quadratic with a equal to 0 into the quadratic page, it tells you to come here, because the x squared term has vanished and the equation is linear.
Systems of equations are the next step: two linear equations with two unknowns, solved together. The system of equations calculator handles those with Cramer's rule. Linear, quadratic and systems form the core toolkit of school algebra, and this page covers the simplest of the three.
Common linear equation mistakes
The first mistake is the sign. In 2x minus 6 equals 0, x is plus 3, not minus 3, because minus b is plus 6. In 4x plus 8 equals 0, x is minus 2, not plus 2. Always write minus b explicitly before dividing, and the sign will take care of itself.
The second mistake is dividing only part of the equation. When you divide by a, you divide the whole side, not just one term. In 2x equals 6, dividing by 2 gives x equals 3, because both sides are divided. Dividing only the 6 and leaving the 2x alone is the error that produces x equals 6.
The third mistake is forgetting the check. Plugging the answer back into the original equation takes five seconds and catches almost every arithmetic slip. This page does the check for you in the second row: if it does not read 0, the root is wrong.
How to use this linear equation calculator
Type a and b into the two boxes. The default is a is 2 and b is minus 6, giving x equals 3. The result updates live as you type, so you can change the numbers and watch the root move.
Read the check row every time. It plugs x back into a times x plus b and should read 0. A check of 0 means the answer is right; anything else means a number was mistyped. If a is 0, both rows show dashes, because the equation has no x term to solve for.
Everything runs in your browser. No account, no upload, no data sent anywhere. Use it for homework, for pricing problems, or alongside the quadratic equation calculator when a problem mixes linear and quadratic equations.