Sub topic 3
The Three Key Identities: (a+b)^2, (a-b)^2, (a+b)(a-b)
This chapter assumes you can multiply with the distributive property and FOIL (covered in the previous chapter). It also assumes you can handle negative numbers and exponents. Here you will derive the three identities, learn to recognize them in different disguises, and see where GRE questions trap people who half-remember them.
Where the identities come from
The three identities are not new rules. Each is FOIL applied to a pattern that appears constantly. Deriving them once means you can rebuild any of them if memory fails.
Square of a sum. Write the square as a product and apply FOIL:
(a + b)^2 = (a + b)(a + b) = a^2 + ab + ba + b^2 = a^2 + 2ab + b^2
The two middle terms, ab and ba, are equal, so they combine into 2ab.
Square of a difference. Replace b with -b in the identity above:
(a - b)^2 = a^2 + 2a(-b) + (-b)^2 = a^2 - 2ab + b^2
Product of a sum and a difference. Apply FOIL again:
(a + b)(a - b) = a^2 - ab + ba - b^2 = a^2 - b^2
Here the middle terms are opposites and cancel, which is why the result has only two terms.
| Identity | Expanded form | Number of terms | Sign of last term |
|---|---|---|---|
| (a + b)^2 | a^2 + 2ab + b^2 | 3 | always + |
| (a - b)^2 | a^2 - 2ab + b^2 | 3 | always + |
| (a + b)(a - b) | a^2 - b^2 | 2 | always - |
The last column matters. A squared quantity is never negative, so the b^2 term in a square keeps a plus sign even when the binomial contains a minus.
Checking an expansion numerically
Substituting sample values is a fast way to catch an algebra slip, on the GRE or anywhere else. The script below tests all three identities, including negative and equal inputs.
for a, b in [(3, 4), (-2, 5), (7, 7)]:
assert (a + b) ** 2 == a ** 2 + 2 * a * b + b ** 2
assert (a - b) ** 2 == a ** 2 - 2 * a * b + b ** 2
assert (a + b) * (a - b) == a ** 2 - b ** 2
print("identities hold")A few sample values do not prove an identity. They only expose a wrong one, and a wrong expansion usually fails on the first pair tried.
Recognizing the pattern when a and b are not simple
On the GRE, a and b are rarely bare letters. Each can be a number, a product, or a power. Treat the first and last terms as a and b, then fill in the identity.
- (2x + 3)^2: here a = 2x and b = 3. The result is 4x^2 + 12x + 9. The middle term is 2 · 2x · 3 = 12x.
- (3x - 4y)^2: here a = 3x and b = 4y. The result is 9x^2 - 24xy + 16y^2.
- (x^2 + 5)(x^2 - 5): here a = x^2 and b = 5. The result is x^4 - 25.
- (-x - 4)^2: factor out the sign first, since (-x - 4)^2 = (x + 4)^2 = x^2 + 8x + 16.
Square the whole of a and the whole of b. Writing (2x)^2 as 2x^2 is a frequent slip. The correct value is 4x^2.
Because nested fences are not allowed, the decision diagram is given in its own block below.
Common errors
- Dropping the middle term. (a + b)^2 is not a^2 + b^2. Test with a = 1 and b = 2: the left side is 9 and the right side is 5. The missing 2ab is 4.
- Confusing (a - b)^2 with a^2 - b^2. The first has three terms and the second has two. They are equal only when ab = b^2, that is, when b = 0 or a = b.
- Wrong sign on the last term. (x - 3)^2 = x^2 - 6x + 9, not x^2 - 6x - 9.
- Forgetting the factor 2 or the coefficient. In (5x + 1)^2 the middle term is 2 · 5x · 1 = 10x, not 5x.
Using the identities in reverse
The identities also work as relationships between quantities, which is how the GRE usually tests them. You are often given a sum and a product and asked for a sum of squares, without ever finding the individual numbers.
Rearranging the square of a sum gives a^2 + b^2 = (a + b)^2 - 2ab. Rearranging the square of a difference gives a^2 + b^2 = (a - b)^2 + 2ab. Two further consequences are useful:
- (a + b)^2 - (a - b)^2 = 4ab
- (a + b)^2 + (a - b)^2 = 2a^2 + 2b^2
Example 1. If x + y = 5 and xy = 6, find x^2 + y^2. Since (x + y)^2 = x^2 + 2xy + y^2, we get x^2 + y^2 = 25 - 12 = 13.
Example 2. If x - 1/x = 3, find x^2 + 1/x^2. Squaring gives x^2 - 2 + 1/x^2 = 9, because the middle term is 2 · x · (1/x) = 2. So x^2 + 1/x^2 = 11.
# Example 1: x + y = 5, xy = 6 gives x^2 + y^2 = 13 (roots are 2 and 3)
x, y = 2, 3
assert x + y == 5 and x * y == 6
assert x ** 2 + y ** 2 == (x + y) ** 2 - 2 * x * y == 13
# Example 2: x - 1/x = 3 gives x^2 + 1/x^2 = 11
import math
x = (3 + math.sqrt(13)) / 2 # a positive solution of x - 1/x = 3
assert math.isclose(x - 1 / x, 3)
assert math.isclose(x ** 2 + 1 / x ** 2, 11)
print("rearrangements hold")A GRE quantitative comparison use
Because a square is never negative, (a - b)^2 >= 0 for all real a and b. Expanding gives a^2 - 2ab + b^2 >= 0, so a^2 + b^2 >= 2ab, with equality only when a = b.
Suppose Quantity A is (m + n)^2 and Quantity B is m^2 + n^2, with m and n both positive. The difference is (m + n)^2 - (m^2 + n^2) = 2mn, which is positive, so Quantity A is greater. If the problem allowed mn < 0, the answer would flip. If it allowed mn = 0, the quantities would be equal. Always check what the problem says about the signs of the variables before concluding.
Exercise
If a + b = 7 and a^2 + b^2 = 29, what is the value of ab?
Show answer
Square the sum: (a + b)^2 = a^2 + 2ab + b^2, so 49 = 29 + 2ab. Then 2ab = 20 and ab = 10.
Exercise
Expand (3x - 2)^2 and then expand (3x - 2)(3x + 2). How do the results differ?
Show answer
(3x - 2)^2 = 9x^2 - 12x + 4, which has three terms. (3x - 2)(3x + 2) = 9x^2 - 4, which has two terms because the middle terms cancel. The two results differ by the -12x term and by the sign of the constant.
Exercise
If x + 1/x = 4, what is x^2 + 1/x^2?
Show answer
Square both sides: x^2 + 2 + 1/x^2 = 16, because 2 · x · (1/x) = 2. So x^2 + 1/x^2 = 14.