Of Notes

Completing the Square

1 min read · revised 11 November 2026 · ·

Junior year algebra still kicking our ass.

We get some quadratic for which we want to achieve a perfect square.

  1. Remove any multiplier from by factoring it out
  2. Halve the and add and subtract it from the expression (temporarily making a sub-quadratic that is perfect)
  3. Square the term and add/subtract inside the parentheses.
Completing the square on \(x^2-4x+5\) gives \((x-2)^2+1\): the same parabola as \(x^2\) (faint), slid right by \(2\) and up by \(1\), so its vertex sits at \((2,1)\).
Fig. 1. Completing the square on gives : the same parabola as (faint), slid right by and up by , so its vertex sits at .

More complicated situations usually arise in the exponent of a Gaussian Distribution where we might end up with terms like:

Where the first square expanded (we are focusing mostly on the powers of ) therefore:

Now performing the expansion and grouping to isolate powers of :

giving us a very nice quadratic form which we abbreviate with , and so we can easily manipulate and actually perform completing the square on:

  1. Factoring out :

  2. Adding a and subtracting the completing square term :

  3. Distributing the :

/ or Ctrl K
search; empty, it shows notes to revise and lately read
m
mark this note to revise, or unmark it
c
cover maths, proofs and solutions to test yourself
n
uncover the next covered item
y
copy this note’s org-roam link
e
copy this note as markdown, LaTeX kept as TeX
p
the next problem to work; there h hints, s shows the solution, x passes it for today
→ ← j k space
turn the page, when reading in pages
l
on the map, trace the greatest distance, then the longest path
double-click
a formula, to copy its TeX
rest on maths
bind a part of a formula and open the wheel of notes it comes from; scroll or ↑ ↓ widens it, 1–6 goes
?
this card