Skip to the calculator
Rule Calculator

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² − b²
40
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

Ask about this in the chat

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. 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. 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. 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. 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

03086164 First term (a): 75 First term (a): 166 First term (a): 277 First term (a): 408 First term (a): 559 First term (a): 7210 First term (a): 9112 First term (a): 13515 First term (a): 21620 First term (a): 39125 First term (a): 616425First term (a)
a² − 9, first term varied
First term (a)a² − b²First factor, (a + b)Second factor, (a − b)
4771
51682
62793
740104
855115
972126
1091137
12135159
152161812
203912317
256162822

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

  1. a squared7 * 7
  2. b squared3 * 3
  3. a² − b²49 - 9
  4. First factor, (a + b)7 + 3
  5. Second factor, (a − b)7 - 3
  6. The factors multiplied back10 * 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

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>
Did this answer your question?