On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Algebra Fundamentals · Grade 9-12

Algebraic Pattern

An algebraic pattern is a standard identity, such as a2−b2=(a+b)(a−b), that fits any expression matching its template.

Key patterns: a2−b2=(a+b)(a−b), a3+b3=(a+b)(a2−ab+b2), a3−b3=(a−b)(a2+ab+b2)

Quick Answer

An algebraic pattern is a standard identity, such as a2−b2=(a+b)(a−b), that fits any expression matching its template. You use it when an expression has the shape of an identity you know: 9x2−16 is (3x)2−42, so it factors at once as (3x+4)(3x−4). The letters in a pattern can stand for any expression, such as 3x or y+1, as long as every slot is filled exactly. The common ones are the difference of squares, the perfect squares (a±b)2, and the sum and difference of cubes.

Why This Matters

Patterns turn long factoring searches and expansions into one step, and they work on numbers too: 38×42=402−22=1596. They also tell you when to stop: a2+b2 has no factorisation over the real numbers, so hunting for one wastes time. Misfit a pattern, such as using the wrong signs for a cube, and the answer looks right but is wrong.

Intuitive Explanation

A pattern is a template with slots. The difference of squares, a2−b2=(a+b)(a−b), has two slots, a and b, and anything with the shape "something squared minus something else squared" can be dropped in. 9x2−16 fits with a=3x and b=4, because (3x)2=9x2 and 42=16. So 9x2−16=(3x+4)(3x−4), found without trial and error.

Why does the template always work? Expand the right side: (a+b)(a−b)=a2−ab+ab−b2=a2−b2. The middle terms cancel for every a and b, so the identity holds whatever goes in the slots, whether 3x, y+1 or 50. That is also why 49x2−25 factors as (7x+5)(7x−5): the coefficient 49 is itself a square, 72, which is easy to miss.

Fitting the template exactly is the whole skill. 9x2+16 looks almost the same as 9x2−16, but the plus sign means it does not fit a2−b2, and no product of real linear factors gives a sum of two squares like this. Cubes have their own templates, each with a sign rule: a3−b3=(a−b)(a2+ab+b2) and a3+b3=(a+b)(a2−ab+b2).

Think of it like this. A pattern is like a cookie cutter: press it onto dough of any colour and you get the same shape. a2−b2 cuts out (a+b)(a−b) whether the dough is x, 3x or y+1. The cutter only works if the dough fits under it; a sum of squares is the wrong shape, however similar it looks.

Core idea. An algebraic pattern is a recurring identity like a2−b2 that you match-and-fill instead of re-deriving.


When to Use

Reach for a pattern when an expression has two perfect squares joined by a minus, a trinomial whose end terms are squares, or two cubes joined by a plus or minus. Check each slot: is every piece really a square or a cube, like 49x2=(7x)2? A sum of two squares such as 9x2+16 does not factor over the real numbers; if no pattern fits, use general factoring methods such as the sum-and-product search.

Tip. Ask: Does this expression match the template of a known identity slot-for-slot?

How to Recognize It

Count the terms, then check whether each end term is a perfect square or cube and which sign joins them.

  1. Are there exactly two terms, both perfect squares, joined by a minus sign?

    Then it is a difference of squares: 25y2−1=(5y+1)(5y−1). Joined by a plus, as in 25y2+1, it does not factor over the real numbers, and no identity applies.

  2. Are there three terms whose first and last are squares, with a middle term equal to twice their product?

    That is a perfect square trinomial: x2−10x+25=(x−5)2, since 2⋅x⋅5=10x. With any other middle term, as in x2−10x+21, use the sum-and-product search of general factoring.

  3. Are the two terms perfect cubes, like 8x3 and 27?

    Use the sum or difference of cubes: 8x3+27=(2x+3)(4x2−6x+9). Each term must be an exact cube, so check the coefficient: 8=23 fits, while 9 does not.

  4. Are you given a product and asked for the sum form?

    Then the identity runs the other way, which is expanding: (x+4)(x−4)=x2−16 at once. The same identities work in both directions; what you are given decides which way you read them.

Algebraic Pattern compared with Factoring (general), Expanding/multiplying, and Perfect square trinomial

All four rows connect the same products and sums. Ask what the expression looks like: a ready-made template such as a2−b2 (pattern), no template at all (general factoring), a product to open up (expanding), or three terms with a doubled cross term (perfect square trinomial).

