MathLabs

Grade 8

Algebraic expressions and identities

Expressions built from variables and operations, together with identities that hold for all values.

IntuitionBuilding expressions like LEGO blocks

An algebraic expression is built the way a LEGO model is: start with a few basic pieces — numbers and letters standing for unknown or changing quantities — and snap them together with the operations +,−,×,÷+,-,\times,\div and powers. The letter xx is not a mystery to be feared; it is simply a labelled brick that can represent any number. Once several such bricks are combined, patterns emerge: some combinations always simplify the same way no matter which number replaces the letter. Those reliable patterns are called identities, and they are the shortcuts that make algebra powerful rather than tedious.

Interactive plot of the cubic curve y equals x minus 1, cubed.
The curve y=(x−1)3=x3−3x2+3x−1y=(x-1)^3=x^3-3x^2+3x-1: the identity (a−b)3=a3−3a2b+3ab2−b3(a-b)^3=a^3-3a^2b+3ab^2-b^3 with a=x,b=1a=x, b=1, seen as a shape you can trace.

SchoolMonomials, polynomials and the seven notable identities

Definition: Monomial, polynomial, degree

A monomial is a single product of numbers and variables raised to whole-number powers, such as 3x2y3x^2y. A polynomial is a sum of finitely many monomials, such as x2+2x+1x^2+2x+1; each monomial in the sum is called a term. The degree of a monomial is the sum of the exponents of its variables (so 3x2y3x^2y has degree 33), and the degree of a polynomial is the largest degree among its terms.

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

Here aa and bb stand for any two numbers or expressions; 2ab2ab is the cross term that students most often forget. The identity says that squaring a sum is never as simple as squaring each part separately — the cross term 2ab2ab must always be added.

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

This identity, the difference of two squares, is read in two directions: left to right it expands a product, and right to left it factors a difference of squares back into a product — the direction used most often when solving equations.

