Upper secondary · selected topics

Squaring identities and factorisation – with examples

Recognising the pattern in an expression makes it easier to expand or factorise it. Here you can see the rules in use.

Try six questions

The squaring identities

First squaring identity

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

Example: (x + 3)2 = x2 + 2 · x · 3 + 32 = x2 + 6x + 9

Example: (2x + 5)2 = (2x)2 + 2 · 2x · 5 + 52 = 4x2 + 20x + 25

Second squaring identity

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

Example: (x − 4)2 = x2 − 8x + 16

Example: (3x − 2)2 = 9x2 − 12x + 4

Difference of two squares

(a + b)(a − b) = a2 − b2

Example: (x + 7)(x − 7) = x2 − 49

Example: (3x + 4)(3x − 4) = 9x2 − 16

Identities

The squaring rules and difference of two squares are identities — they hold for all values of a and b. An identity is not an equation to solve, but a rewriting that is always true.

First squaring identity
(a+b)2 = a2+2ab+b2
Second squaring identity
(a−b)2 = a2−2ab+b2
Difference of two squares
(a+b)(a−b) = a2−b2
Common mistake: (a + b)2 ≠ a2 + b2. People often forget the double product 2ab!

Completing the square

To write x² + bx as a square, take half of b, square that number, and both add and subtract the same value. This keeps the value of the expression unchanged.

x² + bx = (x + b/2)² − (b/2)²

For x² + 8x half of eight is four: x² + 8x = (x + 4)² − 16. Check by expanding the brackets: x² + 8x + 16 − 16.

For x² − 6x + 5 half of −6 is −3: (x − 3)² − 9 + 5 = (x − 3)² − 4. The 5 from the original expression must be kept.

Factorising and simplifying

Factorising quadratic expressions

When we know the roots x1 and x2, we can write:

ax2 + bx + c = a(x − x1)(x − x2)

Example 1: Factorise x2 − 5x + 6

Find the roots: Sum 5, product 6 → the numbers 2 and 3. x² − 5x + 6 = (x − 2)(x − 3)

Example 2: Factorise x2 − 4

Difference of two squares: x² − 4 = x² − 2² = (x + 2)(x − 2)

Example 3: Factorise 2x2 + 6x

Common factor: 2x² + 6x = 2x(x + 3)

Simplifying algebraic fractions

Factorise the numerator and denominator, and cancel common factors:

Example: Simplify x2 − 9x + 3

Factorise the numerator using the difference of two squares: x² − 9 = (x + 3)(x − 3)
Simplify: (x + 3)(x − 3) / (x + 3) = x − 3   (for x ≠ −3)

Example: Simplify x2 − x − 6x2 − 4

Factorise the numerator: x² − x − 6 = (x − 3)(x + 2)
Factorise the denominator: x² − 4 = (x + 2)(x − 2)
Cancel (x + 2): (x − 3)(x + 2) / ((x + 2)(x − 2)) = (x − 3) / (x − 2)   (for x ≠ −2)

Equations with the variable in the denominator

When x is in the denominator, we must state restrictions on x (the denominator cannot be zero) and check for extraneous solutions.

Example 1 (valid solution): Solve 1x − 2 + 3 = xx − 2

Restriction: x ≠ 2 (the denominator cannot be zero).
Multiply both sides by (x − 2): 1 + 3(x − 2) = x
Expand and solve: 1 + 3x − 6 = x   ⇒   3x − 5 = x   ⇒   2x = 5   ⇒   x = 2.5
Check the restriction: x = 2.5 ≠ 2 ✓ The solution is valid.

Example 2 (extraneous solution): Solve xx − 3 = 3x − 3

Restriction: x ≠ 3 (the denominator cannot be zero).
Multiply both sides by (x − 3): x = 3
Check the restriction: x = 3 violates x ≠ 3!   Extraneous solution.
Conclusion: The equation has no solution.
Why is the solution extraneous? When we multiplied by (x − 3), we assumed it was allowed — meaning x ≠ 3. If the answer is x = 3, we have performed an invalid operation. Always check the restriction at the end.

Ready to try it yourself?

Try six questions at your own pace and get tips on which section to start with. No account needed.

Try six questions

Selected explanations for practice and revision. Levels may vary between examples.