AI Math Solver

Equation Solver with Step-by-Step Solutions

Solve linear, quadratic, polynomial and simultaneous equations with exact answers and a clear explanation of every step.

How to use the equation solver

  1. Enter your equation. Type it with an equals sign, for example 2x + 5 = 15 or x^2 - 5x + 6 = 0. For a system, separate the equations with commas. You can also scan or upload a printed equation.
  2. Press Solve Now. The engine rearranges the equation, recognises whether it is linear, quadratic, polynomial or a system, and chooses the right method automatically.
  3. Follow the steps and check the answer. Each move is shown in order, from collecting terms to the final substitution check, and the solutions appear in a green box you can copy or save as a PDF.

Free Equation Solver for Linear, Quadratic and Simultaneous Equations

An equation is a statement that two expressions are equal, and solving it means finding every value of the unknown that makes the statement true. That sounds simple, but the method changes completely depending on the type of equation. A linear equation needs only a few balancing moves, a quadratic needs factoring or a formula, and a system needs substitution or elimination. This equation solver identifies the type for you, applies the correct method and writes out each step so you can see how the answer was reached.

Every result is calculated with exact arithmetic by a computer algebra engine that runs in your browser. Fractions stay as fractions, square roots stay in surd form and complex roots are reported honestly when there are no real solutions. You also get a decimal approximation when it helps, so you can compare the result with a calculator or a graph.

Types of equations you can solve

The solver handles the equations that appear most often in school algebra, pre-calculus and introductory university courses.

  • Linear equations in one variable, such as 4x - 7 = 2x + 9, including equations with brackets and fractions.
  • Quadratic equations such as x^2 - 5x + 6 = 0 or 3x^2 = 2x + 8, solved with the discriminant and the quadratic formula, with factoring shown whenever the roots are rational.
  • Polynomial equations of degree three or higher, such as x^3 - 6x^2 + 11x - 6 = 0, solved by factoring and the zero product property.
  • Rational equations where the variable appears in a denominator, such as 1/x + 1/(x+2) = 1. Any value that would make a denominator zero is excluded from the answer.
  • Radical and exponential equations such as sqrt(x) = 4 or 2^x = 32.
  • Trigonometric equations such as sin(x) = 1/2, with the principal solutions shown.
  • Systems of linear equations in two or three unknowns, such as 2x + 3y = 7, x - y = 1.
  • Linear inequalities such as 2x - 3 > 5, written both as a simple inequality and in interval notation.

How linear equations are solved

A linear equation contains the variable only to the first power. The goal is to isolate the variable by doing the same thing to both sides, which keeps the equation balanced. The solver follows the standard sequence that teachers use.

  1. Expand and simplify. Brackets are multiplied out and like terms are combined on each side.
  2. Clear the fractions. If any coefficient is a fraction, both sides are multiplied by the least common denominator so the rest of the work uses whole numbers.
  3. Collect terms. Every term containing the variable moves to one side and every number moves to the other, changing sign as it crosses the equals sign.
  4. Divide by the coefficient. Both sides are divided by the number in front of the variable.
  5. Check. The solution is substituted back into the original equation to confirm that both sides are equal.

For example, with 3(x - 2) = 2x + 7 the bracket expands to 3x − 6. Collecting terms gives x = 13, and substituting shows that both sides equal 33. The final check step is included every time because it is the quickest way to catch an arithmetic slip in your own work.

Equation solver balancing both sides of a linear equation
A linear equation works like a balance: whatever you do to one side, you do to the other.

How quadratic equations are solved

A quadratic equation has the form ax² + bx + c = 0, with a not equal to zero. If your equation is written differently, the first step moves every term to one side so it matches this standard form. The solver then identifies the coefficients a, b and c and calculates the discriminant, Δ = b² − 4ac.

The discriminant tells you what kind of solutions to expect before you finish the calculation:

  • If Δ is positive, there are two different real solutions, and the graph of the quadratic crosses the x-axis twice.
  • If Δ is zero, there is one repeated real solution, and the graph just touches the x-axis.
  • If Δ is negative, there are no real solutions. The two solutions are complex numbers, written with i, where i² = −1.

