Difference of Two Squares
With first term (a) 7, second term (b) 3, difference of two squares comes to 40 — a² − b². It is reached in 6 steps, the last of which is 49 - 9, and each one is printed on the page with its numbers filled in. The formula is the one published by Euclid, Elements Book II, Proposition 5, not an approximation fitted to it.
Factors a² − b² into (a + b)(a − b), multiplied back out as a check — and the mental shortcut it gives for products either side of a round number.
Formula and sources checked · How we check
First term (a) 7, Second term (b) 3
40
a² − b² for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.
It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.
- a squared
7 * 749- b squared
3 * 39- a² − b²
49 - 940- First factor, (a + b)
7 + 310- Second factor, (a − b)
7 - 34- The factors multiplied back
10 * 440
Worked example
49 − 9 = 40, and (7 + 3)(7 − 3) = 10 × 4 = 40. That second form is why 43 × 37 can be done in your head: it is 40² − 3² = 1600 − 9 = 1591.
How to work it out yourself
- 1.Take the square root of each term to find a and b. x² − 25 has a = x and b = 5, so it factors as (x + 5)(x − 5).
- 2.It only works for a minus. a² + b² does not factor over the real numbers, which is the single most common error in this topic.
- 3.Check the terms really are squares. 4x² − 9 works, with a = 2x and b = 3; 4x² − 8 does not, because 8 is not a square.
- 4.For mental arithmetic, spot pairs equidistant from a round number. 98 × 102 is 100² − 2² = 9,996, and 43 × 37 is 40² − 3² = 1,591.
a² − 9, first term varied
| First term (a) | a² − b² | First factor, (a + b) | Second factor, (a − b) |
|---|---|---|---|
| 4 | 7 | 7 | 1 |
| 5 | 16 | 8 | 2 |
| 6 | 27 | 9 | 3 |
| 7 | 40 | 10 | 4 |
| 8 | 55 | 11 | 5 |
| 9 | 72 | 12 | 6 |
| 10 | 91 | 13 | 7 |
| 12 | 135 | 15 | 9 |
| 15 | 216 | 18 | 12 |
| 20 | 391 | 23 | 17 |
| 25 | 616 | 28 | 22 |
Every row factors as (a + 3)(a − 3). At a = 3 the value is zero and one factor vanishes, which is the whole content of "the roots of x² − 9 are ±3".
The formula
- a squared
7 * 7 - b squared
3 * 3 - a² − b²
49 - 9 - First factor, (a + b)
7 + 3 - Second factor, (a − b)
7 - 3 - The factors multiplied back
10 * 4
Source: Euclid, Elements Book II, Proposition 5 — the geometric form of the identity, NIST Digital Library of Mathematical Functions — elementary algebraic identities
Questions people actually ask
- What is the difference of two squares?
- The identity a² − b² = (a + b)(a − b). Multiplying the right side out gives a² − ab + ab − b², and the middle terms cancel — which is the whole proof, and the reason it holds for any a and b at all.
- How do you factor x² − 16?
- (x + 4)(x − 4). x is the square root of x² and 4 is the square root of 16, so a = x and b = 4. Its roots are +4 and −4, one from each factor.
- Can you factor a² + b²?
- Not over the real numbers. x² + 9 has no real roots, so no real factorisation exists. Over the complex numbers it factors as (x + 3i)(x − 3i), which is where the identity does eventually apply.
- How does this help with mental arithmetic?
- Any two numbers equidistant from a round one multiply as that round number squared minus the gap squared. 98 × 102 is 100² − 2² = 9,996. 57 × 63 is 60² − 3² = 3,591. The larger the round number, the more the trick saves.
- What about a difference of two cubes?
- a³ − b³ = (a − b)(a² + ab + b²), and unlike squares the sum also factors: a³ + b³ = (a + b)(a² − ab + b²). Odd powers always factor with a sum; even ones do not.
Related
- Completing the Square CalculatorTurns ax² + bx + c into a(x − h)² + k, giving the vertex, the axis of symmetry and the roots that fall straight out of the completed form.
- Quadratic Formula CalculatorBoth roots of ax² + bx + c = 0 from the quadratic formula, with the discriminant that says in advance how many real roots there are.
- Percent DifferencePercent difference between two values, divided by their mean — beside percent change, which divides by one of them and gives a different answer.
- Absolute Value CalculatorThe absolute value of a number, and the two solutions an equation of the form |ax + b| = c always has — which is the part a bare magnitude does not answer.
Put this calculator on your site
Free, no attribution required beyond the link.
<iframe src="https://rulecalculators.com/embed/difference-of-two-squares" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="Difference of Two Squares"></iframe>