Math · algebra and number theory

How do I solve this equation?

Seven of the most-asked algebra problems in one place, each solved with the standard method and the intermediate quantity that decides the answer — the discriminant, the determinant, the greatest common divisor — written out rather than hidden.

The working, not just the answer Quadratics, systems, matrices, logs, sequences, GCD and integrals 7 calculators inside

Your situation

Which equation are you looking at?

Each branch uses a different subset of the coefficient boxes below — the help text under each box tells you what it means once you have chosen. Quadratics are the most common starting point.

That's not my case

Fine-tune the estimate

Your coefficients

Every branch reads a different subset of these boxes. The example values solve a quadratic with two clean real roots; change only the ones your branch actually uses.

Quadratic: the x² coefficient. System and matrix: the top-left entry. Sequence: the first term a₁. GCD: the first number.

Quadratic: the x coefficient. System and matrix: the top-right entry. Sequence: the common difference d. GCD: the second number.

Quadratic: the constant term. System and matrix: the bottom-left entry. Unused in the other branches.

System and matrix: the bottom-right entry. Logarithm: the base b.

System: the right-hand side of the first equation, ax + by = e. Logarithm: the number x you are taking the log of.

System only: the right-hand side of the second equation, cx + dy = f.

Sequence branch only: which term you want, and how many terms to add up.

Integral branch only. Highest power first, separated by commas: "3, 0, -2, 5" means 3x³ − 2x + 5.

Mathematical result based on the inputs. Verify units, assumptions, and rounding before technical use.

How the total adds up

The working, step by step

Every intermediate value you would write down if you were doing this on paper, in the order you would write it.

Each branch breaks the deciding quantity into the parts it is built from — b² against 4ac in the discriminant, ad against bc in the determinant, the whole against the fractional part of a logarithm, the shared factor against what is left. When one slice outweighs the other, that is the answer changing shape.

    Quick answer

    What applies to you

    The sign of the discriminant b² − 4ac decides everything: two real roots, one double root, or none. Coefficients a, b and c from ax² + bx + c = 0

    Deadline:

    Frequently asked questions

    What is the quadratic formula and where does it come from?

    For ax² + bx + c = 0 with a ≠ 0, the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. It comes from completing the square on the general equation, which is why every quadratic yields to it, and why the ± produces exactly two roots counted with multiplicity. The expression under the root, b² − 4ac, is the discriminant, and its sign alone tells you whether those two roots are distinct reals, one repeated real, or a complex conjugate pair.

    What does the discriminant tell me?

    It tells you how the parabola meets the x-axis without you having to solve anything. Positive means it crosses at two distinct points and you get two real roots. Zero means it just touches the axis, giving one repeated root at the vertex. Negative means it never reaches the axis, so both roots are complex conjugates. In practice this is the first thing to compute, because it decides which of three answers you are even looking for.

    What is Cramer's rule?

    It solves a linear system by ratios of determinants. For ax + by = e and cx + dy = f, the main determinant is D = ad − bc, and the solution is x = (ed − bf) ÷ D and y = (af − ec) ÷ D. Each numerator is D with one column replaced by the right-hand side. It is exact, requires no elimination bookkeeping, and is genuinely convenient at 2×2 — but the number of determinants explodes with size, so nobody uses it beyond 3×3.

    What happens when the determinant is zero?

    The system has no unique solution and the matrix has no inverse. Geometrically, the two equations describe lines that are either parallel and never meet, or the same line met everywhere. Cramer's rule cannot separate those cases because both give a zero in the denominator; you have to look at whether the right-hand sides are in the same proportion as the coefficients. For a matrix, a zero determinant means it collapses the plane onto a line, which cannot be undone.

    How do I find the inverse of a 2×2 matrix?

    Swap the two diagonal entries, negate the two off-diagonal entries, and divide everything by the determinant. So the inverse of [[a, b], [c, d]] is (1 ÷ (ad − bc)) × [[d, −b], [−c, a]]. This shortcut is specific to 2×2 — it is the adjugate method, and at larger sizes the adjugate becomes far more work than Gaussian elimination. Always check your result by multiplying: the product must be the identity matrix.

    How does the change of base formula work?

    log_b(x) = ln(x) ÷ ln(b), and it works with any base on the right as long as you use the same one top and bottom, so log₁₀ works just as well as ln. It exists because calculators historically only had base 10 and base e keys. The formula also explains why all logarithm curves are the same shape scaled vertically: changing base is just multiplying by a constant.

    Why can't I take the logarithm of a negative number or of zero?

    Because there is no real exponent that produces a negative result from a positive base — raising a positive number to any real power always gives a positive number. Zero is out for the same reason from the other side: the exponent would have to run to negative infinity, so the log is unbounded rather than undefined-at-a-point. The base itself must be positive and different from 1, since 1 raised to anything is always 1 and could never reach a different x.

    What is the difference between an arithmetic and a geometric sequence?

    An arithmetic sequence adds a constant difference to each term, so it plots as a straight line: 3, 7, 11, 15. A geometric sequence multiplies by a constant ratio, so it curves: 3, 6, 12, 24. The distinction matters far outside the classroom, because compound interest, population growth and viral spread are all geometric, and treating them as arithmetic is what makes long-horizon estimates come out wildly low.

    How do I find the sum of an arithmetic sequence quickly?

    Multiply the number of terms by the average of the first and last terms: Sₙ = n(a₁ + aₙ) ÷ 2. The trick, attributed to a young Gauss, is that pairing the first term with the last, the second with the second-to-last and so on gives the same total every time. That is why the average of an arithmetic sequence is always exactly midway between its endpoints, which is a fast way to check any answer.

    What is the relationship between GCD and LCM?

    For any two positive integers, GCD(a, b) × LCM(a, b) = a × b. So once the Euclidean algorithm has given you the greatest common divisor, the least common multiple is a single division away. It also explains why two coprime numbers — GCD of 1 — have an LCM equal to their product, and why numbers that share a lot of factors have an LCM much smaller than their product. The identity holds for exactly two numbers, not three.

    How does the Euclidean algorithm find the GCD?

    Repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero; the last non-zero value is the GCD. For 48 and 18: 48 mod 18 = 12, 18 mod 12 = 6, 12 mod 6 = 0, so the GCD is 6. It is over two thousand years old and still one of the fastest algorithms in use, because the numbers shrink at least geometrically at every step.

    Why does an indefinite integral need a + C?

    Because differentiation destroys constants: x² + 1, x² + 7 and x² − 300 all have the same derivative 2x. Going backwards therefore cannot recover which constant was there, so the answer is a whole family of parallel curves, written with an arbitrary + C. You pin the constant down only when you have an extra condition, such as a known point the curve passes through. The one place the power rule breaks is the exponent −1, where ∫ 1/x dx = ln|x| + C.