In short

An algebraic identity is an equation that holds for every value of the variables in it. The standard identities — (a + b)^2 = a^2 + 2ab + b^2, (a - b)^2 = a^2 - 2ab + b^2, (a + b)(a - b) = a^2 - b^2, (a + b + c)^2, a^3 + b^3, a^3 - b^3, (a + b)^3, (a - b)^3 — are shortcuts that turn slow expansion into instant answers. Each one has a geometric proof you can draw, and together they form the toolkit for simplification, mental arithmetic, and factoring.

What is 102^2? You could multiply 102 \times 102 by hand. Or you could notice that 102 = 100 + 2 and use the identity (a + b)^2 = a^2 + 2ab + b^2:

102^2 = (100 + 2)^2 = 100^2 + 2 \times 100 \times 2 + 2^2 = 10000 + 400 + 4 = 10404

Three additions, no long multiplication. The identity turned a tedious calculation into mental arithmetic.

And 98 \times 102? Write it as (100 - 2)(100 + 2) = 100^2 - 2^2 = 10000 - 4 = 9996. One subtraction.

These are not tricks. They are identities — equations that are true for all values of a and b, not just for 100 and 2. They work because they are consequences of the distributive law, and the distributive law holds everywhere. This article builds each identity, proves it geometrically, and shows you how to use it in both directions: for expanding (going from factored form to expanded form) and for factoring (going back).

The square identities

Identity 1: (a + b)^2 = a^2 + 2ab + b^2

Start from the definition. (a + b)^2 means (a + b)(a + b). Distribute:

(a + b)(a + b) = a \cdot a + a \cdot b + b \cdot a + b \cdot b = a^2 + ab + ab + b^2 = a^2 + 2ab + b^2

That is the algebraic proof — four products, two of which are identical, giving the 2ab in the middle.

The geometric proof is even more satisfying. Draw a square with side length a + b. Its area is (a + b)^2. Now split each side at the point where a ends and b begins. This divides the big square into four pieces: a square of side a (area a^2), a square of side b (area b^2), and two rectangles of sides a and b (area ab each). The total area of the four pieces must equal the area of the big square:

a^2 + ab + ab + b^2 = (a + b)^2

The identity is not a formula to memorise — it is a picture of a square cut into four pieces.

Geometric proof of the identity (a + b) squared equals a squared plus 2ab plus b squaredA large square with side length a plus b, divided into four regions. The top-left square has side a and area a squared. The bottom-right square has side b and area b squared. The top-right and bottom-left rectangles each have sides a and b and area ab. The four areas sum to the big square's area, proving the identity. ab ab a b a b
A square of side $a + b$, cut into four pieces: one $a \times a$ square, one $b \times b$ square, and two $a \times b$ rectangles. The total area is $a^2 + 2ab + b^2 = (a + b)^2$. The picture *is* the proof.

Identity 2: (a - b)^2 = a^2 - 2ab + b^2

The same logic, with a sign change. Expand:

(a - b)^2 = (a - b)(a - b) = a^2 - ab - ab + b^2 = a^2 - 2ab + b^2

Geometrically, start with a square of side a. Remove a strip of width b from the right and another from the bottom. You have removed too much — the corner square of side b was subtracted twice. Add it back once. The remaining area is a^2 - ab - ab + b^2 = a^2 - 2ab + b^2, and it is also a square of side a - b.

Geometric proof of the identity (a minus b) squared equals a squared minus 2ab plus b squaredA square of side a. A vertical strip of width b on the right and a horizontal strip of width b on the bottom are shaded to show subtraction. The small corner square of side b, which was subtracted twice, is shaded more darkly to indicate it must be added back once. The remaining top-left square has side a minus b and area a squared minus 2ab plus b squared. (a−b)² ab subtract ab subtract add back a − b b a − b b
Start with a square of side $a$. Subtract two strips of area $ab$ (right and bottom). The corner $b \times b$ square was subtracted twice, so add it back once. What remains is the $(a - b) \times (a - b)$ square. Area: $a^2 - 2ab + b^2$.

Identity 3: (a + b)(a - b) = a^2 - b^2

This is the difference of squares. Expand:

(a + b)(a - b) = a^2 - ab + ab - b^2 = a^2 - b^2

The -ab and +ab cancel perfectly. That cancellation is the reason the identity is so useful — multiplying a sum by a difference wipes out the cross terms and leaves only squares.

Geometrically, take a square of side a and remove a square of side b from one corner. The remaining L-shaped region has area a^2 - b^2. Now cut the L along a horizontal line at height b from the bottom. You get two rectangles: one is b \times (a - b) and the other is a \times (a - b). Rearrange them into a single rectangle of width (a - b) and height (a + b). Its area is (a + b)(a - b) — the same as the L-shape's area, which was a^2 - b^2.

