Linear Equation Calculator
Parentheses and the variable on both sides, the case a linear equation calculator is most useful for. Expand first, then collect everything onto one side.
Solution
- The equation
- x + 12 = 5x - 8
- Everything to one side
- -4x + 20 = 0
- Divide by -4
- x = 5
- Check Exactly zero, computed in fractions rather than decimals, so this is a proof rather than a round-off that looks close.
- putting x = 5 into -4x + 20 gives 0
- Linear and quadratic equations are solved exactly. Higher degrees start with the rational root theorem, which finds every rational root. What is left is solved exactly where a formula applies and numerically where none does, complex roots included, and every root is checked by substitution.
- Polynomials in one variable. Trigonometry, logarithms, roots of expressions and calculus are outside what this does, and it names them rather than failing obscurely.
How the Algebra Calculator works
A linear equation is one where the variable appears only to the first power: no x², no x in a denominator, no square root of x. However it is written, it can be rearranged into ax + b = 0, and its one solution is x = -b/a.
The work is in the rearranging. In 3(x + 4) - 2x = 5x - 8 the variable is on both sides and inside parentheses. Expand to get 3x + 12 - 2x = 5x - 8, combine like terms on the left to get x + 12 = 5x - 8, then move the x terms to one side and the numbers to the other: 20 = 4x, so x = 5.
Linear equations are also straight lines. In y = 2x + 3, the slope-intercept form, the slope is 2 and the y-intercept is 3, and fixing y at a value leaves the same one-variable problem as above. For where two lines cross, the system of equations calculator solves both at once.
Algebra Calculator FAQ
How do I solve for x?
Expand any brackets, collect like terms, move everything to one side so the equation reads something = 0, then divide by the coefficient of x. For 3(x + 4) - 2x = 5x - 8 that gives -4x + 20 = 0, so x = 5. Always substitute your answer back in to check it.
Why does this give fractions instead of decimals?
Because the fraction is the exact answer and the decimal is a rounding of it. 3x = 1 solves to exactly 1/3, and 0.3333333333 is a different number. Working in floating point makes x/3 + 1/6 = 1/2 solve to 0.9999999999999998: nearly right, which is worse than visibly wrong.
What does it mean when there is no solution?
The variable canceled out and left a false statement. 2(x + 1) = 2x + 3 simplifies to 2 = 3, which no value of x can fix. The opposite case is an identity, like 2(x + 1) = 2x + 2, where the variable cancels and leaves something true. Then every value works.
Can it solve cubic equations?
Yes. It first uses the rational root theorem: any rational root p/q has p dividing the constant term and q dividing the leading coefficient, which gives a finite list to test. Rational roots come out exactly. A factor with no rational roots is then solved numerically, complex roots included, and each root is checked by substitution.
More from the Algebra Calculator
Related calculators
- Fraction Calculator
- Factor Calculator
- Quadratic Formula Calculator
- System of Equations Calculator
- Log Calculator
- Distance Formula Calculator
- Slope Calculator
- Order of Operations Calculator
- Matrix Calculator
- Derivative Calculator
- Integral Calculator
- Pascal's Triangle
- Absolute Value Calculator
- Arithmetic Sequence Calculator