Algebraic Pattern

Meaning
Use this when an expression matches the shape of a known identity so you can rewrite it without expanding from scratch.
Key test
Does this expression match the template of a known identity slot-for-slot?
Formula
Key patterns: a2−b2=(a+b)(a−b), a3+b3=(a+b)(a2−ab+b2), a3−b3=(a−b)(a2+ab+b2)
Example
Factor 9x2−16.

Factoring (general)

Meaning
The broader goal of writing as a product; a pattern is one fast route to it.
Key test
Use general factoring when no standard identity fits and you must search for factors.
Example
x2+5x+6=(x+2)(x+3) by trial

Expanding/multiplying

Meaning
Goes the other direction — opens a product into a sum.
Key test
Use when you want to remove parentheses, not create them.
Formula
(a+b)2=a2+2ab+b2
Example
(x+3)2=x2+6x+9

Perfect square trinomial

Meaning
A different identity: a2±2ab+b2, has a middle term.
Key test
Use when there are three terms with a doubled cross term.
Formula
a2+2ab+b2=(a+b)2
Example
x2+6x+9=(x+3)2

Formula & Notation

Key patterns: a2−b2=(a+b)(a−b), a3+b3=(a+b)(a2−ab+b2), a3−b3=(a−b)(a2+ab+b2)
Key identities in R[x]: ∀a,b: a2−b2=(a+b)(a−b); a3±b3=(a±b)(a2∓ab+b2); (a+b)n=∑k=0n(nk)an−kbk.

How to read it: Patterns are written as identities using =. The letters a, b represent any expression that fits the template.

Worked Examples

Example 1 — Spot difference of squares

Easy

Factor 9x2−16.
Show the steps and the answer
  1. Check each term: 9x2=(3x)2 and 16=42, joined by a minus.

    The difference of squares template needs exactly a square minus a square.

  2. Fill the slots: a=3x and b=4.

    Each slot takes the expression that was squared, not the square itself.

  3. Write (a+b)(a−b)=(3x+4)(3x−4).

    The identity turns the difference directly into a product.

  4. Expand to confirm: 9x2−12x+12x−16=9x2−16.

    The middle terms cancel, as they always do for this pattern.

Answer: (3x+4)(3x−4)

Takeaway: Write each term as something squared, fill the slots a and b, and the product (a+b)(a−b) follows.

Example 2 — Looks like a pattern but is not

Standard

Factor 9x2+16.
Show the steps and the answer
  1. Compare with the template: (3x)2+42 is a sum of squares, not a difference.

    The difference of squares requires a minus sign between the squares.

  2. Test the tempting answers: (3x+4)(3x−4)=9x2−16 and (3x+4)2=9x2+24x+16.

    Neither product gives 9x2+16, so the familiar patterns do not fit.

  3. Look for real roots: 9x2+16=0 would need x2=−169, which no real number satisfies.

    Real linear factors would make the expression zero at real values of x, so no real factorisation exists.

  4. Check for a common factor: 9 and 16 share none.

    With no shared factor and no real roots, the expression stays as it is.

Answer: Does not factor (over the reals)

Takeaway: A sum of two squares does not factor over the real numbers; check the sign before using the difference of squares.

Example 3 — Find the mistake: cube signs

Application

Factor x3−8. Mia writes: "x3−8=(x−2)(x2−2x+4)." Find the mistake and correct it.
Show the steps and the answer
  1. Match the template: x3−8=x3−23, so a=x and b=2 in a3−b3=(a−b)(a2+ab+b2).

    Writing 8 as 23 shows which cube identity applies.

  2. Expand Mia's answer: (x−2)(x2−2x+4)=x3−2x2+4x−2x2+4x−8=x3−4x2+8x−8.

    Extra x2 and x terms appear, so Mia's factors do not multiply to x3−8.

  3. Fix the sign: the middle term of the second factor is +ab=+2x, giving (x−2)(x2+2x+4).

    In a difference of cubes the middle sign is opposite to the minus in (a−b), and the last term is always positive.

  4. Check by expanding: x3+2x2+4x−2x2−4x−8=x3−8.

    The middle terms now cancel in pairs.

Answer: (x−2)(x2+2x+4)

Takeaway: For cubes, the binomial factor copies the sign, the next sign is the opposite, and the last term is always positive.

