How to use the math solver
- Equation solver: type one equation in x, such as
3(x-2) = 2x + 4, or tap an example. The answer updates as you type. If you leave out “=”, the expression is set equal to 0. - System of equations: choose 2 or 3 equations, type the coefficients and pick Cramer’s rule or Gaussian elimination.
- Quadratic formula: enter a, b and c to get the roots, discriminant, vertex, axis of symmetry and vertex form.
Answers are exact whenever possible, as integers, fractions, simplified square roots such as 1 + √2, and complex numbers in a + bi form. A decimal is shown alongside. Each real answer is substituted back into your original equation as a check.
Solving linear equations
A linear equation has x only to the first power. Expand any brackets and collect the x terms on one side and the numbers on the other. Then divide by the coefficient of x.
Check: 3(10 − 2) = 24 and 2(10) + 4 = 24 ✓. If the x terms cancel completely, you get either a true statement such as 6 = 6, which holds for every x, or a false one such as 0 = 1, which has no solution.
Solving quadratic equations
Write the equation as ax² + bx + c = 0 and compute the discriminant D = b² − 4ac. Then apply the quadratic formula:
Example: x² − 5x + 6 = 0 has a = 1, b = −5, c = 6, so D = 25 − 24 = 1. Then x = (5 ± 1) / 2, giving x = 2 or x = 3, and the quadratic factors as (x − 2)(x − 3). For x² + 2x + 5 = 0, D = 4 − 20 = −16, so the roots are complex: x = −1 ± 2i. The vertex of y = ax² + bx + c is at x = −b/2a. For 2x² − 4x − 6 that is (1, −8), and the roots are −1 and 3.
| Discriminant | Roots |
|---|---|
| D > 0, perfect square | Two rational roots; the quadratic factors |
| D > 0, not a perfect square | Two irrational roots, e.g. 1 ± √2 |
| D = 0 | One repeated real root, x = −b/2a |
| D < 0 | Two complex conjugate roots p ± qi |
Solving cubic and higher polynomials
For x³ − 6x² + 11x − 6 = 0, the rational root theorem says any rational root divides 6. Testing ±1, ±2, ±3, ±6 shows x = 1 works. Synthetic division by (x − 1) leaves x² − 5x + 6, which factors as (x − 2)(x − 3). The solutions are x = 1, 2, 3. When no rational root exists, as in x³ − 2x − 5 = 0, the solver uses Cardano’s formula and reports x ≈ 2.094551482 plus a complex pair. There is no general formula in radicals for degree 5 and above, so those roots are found numerically.
Systems of linear equations
Cramer’s rule divides determinants. For 2x + 3y = 8 and x − y = −1, D = 2(−1) − 3(1) = −5, Dx = 8(−1) − 3(−1) = −5 and Dy = 2(−1) − 8(1) = −10. So x = −5/−5 = 1 and y = −10/−5 = 2. Gaussian elimination uses row operations to reduce the augmented matrix to reduced row-echelon form. It also handles a zero determinant. A row reading 0 = k means no solution, and a zero row means infinitely many.
Non-polynomial equations
Equations such as 2^x = 10, cos(x) = x or ln(x) = 1 have no algebraic steps in general. The solver scans x from −1000 to 1000, finds every sign change and refines it by bisection. For 2^x = 10 it returns x ≈ 3.321928095, which is log₂ 10. Periodic equations such as sin(x) = 0.5 have infinitely many solutions, so the 12 closest to zero are shown.
Sources
- OpenStax, College Algebra 2e: linear, quadratic and polynomial equations; systems of equations and Cramer’s rule.
- NIST Digital Library of Mathematical Functions §1.11: zeros of polynomials (Cardano’s and trigonometric solutions of the cubic).
- Burden & Faires, Numerical Analysis: bisection, Newton’s method and simultaneous polynomial root finding.