Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Algebraic Identities






Shortcuts Worth Memorizing

An algebraic identity is an equation that holds for every value of its variables — not a problem to solve, but a structural fact about how operations interact. The identity (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2 is true whether aa and bb are integers, fractions, irrationals, or expressions. It describes what squaring a sum does, regardless of what is being squared.

The point of memorizing these patterns is speed. Anyone can derive (a+b)(ab)=a2b2(a+b)(a-b) = a^2 - b^2 by distribution, but doing so every time it appears wastes effort. Recognizing the pattern on sight — in either direction — turns a multi-step expansion into a single move. Read left to right, an identity expands. Read right to left, the same identity factors. Both readings matter.

The identities below are grouped by shape: squares first, then cubes, then higher powers, then expressions in three terms, then the sum and difference of powers, and finally a small set of less common forms that recur often enough to deserve a place in working memory.

Key Terms

Polynomial structure

Polynomialthe family of expressions all these identities operate on
Binomialmost identities expand or factor expressions of the form a±ba \pm b
Trinomialthree-term expressions appearing in obj4
Coefficientthe numerical factors generated by expansion (e.g., the 33 in 3a2b3a^2b)

Identity types

Identityan equation true for every value of its variables
Difference of Squaresa2b2=(a+b)(ab)a^2 - b^2 = (a+b)(a-b)
Perfect Square Trinomiala2±2ab+b2=(a±b)2a^2 \pm 2ab + b^2 = (a \pm b)^2
Sum and Difference of Cubesa3±b3a^3 \pm b^3 factorizations

Higher-degree tools

Binomial Coefficient(nk)\binom{n}{k}, the coefficients in (a+b)n(a+b)^n
Binomial Theoremthe general formula for (a+b)n(a+b)^n
See All Algebra Definitions


Squares of Binomials

Three identities form the foundation of nearly all polynomial work. Squaring a sum, squaring a difference, and multiplying conjugate binomials produce predictable results that appear constantly in factoring, completing the square, simplifying rational expressions, and solving quadratic equations.

The middle term is what gets missed most often. Squaring (a+b)(a+b) does not give a2+b2a^2 + b^2 — the cross term 2ab2ab comes from the two outer-and-inner products that survive distribution. The conjugate product (a+b)(ab)(a+b)(a-b) is the exception: there the cross terms cancel, leaving a clean difference of squares — the most heavily used factoring pattern in algebra.

Geometrically, (a+b)2(a+b)^2 is the area of a square with side a+ba+b, dissected into one a×aa \times a square, one b×bb \times b square, and two a×ba \times b rectangles. The cross term 2ab2ab counts those two rectangles. Once that picture is in working memory, the formula becomes unforgettable. The reverse direction — recognizing a2+2ab+b2a^2 + 2ab + b^2 as a perfect square trinomial — is what lets you collapse three terms into one squared binomial on sight.


Pattern Expanded form
(a + b)² a² + 2ab + b²
(a − b)² a² − 2ab + b²
(a + b)(a − b) a² − b²

Cubes of Binomials

Cubing a binomial extends the squaring pattern by one degree. Four terms appear instead of three, with coefficients 1,3,3,11, 3, 3, 1 governing the expansion. The signs alternate when the binomial is a difference, exactly as they did in the squared case.

These identities show up in polynomial factoring, in algebraic manipulation involving cubic expressions, and as a stepping stone toward the general binomial theorem. Recognizing a3+3a2b+3ab2+b3a^3 + 3a^2b + 3ab^2 + b^3 as (a+b)3(a+b)^3 on sight saves the work of factoring it from scratch. The reverse-direction counterparts — the sum and difference of cubes — are different identities entirely and live in obj5 below; do not confuse the two.

The structural pattern — descending powers of aa, ascending powers of bb, symmetric coefficients — is the same one that governs every higher power. Squares and cubes are the two cases worth committing to memory directly; beyond that, the binomial theorem takes over.
Pattern Expanded form
(a + b)³ a³ + 3a²b + 3ab² + b³
(a − b)³ a³ − 3a²b + 3ab² − b³

Higher Powers and the Binomial Theorem

The pattern in (a+b)2(a+b)^2 and (a+b)3(a+b)^3 generalizes. For any positive integer nn:

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


This is the binomial theorem. The expansion has n+1n+1 terms; the powers of aa descend from nn to 00 while the powers of bb ascend from 00 to nn. The numerical coefficients are the binomial coefficients (nk)\binom{n}{k}, which can be read directly off Pascal's triangle.

The fourth and fifth powers expand to:

(a+b)4=a4+4a3b+6a2b2+4ab3+b4(a+b)^4 = a^4 + 4a^3b + 6a^2b^2 + 4ab^3 + b^4


(a+b)5=a5+5a4b+10a3b2+10a2b3+5ab4+b5(a+b)^5 = a^5 + 5a^4b + 10a^3b^2 + 10a^2b^3 + 5ab^4 + b^5


The coefficients 1,4,6,4,11,4,6,4,1 and 1,5,10,10,5,11,5,10,10,5,1 are the corresponding rows of Pascal's triangle. For a difference (ab)n(a-b)^n, the same coefficients appear with alternating signs: every odd-indexed term (counting from k=0k=0) flips sign, since (b)k(-b)^k is negative when kk is odd.

Memorizing every higher power is unnecessary. The formula handles them all. What matters is recognizing when the binomial theorem applies and being able to read off any specific term — the term containing bkb^k is (nk)ankbk\binom{n}{k} a^{n-k} b^k, no full expansion required.

Trinomial Expansions

When three terms are squared or cubed, the expansion produces every pairwise product of the original terms, each appearing twice (or more) due to the multiple ways factors can combine.

The square of a trinomial follows directly from term-by-term multiplication:

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


Three squared terms and three doubled cross-products — one for each pair of original terms. The pattern generalizes: squaring a sum of kk terms produces kk squares plus (k2)\binom{k}{2} doubled cross-products.

The cube of a trinomial is heavier:

(a+b+c)3=a3+b3+c3+3(a2b+a2c+ab2+b2c+ac2+bc2)+6abc(a+b+c)^3 = a^3 + b^3 + c^3 + 3(a^2b + a^2c + ab^2 + b^2c + ac^2 + bc^2) + 6abc


Three cubed terms, six trinomial cross-products of the form a2ba^2b each with coefficient 33, and one central term 6abc6abc where every variable appears once. The full multinomial theorem governs expansions like these in general, but for three variables at degree two or three, memorizing the pattern is faster than recomputing.

A useful identity hidden in the cubic case is a3+b3+c33abc=(a+b+c)(a2+b2+c2abacbc)a^3 + b^3 + c^3 - 3abc = (a+b+c)(a^2+b^2+c^2 - ab - ac - bc), which factors a symmetric polynomial that resists the standard sum-of-cubes approach when three variables are involved.

Sums and Differences of Powers

These identities run in the opposite direction to the binomial expansions in obj1–obj3: they take a two-term expression and break it into factors. The two anchors are the difference of squares and the sum and difference of cubes, but the pattern extends to every degree.

The difference of squares a2b2=(a+b)(ab)a^2 - b^2 = (a+b)(a-b) is the most-used factoring identity in algebra, appearing constantly in simplification, rationalization, and solving equations. Its sum counterpart a2+b2a^2 + b^2 does not factor over the real numbers — but over the complex numbers it splits as (a+bi)(abi)(a+bi)(a-bi), with the imaginary unit supplying what the reals lack.

The cubes split cleanly in both directions:

a3b3=(ab)(a2+ab+b2)a^3 - b^3 = (a-b)(a^2 + ab + b^2)


a3+b3=(a+b)(a2ab+b2)a^3 + b^3 = (a+b)(a^2 - ab + b^2)


The quadratic factors a2±ab+b2a^2 \pm ab + b^2 are irreducible over the reals (their discriminants are negative), so this factorization is the end of the line for cubes over R\mathbb{R}.

For higher powers, two general patterns govern everything. The difference anbna^n - b^n always factors — (ab)(a-b) divides it for any positive integer nn:

anbn=(ab)(an1+an2b+an3b2++bn1)a^n - b^n = (a-b)(a^{n-1} + a^{n-2}b + a^{n-3}b^2 + \cdots + b^{n-1})


The sum an+bna^n + b^n factors only when nn is odd, with (a+b)(a+b) as the divisor:

an+bn=(a+b)(an1an2b+an3b2+bn1)(n odd)a^n + b^n = (a+b)(a^{n-1} - a^{n-2}b + a^{n-3}b^2 - \cdots + b^{n-1}) \quad (n \text{ odd})


When nn is even, an+bna^n + b^n is irreducible over the reals. The case a4b4a^4 - b^4 is worth noting separately because it factors twice — first as a difference of squares, then again because a2b2a^2 - b^2 factors further: (ab)(a+b)(a2+b2)(a-b)(a+b)(a^2+b^2).
Pattern Factors over ℝ? Factorization
a² − b² (a + b)(a − b)
a² + b² irreducible over ℝ; (a + bi)(a − bi) over ℂ
a³ − b³ (a − b)(a² + ab + b²)
a³ + b³ (a + b)(a² − ab + b²)
a⁴ − b⁴ (a − b)(a + b)(a² + b²)
aⁿ − bⁿ (any n) (a − b)(aⁿ⁻¹ + aⁿ⁻²b + ⋯ + bⁿ⁻¹)
aⁿ + bⁿ (odd n only) (a + b)(aⁿ⁻¹ − aⁿ⁻²b + ⋯ + bⁿ⁻¹)

Useful Specials

A handful of less common identities recur often enough to deserve a place alongside the standard ones. None of them follow from a general theorem the way the binomial expansions do — each is a specific algebraic fact worth recognizing on sight.

The Sophie Germain identity factors a4+4b4a^4 + 4b^4, an expression that looks irreducible at first glance:

a4+4b4=(a2+2ab+2b2)(a22ab+2b2)a^4 + 4b^4 = (a^2 + 2ab + 2b^2)(a^2 - 2ab + 2b^2)


It surfaces in number theory and contest problems where a4+4b4a^4 + 4b^4 appears and would otherwise resist factoring.

Two paired identities link sums and differences of squared binomials:

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


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


The first reduces a sum of squared sum and squared difference; the second extracts the product abab from the same pair. Both are useful when manipulating expressions where a+ba+b and aba-b appear together.

A symmetric three-variable identity:

a2+b2+c2abacbc=12[(ab)2+(bc)2+(ac)2]a^2 + b^2 + c^2 - ab - ac - bc = \tfrac{1}{2}\left[(a-b)^2 + (b-c)^2 + (a-c)^2\right]


Recognizing this form proves the expression is non-negative for all real a,b,ca, b, c, which is otherwise non-obvious.

A factorable quartic that is not a perfect square:

a4+a2b2+b4=(a2+ab+b2)(a2ab+b2)a^4 + a^2b^2 + b^4 = (a^2 + ab + b^2)(a^2 - ab + b^2)


This one looks like a difference of squares hiding inside a sum, and it appears in factoring problems where the standard patterns fail.

Finally, over the complex numbers, the sum of two squares factors using the imaginary unit:

a2+b2=(a+bi)(abi)a^2 + b^2 = (a + bi)(a - bi)


Over R\mathbb{R} this expression is irreducible; over C\mathbb{C} it splits cleanly, and the factorization is the basis for using complex conjugates to handle expressions that have no real factorization.

Summary of Algebraic Identities

The table below collects every identity from this page in one place. Use it as a reference card — for each pattern, the table shows the canonical form and the contexts where the identity does the most work.
Family Identity Where it's used
Square of a sum (a + b)² = a² + 2ab + b² completing the square, perfect square trinomials
Square of a difference (a − b)² = a² − 2ab + b² completing the square, expansions
Difference of squares a² − b² = (a + b)(a − b) factoring, rationalizing denominators
Cube of a sum (a + b)³ = a³ + 3a²b + 3ab² + b³ cubic expansions, depressed cubics
Cube of a difference (a − b)³ = a³ − 3a²b + 3ab² − b³ cubic expansions, depressed cubics
Sum of cubes a³ + b³ = (a + b)(a² − ab + b²) factoring cubics
Difference of cubes a³ − b³ = (a − b)(a² + ab + b²) factoring cubics
Binomial theorem (a + b)ⁿ = Σ C(n,k) aⁿ⁻ᵏ bᵏ general expansions of any degree
Square of a trinomial (a + b + c)² = a² + b² + c² + 2ab + 2ac + 2bc three-variable expansions
aⁿ − bⁿ (a − b)(aⁿ⁻¹ + aⁿ⁻²b + ⋯ + bⁿ⁻¹) factoring any degree, (a − b) always divides
aⁿ + bⁿ (odd n) (a + b)(aⁿ⁻¹ − aⁿ⁻²b + ⋯ + bⁿ⁻¹) factoring odd-degree sums only
Sophie Germain a⁴ + 4b⁴ = (a² + 2ab + 2b²)(a² − 2ab + 2b²) specialty factoring
Sum of squares (over ℂ) a² + b² = (a + bi)(a − bi) complex number factoring