Where You'll See It

  • Multiplying numbers either side of 100

    97×103 fits the difference of squares: (100−3)(100+3)=1002−32=10000−9=9991. Anyone who knows the pattern multiplies numbers equally spaced around a round number in their head.

  • Squaring a number just over 100

    The perfect-square pattern (a+b)2=a2+2ab+b2 gives 1022=10000+400+4=10404 in one line, with a=100 and b=2.

  • Tiling the path around a pool

    A square pool of side x m has a 1 m path around it, so the path's area is (x+2)2−x2. The difference of squares gives (x+2+x)(x+2−x)=2(2x+2)=4x+4. For a 6 m pool, the builder orders tiles for 28 m².

Common Mistakes

  1. The slip: Forcing a2+b2 to factor as (a+b)(a−b)

    Instead: only the DIFFERENCE of squares factors; the sum does not over the reals.

  2. The slip: Mismatching the cube signs (a3−b3 vs a3+b3)

    Instead: SOAP: the middle term sign is Opposite the binomial sign, the last is Always Positive.

  3. The slip: Missing that a coefficient is a perfect square (49x2=(7x)2)

    Instead: check whether each piece is itself a square or cube before deciding the pattern fits.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Factor x2−49 completely using a pattern.

    Hint: Is 49 a perfect square?

  2. Expand (2x+3)2 using a pattern.

    Hint: Use (a+b)2=a2+2ab+b2.

  3. Factor 49x2−81 completely using a pattern.

    Hint: Write each piece as something squared.

  4. Factor x3−8 completely using a cube pattern.

    Hint: 8 is a perfect cube. Use the difference-of-cubes pattern.

  5. Is x2+10x+25 a difference of squares or a perfect-square trinomial? Factor it.

    Hint: Count the terms and look at the middle one.

  6. A student factors a3+27 as (a+3)(a2+3a+9). Find the mistake.

    Hint: Check the sign of the middle term in the sum-of-cubes pattern.

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Why does a2+b2 not factor when a2−b2 does?

Over the real numbers, a product (x+p)(x+q)(x+p)(x+q) is zero at x=−px=-p and x=−qx=-q. But x2+9x^2+9 is at least 9 for every real xx, so it is never zero and can have no such factors. With complex numbers, where i2=−1i^2=-1, it does factor: x2+9=(x+3i)(x−3i)x^2+9=(x+3i)(x-3i). So 'does not factor' always means not over the reals.

Is there an identity for fourth powers or higher?

Yes, and they build from the basic ones. a4−b4a^4-b^4 is a difference of squares of a2a^2 and b2b^2, so it equals (a2+b2)(a+b)(a−b)(a^2+b^2)(a+b)(a-b). In general an−bna^n-b^n always has a−ba-b as a factor; for instance a5−b5=(a−b)(a4+a3b+a2b2+ab3+b4)a^5-b^5=(a-b)(a^4+a^3b+a^2b^2+ab^3+b^4). Higher identities rarely need memorising, because you can derive them from small ones.

Where do these identities come from?

Each one is an expansion read backwards. Multiply (a+b)(a−b)(a+b)(a-b) and the cross terms −ab-ab and +ab+ab cancel, leaving a2−b2a^2-b^2. Multiply (a−b)(a2+ab+b2)(a-b)(a^2+ab+b^2) and four of the six products cancel in pairs, leaving a3−b3a^3-b^3. So if you forget an identity, expand a guess and see whether the middle terms vanish.

Do these identities help with anything beyond factoring?

Yes. Completing the square uses the perfect-square identity to rewrite x2+6x+2x^2+6x+2 as (x+3)2−7(x+3)^2-7, which puts the parabola's vertex at (−3,−7)(-3,-7). Rationalising a denominator uses the difference of squares: multiplying 15−2\frac{1}{\sqrt{5}-2} by 5+25+2\frac{\sqrt{5}+2}{\sqrt{5}+2} turns the bottom into 5−4=15-4=1. The same few templates keep returning in later topics.

Learning Path

← Before

Expressions
Algebraic Pattern

You are here

You need Expressions (working with squares, cubes and products) first. Algebraic patterns add a set of templates, the difference of squares, perfect squares and sums and differences of cubes, that you match slot by slot instead of factoring from scratch. Next, Factoring uses these patterns alongside other methods, and Algebraic Identities extends the list and proves each one.

See Also