Math Solver

Use ^ for powers, / for fractions, brackets for grouping, e.g. 3(x-2) = 2x + 4. Functions: sqrt, abs, ln, log, sin, cos, tan, exp; constants pi, e.

How to use the math solver

  1. 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.
  2. System of equations: choose 2 or 3 equations, type the coefficients and pick Cramer’s rule or Gaussian elimination.
  3. 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.

3(x − 2) = 2x + 4 3x − 6 = 2x + 4 expand the bracket x − 6 = 4 subtract 2x from both sides x = 10 add 6 to both sides

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:

x = (−b ± √(b² − 4ac)) / 2a

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.

DiscriminantRoots
D > 0, perfect squareTwo rational roots; the quadratic factors
D > 0, not a perfect squareTwo irrational roots, e.g. 1 ± √2
D = 0One repeated real root, x = −b/2a
D < 0Two 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

Math Solver by AllOnlineCalcs