ArticleslgStudy

mathematics

Difference of two squares

Difference of two squares is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Difference of two squares rather than just read about it. In short: In elementary algebra, a difference of two squares is one squared number (the number multiplied by itself) subtracted from another squared number. Every difference of squares may be factored as the product of the sum of the two numbers and the difference of the two numbers: a2−b2=(a+b)(a−b).

Difference of two squares — main illustration
Difference of two squares — illustration

Key takeaways

  • Difference of two squares belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Difference of two squares to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Difference of two squares from memory before moving on to harder problems.

Reference excerpt

In elementary algebra, a difference of two squares is one squared number (the number multiplied by itself) subtracted from another squared number. Every difference of squares may be factored as the product of the sum of the two numbers and the difference of the two numbers: a2−b2=(a+b)(a−b). Note that a and b can represent more complicated expressions, such that the difference of their squares can be factored as the product of their sum and difference. For example, given a=2mn+2, and b=mn−2 : a2−b2=(2mn+2)2−(mn−2)2=(3mn)(mn+4). In the reverse direction, the product of any two numbers can be expressed as the difference between the square of their average and the square of half their difference: xy=(x+y2)2−(x−y2)2.

Proof

Algebraic proof The proof of the factorization identity is straightforward. Starting from the right-hand side, apply the distributive law to get (a+b)(a−b)=a2+ba−ab−b2. By the commutative law, the middle two terms cancel: ba−ab=0 leaving (a+b)(a−b)=a2−b2. The resulting identity is one of the most commonly used in mathematics. Among many uses, it gives a simple proof of the AM–GM inequality in two variables. The proof holds not only for numbers, but for elements of any commutative ring. Conversely, if this identity holds in a ring R for all pairs of elements a and b, then R is commutative. To see this, apply the distributive law to the right-hand side of the equation and get a2+ba−ab−b2. For this to be equal to ⁠a2−b2⁠, we must have ba−ab=0 for all pairs a, b, so R is commutative.

Geometric proof

The difference of two squares can also be illustrated geometrically as the difference of two square areas in a plane. In the diagram, the shaded part represents the difference between the areas of the two squares, i.e. a2−b2. The area of the shaded part can be found by adding the areas of the two rectangles; a(a−b)+b(a−b), which can be factorized to (a+b)(a−b). Therefore, a2−b2=(a+b)(a−b). Another geometric proof proceeds as follows. We start with the figure shown in the first diagram below, a large square with a smaller square removed from it. The side of the entire square is a, and the side of the small removed square is b; thus, the area of the shaded region is a2−b2. A cut is made, splitting the region into two rectangular pieces, as shown in the second diagram. The larger piece, at the top, has width a and height a-b. The smaller piece, at the bottom, has width a-b and height b. Now the smaller piece can be detached, rotated, and placed to the right of the larger piece. In this new arrangement, shown in the last diagram below, the two pieces together form a rectangle, whose width is a+b and whose height is a−b. This rectangle's area is (a+b)(a−b). Since this rectangle came from rearranging the original figure, it must have the same area as the original figure. Therefore, a2−b2=(a+b)(a−b).

Usage

Factorization of polynomials and simplification of expressions The formula for the difference of two squares can be used for factoring polynomials that contain the square of a first quantity minus the square of a second quantity. For example, the polynomial x4−1 can be factored as follows: x4−1=(x2+1)(x2−1)=(x2+1)(x+1)(x−1). As a second example, the first two terms of x2−y2+x−y can be factored as (x+y)(x−y), so we have: x2−y2+x−y=(x+y)(x−y)+x−y=(x−y)(x+y+1). Moreover, this formula can also be used for simplifying expressions: (a+b)2−(a−b)2=(a+b+a−b)(a+b−a+b)=(2a)(2b)=4ab.

Complex number case: sum of two squares The difference of two squares can be used to find the linear factors of the sum of two squares, using complex number coefficients. For example, the complex roots of z2+4 can be found by introducing a factor of −i2=1, and using the difference of two squares: z2+4=z2−4i2=z2−(2i)2=(z+2i)(z−2i). Therefore, the linear factors are (z+2i) and (z−2i). Since the two factors found by this method are complex conjugates, we can use this in reverse as a method of multiplying a complex number to get a real number. This is used to get real denominators in complex fractions.

Rationalising denominators The difference of two squares can also be used, in reverse, in the rationalising of irrational denominators. This is a method for removing surds from expressions (or at least moving them), applying to division by some combinations involving square roots. For example, the denominator of 54+3 can be rationalised as follows: 54+3=54+3×4−34−3=5(4−3)42−32=5(4−3)16−3=5(4−3)13. Here, the irrational denominator 4+3 has been rationalised to 13.

Mental arithmetic

The difference of two squares can also be used as an arithmetical shortcut. If two numbers have an easily squared average, their product can be rewritten as the difference of two squares. For example: 27×33=(30−3)(30+3)=302−32=891.

Difference of two consecutive perfect squares The difference of two consecutive perfect squares is the sum of the two bases n and n + 1. This can be seen as follows: (n+1)2−n2=((n+1)+n)((n+1)−n)=2n+1. Therefore, the difference of two consecutive perfect squares is an odd number. Similarly, the difference of two arbitrary perfect squares is calculated as follows: (n+k)2−n2=((n+k)+n)((n+k)−n)=k(2n+k). Therefore, the difference of two even perfect squares is a multiple of 4 and the difference of two odd perfect squares is a multiple of 8.

Galileo's law of odd numbers

A ramification of the difference of consecutive squares, Galileo's law of odd numbers states that the distance covered by an object falling without resistance in uniform gravity in successive equal time intervals is linearly proportional to the odd numbers. That is, if a body falling from rest covers a certain distance during an arbitrary time interval, it will cover 3, 5, 7, etc. times that distance in the subsequent time intervals of the same length. From the equation for uniform linear acceleration, the distance covered s=ut+12at2 for initial speed u=0, constant acceleration a (acceleration due to gravity without air resistance), and time elapsed t, it follows that the distance s is proportional to t2 (in symbols, s∝t2), thus the distance from the starting point are consecutive squares for integer values of time elapsed.

… excerpt ends here. Continue reading the full article.

Illustrations

Difference of two squares illustration
Difference of two squares: Galileo's law of odd numbers
Galileo's law of odd numbers
Difference of two squares: Vectors a (purple), b (cyan) and a + b (blue) are shown with arrows
Vectors a (purple), b (cyan) and a + b (blue) are shown with arrows
Difference of two squares: Visual proof of the differences between two squares and two cubes
Visual proof of the differences between two squares and two cubes

Worked examples

Example 1 — a first encounter with Difference of two squares

Start with the simplest possible case. Write down what Difference of two squares claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Difference of two squares before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Difference of two squares ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Difference of two squares

In research
Difference of two squares appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Difference of two squares in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Difference of two squares is common in secondary-school and first-year university syllabi. It links to neighbouring topics Algebraic identities, Commutative algebra, Subtraction, so understanding it makes those chapters shorter.
In everyday life
Look for Difference of two squares outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Difference of two squares” →

How to study Difference of two squares in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Difference of two squares means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Difference of two squares out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Difference of two squares in simple terms?

In elementary algebra, a difference of two squares is one squared number (the number multiplied by itself) subtracted from another squared number. Every difference of squares may be factored as the product of the sum of the two numbers and the difference of the two numbers: a2−b2=(a+b)(a−b).

Why does Difference of two squares matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Difference of two squares?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Difference of two squares.

Tags

  • Algebraic identities
  • Commutative algebra
  • Subtraction

Keep exploring