Completing the Square
AlgebraCompleting the square is a method of rewriting a quadratic expression into vertex form by adding and subtracting a carefully chosen constant to create a perfect square trinomial.
Formula
x^2 + bx + \left(\frac{b}{2}\right)^2 = \left(x + \frac{b}{2}\right)^2
Definition
Completing the square is a technique that rewrites a quadratic like $x^2 + bx$ into a perfect square trinomial by adding $(b/2)^2$. It converts a quadratic into vertex form.
Example
$x^2 + 6x$: half of $6$ is $3$, and $3^2 = 9$. Add and subtract $9$: $x^2 + 6x + 9 - 9 = (x+3)^2 - 9$.
Key Insight
Think of it as making a square: $x^2 + 6x$ is almost a perfect square. Add just enough ($9$) to complete the square, then subtract it to keep the value the same.
Definition
To complete the square for $ax^2 + bx + c$: (1) factor out $a$ from the first two terms if $a$ is not $1$; (2) add $(b/2a)^2$ inside (and subtract it outside to keep balance); (3) write as a perfect square trinomial in vertex form $a(x + b/(2a))^2 + (c - b^2/(4a))$.
Example
$2x^2 - 12x + 7$: factor $2$: $2(x^2 - 6x) + 7$. Half of $-6$ is $-3$, square is $9$. Add inside: $2(x^2 - 6x + 9 - 9) + 7 = 2(x-3)^2 - 18 + 7 = 2(x-3)^2 - 11$. Vertex: $(3, -11)$.
Key Insight
Completing the square reveals the vertex form directly and is the method used to derive the quadratic formula. It also solves quadratics when the expression is not factorable over the integers.
Definition
Completing the square is the algebraic foundation for deriving the quadratic formula and converting quadratic forms to canonical form. For the general conic $ax^2 + bxy + cy^2 + dx + ey + f = 0$, completing the square (in both $x$ and $y$) reduces the equation to standard form and classifies the conic. In linear algebra, completing the square in a quadratic form $Q = x^T A x$ corresponds to diagonalizing the matrix $A$ via congruence transformations.
Example
Derive the quadratic formula: $ax^2 + bx + c = 0 \implies x^2 + \frac{b}{a}x = -\frac{c}{a} \implies \left(x + \frac{b}{2a}\right)^2 = \frac{b^2}{4a^2} - \frac{c}{a} \implies x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
Key Insight
In linear algebra, every real quadratic form can be diagonalized by completing the square (Sylvester's law of inertia). This connects the elementary algebraic technique to spectral theory and the classification of quadratic forms over ordered fields.