When the roots are rational, the solver also shows the factored form, because factoring is often the fastest method in class. It then applies the quadratic formula, x = (−b ± √Δ) / (2a), and simplifies each branch. For x^2 - 5x + 6 = 0, the discriminant is 1, the factored form is (x − 2)(x − 3) = 0 and the solutions are x = 2 and x = 3.

Graph of a quadratic equation showing the two roots found by the equation solver
The real solutions of a quadratic equation are the points where its graph crosses the x-axis.

Polynomial equations of higher degree

For cubic and higher-degree equations, there is no simple general formula that students are expected to use. The practical method is to factor the polynomial and use the zero product property: if a product of factors equals zero, at least one factor must be zero. The solver moves everything to one side, factors the polynomial as far as possible over the rational numbers, sets each factor equal to zero and solves each small equation separately. For x^3 - 6x^2 + 11x - 6 = 0, the factored form (x − 1)(x − 2)(x − 3) = 0 leads directly to x = 1, 2 and 3.

When a polynomial does not factor neatly, the engine still finds the exact roots, which may include radicals or complex numbers, and lists approximate decimal values so you can check them on a graph.

Equations with fractions, roots and exponents

Rational equations need one extra precaution. Multiplying both sides by an expression that contains the variable can introduce values that make an original denominator zero. Those values are not allowed, so the solver checks each candidate and discards any that fail. When this happens, a step labelled "Discard values that make a denominator zero" explains why the list of solutions became shorter.

Radical equations such as sqrt(x + 3) = x - 3 can also produce extraneous solutions after squaring, and exponential equations such as 3^(2x) = 81 are solved by expressing both sides with the same base or by taking logarithms. In each case the final answer is checked against the original equation.

Solving systems of linear equations

A system is a set of equations that must all be true at the same time. With two unknowns, each linear equation describes a straight line, and the solution is the point where the lines meet. With three unknowns, each equation is a plane.

The solver uses the substitution method, which is easy to follow on paper:

  1. Solve the first equation for one variable.
  2. Substitute that expression into the remaining equations, which removes one unknown.
  3. Solve the smaller system that is left.
  4. Substitute back to find the remaining variables.

For 2x + 3y = 7 and x - y = 1, the first equation gives x = 7/2 − 3y/2. Substituting into the second equation leaves a single equation in y, which gives y = 1, and then x = 2. If the lines are parallel the system has no solution, and if they are the same line it has infinitely many. The solver reports both cases clearly.

Linear inequalities

Inequalities are solved like equations with one important difference: when you multiply or divide both sides by a negative number, the inequality sign flips. The solver points this out whenever it applies. The answer is shown in two forms, a simple statement such as x > 4 and the equivalent interval (4, ∞), so you can use whichever notation your course prefers.

Factoring, completing the square or the formula

There are three classic ways to solve a quadratic, and knowing when to use each one saves time in exams.

  • Factoring is fastest when the roots are whole numbers or simple fractions. Look for two numbers that multiply to ac and add to b. For x² − 5x + 6, those numbers are −2 and −3.
  • Completing the square rewrites ax² + bx + c as a(x + p)² + q. It is the method behind the quadratic formula and it is also how you find the vertex of a parabola, which makes it useful for graphing questions.
  • The quadratic formula always works, even when the roots are irrational or complex. It takes a little longer by hand, but it never fails, which is why the solver applies it in every case and adds the factored form when one exists.

A quick rule of thumb: calculate the discriminant first. If it is a perfect square such as 1, 4, 9 or 16, the quadratic factors over the rational numbers and factoring is a good choice. If it is not a perfect square, go straight to the formula.

Worked example with irrational roots

Consider x^2 - 4x + 1 = 0. Here a = 1, b = −4 and c = 1, so the discriminant is 16 − 4 = 12. Because 12 is not a perfect square, the equation does not factor nicely over the rational numbers, and the quadratic formula gives x = (4 ± √12) / 2. Simplifying √12 to 2√3 and dividing by 2 leads to the exact solutions x = 2 − √3 and x = 2 + √3, approximately 0.268 and 3.732.

The solver keeps the exact form and adds the decimals in brackets. Exact answers matter because many teachers and exam papers expect surds rather than rounded numbers, and because a rounded value substituted back into the equation will not give exactly zero.