The difference of squares is the factoring tool you reach for most often. Any time you see something of the form (\text{square}) - (\text{square}), it splits into (\text{sum})(\text{difference}).

Standard Square Identities

For all real numbers a and b:

(a + b)^2 = a^2 + 2ab + b^2
(a - b)^2 = a^2 - 2ab + b^2
(a + b)(a - b) = a^2 - b^2

The three-variable square identity

When three variables appear, the pattern extends naturally:

(a + b + c)^2 = a^2 + b^2 + c^2 + 2ab + 2bc + 2ca

Expand it directly: (a + b + c)(a + b + c). Every term multiplies every other term. The diagonal products give a^2, b^2, c^2. Each off-diagonal pair appears twice (ab and ba, bc and cb, ca and ac), giving 2ab + 2bc + 2ca.

You can also derive it from Identity 1 by treating (a + b + c) as ((a + b) + c):

((a+b) + c)^2 = (a + b)^2 + 2(a+b)c + c^2 = a^2 + 2ab + b^2 + 2ac + 2bc + c^2

Rearranging: a^2 + b^2 + c^2 + 2ab + 2bc + 2ca. Same result.

This identity is useful for mental arithmetic with three-part sums and for simplifying expressions in coordinate geometry. For instance, (10 + 3 + 0.5)^2 = 100 + 9 + 0.25 + 60 + 3 + 10 = 182.25, confirming 13.5^2 = 182.25.

The cubic identities

