Skip to content
Tool Corner Articles
Maths · 3 min read

The discriminant, the GCD and the order of operations

Three bits of algebra do a disproportionate amount of work. One tells you whether a quadratic has any real answers before you try to find them. One tells you whether a fraction can be simplified. And one is the reason your calculator sometimes disagrees with you — and is right.

Written and reviewed by Jogeswar, MSc, PMP — Tool CornerChecked against the sources listed at the end of this article

The discriminant answers the question first

For a quadratic in the form ax² + bx + c, the discriminant is b² − 4ac. It is the part of the quadratic formula under the square root, and its sign settles the shape of the answer before you compute anything.

Take 2x² + 5x − 3 = 0. The discriminant is 5² − 4 × 2 × (−3) = 25 + 24 = 49. Positive, and a perfect square, so there are two real roots and they will be tidy: (−5 ± 7) ÷ 4 gives x = 0.5 and x = −3.

Three cases, and that is the whole story. Positive means two distinct real roots. Zero means one repeated root — x² − 4x + 4 has a discriminant of exactly 0 and its only root is x = 2, where the parabola touches the axis rather than crossing it. Negative means no real roots at all: x² + x + 1 gives 1 − 4 = −3, and the curve never reaches the x-axis. A calculator reporting "no real solutions" there is not failing; the answer genuinely is not a real number.

There is a free check once you have roots. Their sum should equal −b ÷ a and their product should equal c ÷ a. For our example: 0.5 + (−3) = −2.5, and −5 ÷ 2 = −2.5. Product: 0.5 × −3 = −1.5, and −3 ÷ 2 = −1.5. Both agree, so the roots are right. It takes ten seconds and catches sign errors, which are by far the most common mistake here.

GCD simplifies, LCM combines

The greatest common divisor is the largest number dividing both of two numbers; the lowest common multiple is the smallest number both divide into. They are the two halves of fraction arithmetic: GCD is what you cancel by, LCM is the denominator you convert to.

For 12 and 18, the GCD is 6 and the LCM is 36. For a less obvious pair, 84 and 126: GCD 42, LCM 252.

The two are locked together by a relationship worth knowing: GCD × LCM always equals the product of the original numbers. 42 × 252 = 10,584, and 84 × 126 = 10,584. So finding one gives you the other for free, and the identity is a reliable check on both.

In practice you meet GCD whenever a fraction looks ugly — 84/126 reduces by 42 to 2/3 — and LCM whenever you need a common denominator, or whenever two repeating cycles have to line up, which is the same maths behind gear ratios and shift patterns.

Order of operations, and why the calculator wins

Evaluate 2 + 3 × 4². Exponent first, so 4² = 16. Then multiplication: 3 × 16 = 48. Then addition: 50. Work strictly left to right instead and you get 80, which is the single most common disagreement between a person and a calculator.

The subtler trap is the unary minus. −3² is −9, because the exponent binds tighter than the negation: it means −(3²). Write (−3)² and you get +9. Both are correct answers to different expressions, and the brackets are the entire difference. If a result's sign surprises you, this is the first place to look.

One thing no calculator can fix

Type 0.1 + 0.2 into almost any calculator built on standard floating-point arithmetic and the exact answer is 0.30000000000000004. Nothing is broken. Binary cannot represent 0.1 or 0.2 exactly, any more than decimal can write ⅓ exactly, so tiny representation errors accumulate.

Tools round the display to hide this, which is the right default. But it is why you should never test two calculated values for exact equality, and why a long chain of operations can drift in the last decimal place. Where an exact decimal genuinely matters — money, mostly — work in whole pence rather than fractional pounds.

Common questions

What does the discriminant tell me?

How many real solutions a quadratic has, before you solve it. b² − 4ac above zero gives two, exactly zero gives one repeated root, and below zero gives none that are real. Checking it first saves solving an equation that has no answer you want.

Why factorise instead of using the formula?

Speed and insight. Where a quadratic factorises cleanly the roots fall out in a line, and the factors themselves often mean something — dimensions, times, break-even points. The formula always works but tells you nothing about structure.

What is the most common algebra mistake?

Applying an operation to one side only, or to one term rather than all of them. Multiplying out a bracket and forgetting the second term is the classic; so is cancelling a factor that is added rather than multiplied.

Calculators from this article

Every tool referenced above, in one place.

Quadratic Equation
Roots, discriminant, vertex
x
Algebra Calculator
Solve for x, step by step
LCM & GCD
Lowest common multiple
Scientific Calculator
Trig, logs, powers & roots
Try it yourself
Last reviewed