(a+b)3=a3+3a2b+3ab2+b3(a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3
The seven notable algebraic identities
NameIdentity
Square of a sum(a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2
Square of a difference(a−b)2=a2−2ab+b2(a-b)^2 = a^2 - 2ab + b^2
Difference of two squaresa2−b2=(a−b)(a+b)a^2 - b^2 = (a-b)(a+b)
Cube of a sum(a+b)3=a3+3a2b+3ab2+b3(a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3
Cube of a difference(a−b)3=a3−3a2b+3ab2−b3(a-b)^3 = a^3 - 3a^2b + 3ab^2 - b^3
Sum of two cubesa3+b3=(a+b)(a2−ab+b2)a^3 + b^3 = (a+b)(a^2 - ab + b^2)
Difference of two cubesa3−b3=(a−b)(a2+ab+b2)a^3 - b^3 = (a-b)(a^2 + ab + b^2)

SchoolTwo theorems, proved algebraically and geometrically

For all real numbers a,ba,b: (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2 and (a−b)2=a2−2ab+b2(a-b)^2 = a^2 - 2ab + b^2.

Why is it true?

Expanding (a+b)2(a+b)^2 by treating it as an ordinary multiplication saves the common error of writing (a+b)2=a2+b2(a+b)^2=a^2+b^2; the identity makes the missing cross term 2ab2ab impossible to forget.

Proof

Step 1 (algebraic proof by direct expansion). Using the distributive law twice, (a+b)2=(a+b)(a+b)=a⋅a+a⋅b+b⋅a+b⋅b=a2+2ab+b2(a+b)^2=(a+b)(a+b)=a\cdot a+a\cdot b+b\cdot a+b\cdot b=a^2+2ab+b^2, since a⋅ba\cdot b and b⋅ab\cdot a are the same product counted twice.

Step 2 (geometric proof by area). Draw a square of side length a+ba+b. Cut it with one horizontal and one vertical line at distance aa from one corner. This splits the big square into four pieces: a square of side aa (area a2a^2), a square of side bb (area b2b^2), and two rectangles of dimensions a×ba\times b (area abab each). Adding the four areas gives a2+2ab+b2a^2+2ab+b^2, and since these four pieces exactly tile the original square, this sum must equal (a+b)2(a+b)^2.

Step 3 (the difference-of-squares version, by substitution). Replacing bb with −b-b in the first identity gives (a−b)2=(a+(−b))2=a2+2a(−b)+(−b)2=a2−2ab+b2(a-b)^2=(a+(-b))^2=a^2+2a(-b)+(-b)^2=a^2-2ab+b^2, so no separate geometric picture is even needed — the algebra transfers the result automatically.

For all real numbers a,ba,b: a3−b3=(a−b)(a2+ab+b2)a^3 - b^3 = (a-b)(a^2 + ab + b^2) and a3+b3=(a+b)(a2−ab+b2)a^3 + b^3 = (a+b)(a^2 - ab + b^2).

Why is it true?

Unlike a difference of squares, a difference or sum of cubes cannot be split using only linear factors of degree one; the quadratic factor a2±ab+b2a^2\pm ab+b^2 is unavoidable, and recognizing this pattern lets students factor expressions that otherwise look unfactorable.

Proof

Step 1 (algebraic proof by expanding the right side). Expand (a−b)(a2+ab+b2)=a3+a2b+ab2−a2b−ab2−b3(a-b)(a^2+ab+b^2)=a^3+a^2b+ab^2-a^2b-ab^2-b^3. The middle terms a2ba^2b and −a2b-a^2b cancel, as do ab2ab^2 and −ab2-ab^2, leaving exactly a3−b3a^3-b^3.

Step 2 (geometric proof by volume). Take a cube of edge length aa (volume a3a^3) and remove a smaller cube of edge length bb from one corner (volume b3b^3); the leftover solid has volume a3−b3a^3-b^3. This leftover solid can be sliced into three rectangular slabs, each of thickness a−ba-b: a slab a×a×(a−b)a\times a\times(a-b), a slab a×b×(a−b)a\times b\times(a-b), and a slab b×b×(a−b)b\times b\times(a-b). Their volumes add to (a−b)a2+(a−b)ab+(a−b)b2=(a−b)(a2+ab+b2)(a-b)a^2+(a-b)ab+(a-b)b^2=(a-b)(a^2+ab+b^2), matching the leftover volume exactly.

Step 3 (the sum-of-cubes version, by substitution). Replacing bb with −b-b in the difference-of-cubes identity gives a3−(−b)3=(a−(−b))(a2+a(−b)+(−b)2)a^3-(-b)^3=(a-(-b))(a^2+a(-b)+(-b)^2), which simplifies to a3+b3=(a+b)(a2−ab+b2)a^3+b^3=(a+b)(a^2-ab+b^2).

SchoolReal-World Applications and Worked Examples

Beyond the classroom, identities are calculation shortcuts. Engineers expanding (L+ΔL)2(L+\Delta L)^2 to estimate how a small change ΔL\Delta L in a beam's length affects its cross-sectional area use exactly the square-of-a-sum identity. In computer science, Karatsuba's fast multiplication algorithm (1960) speeds up multiplying large numbers by rewriting a product of two two-part numbers so that only three multiplications are needed instead of four, a trick built directly on expanding (a+b)(c+d)(a+b)(c+d)-type expressions. Mental-math shortcuts for products like 97×10397\times 103 use the difference-of-squares identity in reverse, turning an unfamiliar multiplication into an easy subtraction.

Example: Expanding an area expression

A square garden has side length (x+5)(x+5) meters. Express its area as an expanded polynomial in xx, then find the area when x=7x=7.

Solution

Step 1 (identify the pattern). The area of a square of side x+5x+5 has the form (a+b)2(a+b)^2 with a=xa=x and b=5b=5.

Step 2 (expand using the identity). By (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2, the area is x2+2⋅x⋅5+52=x2+10x+25x^2+2\cdot x\cdot 5+5^2=x^2+10x+25 square meters.

Step 3 (substitute the given value). At x=7x=7, the area is 72+10⋅7+25=49+70+25=1447^2+10\cdot 7+25=49+70+25=144 square meters, which also checks against direct computation: (7+5)2=122=144(7+5)^2=12^2=144.

Example: Fast mental multiplication with a difference of squares

Compute 97×10397\times 103 mentally by rewriting it as a difference of squares.

Solution

Step 1 (rewrite both factors around 100). Notice 97=100−397=100-3 and 103=100+3103=100+3, so the product 97×10397\times 103 has the form (a−b)(a+b)(a-b)(a+b) with a=100a=100, b=3b=3.

Step 2 (apply the difference-of-squares identity). By a2−b2=(a−b)(a+b)a^2 - b^2 = (a-b)(a+b) read right to left as (a−b)(a+b)=a2−b2(a-b)(a+b)=a^2-b^2, the product equals 1002−32100^2-3^2.

Step 3 (finish the mental arithmetic). 1002−32=10000−9=9991100^2-3^2=10000-9=9991, computed without ever multiplying two two-digit numbers directly.

Using (a+b)2=a2+2ab+b2(a+b)^2 = a^2 + 2ab + b^2 with 53=50+353=50+3, compute 53253^2.

Factor x2−16x^2-16 using the difference of two squares.

A square field originally has side length aa meters. Its side is increased by bb meters. By how much does the area increase?

Which identity is used to quickly compute 97×10397\times 103 mentally?