Identity 4: (a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3

Expand (a + b)^3 = (a + b)(a + b)^2 = (a + b)(a^2 + 2ab + b^2):

= a^3 + 2a^2b + ab^2 + a^2b + 2ab^2 + b^3 = a^3 + 3a^2b + 3ab^2 + b^3

An equivalent form that is often more useful:

(a + b)^3 = a^3 + b^3 + 3ab(a + b)

This rearrangement groups the 3a^2b + 3ab^2 into 3ab(a + b).

Identity 5: (a - b)^3 = a^3 - 3a^2b + 3ab^2 - b^3

Same expansion, with alternating signs:

(a - b)^3 = a^3 - b^3 - 3ab(a - b)

Identity 6: a^3 + b^3 = (a + b)(a^2 - ab + b^2)

This is the sum of cubes factoring identity. You can derive it from Identity 4. Write a^3 + b^3 = (a + b)^3 - 3ab(a + b) = (a + b)[(a + b)^2 - 3ab] = (a + b)(a^2 + 2ab + b^2 - 3ab) = (a + b)(a^2 - ab + b^2).

Or verify directly: expand (a + b)(a^2 - ab + b^2) = a^3 - a^2b + ab^2 + a^2b - ab^2 + b^3 = a^3 + b^3. The four middle terms cancel in pairs.

Identity 7: a^3 - b^3 = (a - b)(a^2 + ab + b^2)

The difference of cubes. Verify by expansion: (a - b)(a^2 + ab + b^2) = a^3 + a^2b + ab^2 - a^2b - ab^2 - b^3 = a^3 - b^3.

Standard Cubic Identities

For all real numbers a and b:

(a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3
(a - b)^3 = a^3 - 3a^2b + 3ab^2 - b^3
a^3 + b^3 = (a + b)(a^2 - ab + b^2)
a^3 - b^3 = (a - b)(a^2 + ab + b^2)
Summary of all standard algebraic identitiesA two-column table. The left column lists the seven identities in expanded form. The right column gives a one-line description of each: square of sum, square of difference, difference of squares, three-variable square, cube of sum, cube of difference, and sum and difference of cubes factoring formulas. Square identities (a + b)² = a² + 2ab + b² square of a sum (a − b)² = a² − 2ab + b² square of a difference (a + b)(a − b) = a² − b² difference of squares (a+b+c)² = a²+b²+c²+2ab+2bc+2ca three-variable square Cubic identities (a + b)³ = a³ + 3a²b + 3ab² + b³ cube of a sum (a − b)³ = a³ − 3a²b + 3ab² − b³ cube of a difference a³ ± b³ = (a ± b)(a² ∓ ab + b²) sum/difference of cubes
All seven standard identities on one page. The square identities handle degree-2 expansions and factorisations. The cubic identities handle degree-3. Together, they cover the vast majority of simplification problems in school algebra.

Applications in simplification

The identities work in two directions. In the expansion direction, you use them to turn a factored expression into expanded form without doing term-by-term multiplication. In the factoring direction, you recognise a pattern in the expanded form and collapse it back into the compact factored form.

Expansion example. Compute (3x + 5)^2 without multiplying out the long way.

= (3x)^2 + 2(3x)(5) + 5^2 = 9x^2 + 30x + 25

Factoring example. Factor 16x^2 - 49.

Recognise: 16x^2 = (4x)^2 and 49 = 7^2. This is a difference of squares:

16x^2 - 49 = (4x + 7)(4x - 7)

Simplification example. Simplify \dfrac{x^3 + 27}{x + 3}.

The numerator is x^3 + 3^3, a sum of cubes: (x + 3)(x^2 - 3x + 9). Cancel the common factor:

\frac{(x + 3)(x^2 - 3x + 9)}{x + 3} = x^2 - 3x + 9 \qquad (x \neq -3)

Mental arithmetic example. Compute 47 \times 53.

Write it as (50 - 3)(50 + 3) = 50^2 - 3^2 = 2500 - 9 = 2491. Done in your head.

Applications in factorization

The identities are the express lane in Polynomial Factorization. Any time you spot a pattern that matches an identity, you can write the factors immediately without going through the trial-and-error of the trinomial method.

The nested factorisation of x^4 - 1 is worth lingering over. The first step treats x^4 as (x^2)^2 and 1 as 1^2, giving the difference of squares (x^2 + 1)(x^2 - 1). But x^2 - 1 is itself a difference of squares: (x + 1)(x - 1). The factor x^2 + 1, on the other hand, is a sum of squares and does not factor over the reals.

Interactive: see identities at work

Drag the red point on the curve below to see how (a + b)^2 compares to a^2 + b^2 when b = 3 and a varies. The gap between the two values is exactly 2ab = 6a — the cross term that the identity adds.

Interactive comparison of (a plus 3) squared and a squared plus 9A coordinate plane with a from 0 to 8 on the horizontal axis and value from 0 to 130 on the vertical axis. Two curves are plotted. The upper curve is y equals a plus 3 squared. The lower curve is y equals a squared plus 9. A draggable red point sits on the upper curve. Readouts show the values of a, a plus 3 squared, and a squared plus 9, along with the gap 6a between them. a value 1 2 3 4 5 6 7 8 10 50 90 130 (a + 3)² a² + 9 ↔ drag the red point
Drag the red point along the upper curve. The readouts show $(a + 3)^2$ and $a^2 + 9$ side by side. The gap between them is always exactly $6a = 2 \times a \times 3$ — the $2ab$ cross term from the identity. At $a = 4$, the gap is $24$: the identity gives $(4 + 3)^2 = 49$ while $4^2 + 9 = 25$, and $49 - 25 = 24 = 6 \times 4$.

Two worked examples

Example 1: Expand and simplify $(2x + 3y)^2 - (2x - 3y)^2$

The expression is a difference of two squares of binomials. You could expand each square separately, but the difference-of-squares identity gives a faster route.

Step 1. Recognise the overall structure. The expression has the form A^2 - B^2, where A = (2x + 3y) and B = (2x - 3y).

Why: any expression of the form (\text{something})^2 - (\text{something else})^2 is a difference of squares, no matter how complicated the "somethings" are.

Step 2. Apply the difference-of-squares identity: A^2 - B^2 = (A + B)(A - B).

= \big[(2x + 3y) + (2x - 3y)\big]\big[(2x + 3y) - (2x - 3y)\big]

Step 3. Simplify each bracket.

First bracket: (2x + 3y) + (2x - 3y) = 4x.

Second bracket: (2x + 3y) - (2x - 3y) = 2x + 3y - 2x + 3y = 6y.

Why: in the first bracket the 3y and -3y cancel; in the second bracket the 2x and -2x cancel. The identity has stripped the expression down to two monomials.

Step 4. Multiply the simplified brackets.

4x \times 6y = 24xy

Why: the product of the two remaining terms is just ordinary monomial multiplication.

Result. (2x + 3y)^2 - (2x - 3y)^2 = 24xy.

Step-by-step simplification of (2x+3y) squared minus (2x−3y) squared using difference of squaresA vertical flow of four boxed expressions. The first box contains the original expression. An arrow labelled A squared minus B squared identity leads to the factored form (A plus B)(A minus B). The next arrow labelled simplify brackets leads to 4x times 6y. A final arrow leads to the answer 24xy. (2x + 3y)² − (2x − 3y)² A² − B² = (A+B)(A−B) [(2x+3y) + (2x−3y)] · [(2x+3y) − (2x−3y)] simplify brackets 4x × 6y 24xy
The expression collapses from a difference of two squared binomials all the way down to $24xy$ in three steps. The critical move is treating the whole thing as $A^2 - B^2$ and factoring it, rather than expanding each square separately and subtracting. The identity did all the heavy lifting.

You could verify by expanding each square directly: (2x + 3y)^2 = 4x^2 + 12xy + 9y^2 and (2x - 3y)^2 = 4x^2 - 12xy + 9y^2. Their difference is 24xy. Same answer, more work.

Example 2: Factor $8a^3 + 36a^2b + 54ab^2 + 27b^3$

This four-term expression looks daunting, but the coefficients 8, 36, 54, 27 have a structure that suggests a cube of a binomial.

Step 1. Check the first and last terms. 8a^3 = (2a)^3 and 27b^3 = (3b)^3. So the candidate is (2a + 3b)^3.

Why: if the expression is a perfect cube, its first term must be the cube of the first part and its last term must be the cube of the second part. That pins down the two pieces.

Step 2. Verify the middle terms against the identity (a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3.

With a \to 2a and b \to 3b:

  • 3a^2b \to 3(2a)^2(3b) = 3 \cdot 4a^2 \cdot 3b = 36a^2b — matches.
  • 3ab^2 \to 3(2a)(3b)^2 = 3 \cdot 2a \cdot 9b^2 = 54ab^2 — matches.

Why: the identity predicts the middle coefficients exactly. Both match, so the expression is indeed a perfect cube.

Step 3. Write the factorisation.

8a^3 + 36a^2b + 54ab^2 + 27b^3 = (2a + 3b)^3

Step 4. Spot-check with a = 1, b = 1: 8 + 36 + 54 + 27 = 125, and (2 + 3)^3 = 5^3 = 125. Confirmed.

Result. 8a^3 + 36a^2b + 54ab^2 + 27b^3 = (2a + 3b)^3.

Recognising 8a cubed plus 36a squared b plus 54ab squared plus 27b cubed as (2a + 3b) cubedFour terms are lined up at the top and matched against the cube-of-a-sum identity below. The first term 8a cubed is matched to (2a) cubed. The second term 36a squared b is matched to 3 times (2a) squared times 3b. The third term 54ab squared is matched to 3 times 2a times (3b) squared. The last term 27b cubed is matched to (3b) cubed. The bottom shows the result (2a + 3b) cubed. 8a³ + 36a²b + 54ab² + 27b³ (2a)³ 3·(2a)²·(3b) 3·(2a)·(3b)² (3b)³ = 8a³ ✓ = 36a²b ✓ = 54ab² ✓ = 27b³ ✓ (2a + 3b)³ check: a = 1, b = 1 gives 125 = 5³ ✓
Each of the four terms matches a slot in the $(a + b)^3$ template with $a = 2a$ and $b = 3b$. When all four match, the entire expression collapses into the cube of a single binomial: $(2a + 3b)^3$.

Recognising perfect-cube patterns saves enormous work. If you had tried to factor this cubic by grouping or by the Factor Theorem, the path would have been much longer.

Common confusions

Going deeper

If you came here to learn the standard identities and how to apply them for expansion, simplification, and factoring, you have the complete toolkit — you can stop here. The rest is for readers who want to see where these patterns come from and where they lead.

The binomial theorem generalises everything

The identities (a + b)^2 and (a + b)^3 are special cases of a much more powerful result called the Binomial Theorem:

(a + b)^n = \sum_{k=0}^{n} \binom{n}{k} a^{n-k} b^k

where \binom{n}{k} = \dfrac{n!}{k!(n-k)!} is the binomial coefficient. For n = 2, the coefficients are 1, 2, 1. For n = 3, they are 1, 3, 3, 1. For n = 4, they are 1, 4, 6, 4, 1. These are the rows of Pascal's triangle, and each row gives you the expansion of (a + b)^n without any multiplication.

The Indian mathematician Pingala described the triangle of binomial coefficients centuries before it appeared in European mathematics. The same triangle appears in Halayudha's 10th-century commentary on Pingala's work, and later in the work of Varahamihira.

Identities are special cases of polynomial rings

From the viewpoint of Polynomial Operations, an identity like (a + b)^2 = a^2 + 2ab + b^2 is a statement about the polynomial ring \mathbb{R}[a, b] — the ring of polynomials in two variables. The identity says that the polynomial (a + b)^2 - a^2 - 2ab - b^2 is the zero polynomial: it evaluates to zero for every choice of a and b, and its coefficients are all zero.

This is different from an equation, which holds only for specific values. x^2 - 5x + 6 = 0 is true only at x = 2 and x = 3. But (a + b)^2 = a^2 + 2ab + b^2 is true everywhere — it is a structural fact about the ring, not a condition on the variables.

The geometric proofs are not decorations

The square-cutting proof of (a + b)^2 is not just a visual aid — it is a genuine area argument that works for any positive a and b. The algebraic proof via the distributive law is more general (it works for negative values, complex values, matrices, and anything else that has a distributive multiplication), but the geometric proof came first historically and is often more memorable. Bhaskara II used geometric dissection arguments extensively in his algebraic work, treating algebraic identities as statements about areas and volumes.

Where this leads next

The identities on this page reappear constantly.