Worked example of a system with three unknowns

For the system x + y + z = 6; x - y = 0; 2z = 4, the solver writes the three equations as a block, solves the first one for x, substitutes into the remaining equations and keeps reducing until each unknown is known. The result is x = 2, y = 2 and z = 2. You can enter three-variable systems with semicolons or commas between the equations, and the substitution steps show how one unknown disappears at each stage.

Tips for entering equations

  • Always include the equals sign. If you type only an expression such as x^2 - 5x + 6, this page assumes it equals zero.
  • Use ^ for powers and brackets around compound exponents, for example 2^(x+1).
  • Use brackets around numerators and denominators: (x+1)/(x-2) = 3.
  • Separate the equations in a system with commas, and use the same letters for the unknowns in each one.
  • For angles in degrees, add the degree sign. Otherwise trigonometric equations are solved in radians.
  • Any letter can be the unknown. The solver prefers x, then y, then t, and lists the variable it solved for in each step.

Common mistakes when solving equations

The step-by-step layout is designed to make these frequent errors easy to see when you compare your own work.

  • Forgetting to change the sign when moving a term across the equals sign.
  • Distributing a negative incorrectly, for example writing −(x − 3) as −x − 3 instead of −x + 3.
  • Dividing by a variable, which can lose a solution. Factoring is safer, which is why the solver factors instead.
  • Taking only the positive square root and missing the negative solution of a quadratic.
  • Keeping a forbidden value in a rational equation that makes a denominator zero.
  • Not checking the answer. Substituting back takes a few seconds and catches most arithmetic mistakes.

Checking solutions with a graph

A graph gives you an independent way to confirm an answer. To check a single-variable equation, move everything to one side so it reads f(x) = 0, then sketch or plot y = f(x). Each real solution is a point where the curve crosses the x-axis. For x^2 - 5x + 6 = 0, the parabola crosses at x = 2 and x = 3, matching the solver. If the curve never reaches the axis, the equation has no real solutions, which agrees with a negative discriminant.

For a system of two linear equations, plot both lines. The coordinates of the intersection point are the solution. Parallel lines that never meet mean there is no solution, and two lines that lie on top of each other mean there are infinitely many. Thinking about the picture behind the algebra makes the results easier to remember, and it helps you spot an answer that cannot possibly be right before you hand in your work.

Where equations are used

Solving equations is not only a school exercise. Engineers use them to size components, economists to find break-even points and scientists to model growth, motion and decay. Everyday questions such as how many hours you need to work to reach a savings goal, or what price gives a certain profit, are linear or quadratic equations in disguise. Being able to set up an equation and solve it confidently is one of the most useful skills in mathematics, and practising with clear worked steps is the fastest way to build it. For a deeper overview of the theory, the equation solving article on Wikipedia is a good next read.

Related tools on this site

If your problem includes calculus, the Derivative Calculator and the Integral Calculator show those methods step by step. To work with coefficients arranged in rows and columns, use the Matrix Calculator, which also solves determinant and inverse problems that appear in systems of equations. For mixed questions, the main AI Math Solver detects the topic automatically, and the Percentage Calculator handles everyday percent problems.

Frequently asked questions

Can the equation solver handle quadratic equations with no real solutions?

Yes. When the discriminant is negative, the solver explains that there are no real roots and gives the two complex solutions using i, together with the full working.

How do I enter a system of equations?

Type each equation with its own equals sign and separate them with commas, for example 2x + 3y = 7, x – y = 1. Systems of two or three linear equations are solved by substitution.

Does the solver show factoring for quadratics?

Yes. Whenever the roots are rational, the factored form is shown before the quadratic formula, so you can see both methods side by side.

Why did a solution disappear from my rational equation?

A value that makes any denominator in the original equation equal to zero is not allowed. The solver checks each candidate and removes those values, and it adds a step explaining why.

Can I solve equations with letters other than x?

Yes. Any single letter can be the unknown. If more than one letter appears, the solver chooses x first, then y, and states which variable it solved for.

Is the equation solver free to use?

Yes. It is completely free, needs no account and runs in your browser, so your equations are never stored on a server.

Scroll to Top