Algebra & Quadratic Vertex Form

Completing the Square Calculator

Solve quadratic equations and convert standard form to vertex form \(a(x - h)^2 + k\) step-by-step with geometric area model visualizations.

Quick Examples:
Quadratic Coefficients: \(ax^2 + bx + c\)
Cannot be 0
Linear coefficient
Constant term
Solutions / Roots Completed Square Form
Term Added \((b/2a)^2\)

9

Vertex \((h, k)\)

(-3, -16)

Squared Binomial

(x + 3)²

Axis of Symmetry

x = -3

Geometric Visualization of Completing the Square Square + 2 Rectangles + Corner
Step-by-Step Algebraic Working

How to Use the Completing the Square Calculator

  1. Select your goal: Choose Solve Equation (Find Roots) to find the roots of \(ax^2 + bx + c = 0\), or Convert to Vertex Form to obtain the parabola equation \(y = a(x - h)^2 + k\).
  2. Input the coefficients: Type the numbers for \(a\), \(b\), and \(c\). Note that \(a \ne 0\).
  3. Observe the magic completing term: Check the metric card showing the exact quantity \(\left(\frac{b}{2a}\right)^2\) added to both sides of the equation.
  4. Review the squared binomial: Notice how the left-hand side factors neatly into \(\left(x + \frac{b}{2a}\right)^2\).
  5. Study the geometric area model: View the SVG graphic illustrating how the missing corner piece physically completes the geometric square.

Problems This Completing the Square Calculator Solves

Eliminates Non-Monic (\(a \ne 1\)) Fraction Confusions

When the leading coefficient \(a \ne 1\), students struggle with whether to divide through by \(a\) or factor \(a\) out. The calculator clearly handles both pathways without dropped fractions.

Simplifies Fraction Arithmetic in \((b/2a)^2\)

Squaring odd linear coefficients like \(b = 5\) introduces fractions like \((5/2)^2 = 25/4\). Adding these fractions to the constant term on the right side is automated and kept in clean exact form.

Smooth Transition from Standard to Vertex Form

Converting \(y = 2x^2 + 8x - 10\) to \(y = 2(x + 2)^2 - 18\) reveals the vertex immediately. The calculator shows every step of grouping and balancing terms inside and outside the parenthesis.

Provides Geometric Intuition for Algebraic Steps

Most students memorize the steps of completing the square without understanding why it is named that way. The interactive SVG area model demonstrates the geometric origin dating back to ancient Islamic algebra.

Key Features & Capabilities

01
Dual Execution Modes

Toggle between solving equations for roots and converting standard forms to vertex forms.

02
Geometric Area Model

Renders visual SVG diagram highlighting the missing corner square being added.

03
Complex Root Support

Extracts imaginary square roots cleanly when the right-hand side constant is negative.

The Intuitive Mental Model: The Missing Corner Puzzle Tile

Why is it literally called "completing the square"? Because it was originally an ancient geometric puzzle solved with tiles on the floor.

The Incomplete L-Shape

Start with a large square of area \(x^2\). You need to add an area of \(bx\). To keep the shape balanced and symmetrical, slice \(bx\) into two identical rectangular strips of area \(\frac{b}{2}x\). Lay one strip across the top and the other along the right side. You now have an incomplete L-shape.

The Magic Corner Piece

Notice the empty notch in the upper-right corner! Its width is \(\frac{b}{2}\) and its height is \(\frac{b}{2}\). Its area is exactly \(\left(\frac{b}{2}\right)^2\). Dropping in this tiny corner tile completes the large square of side length \(\left(x + \frac{b}{2}\right)\).

Mastering Completing the Square Across Every Skill Level

Level 1: Beginner

The Monic Halve & Square Rule

When leading coefficient \(a = 1\):

  • Isolate \(x^2 + bx\) on one side: move constant \(c\) to the right.
  • Take half of \(b\): \(\frac{b}{2}\).
  • Square it: \(\left(\frac{b}{2}\right)^2\). Add this to both sides.
  • Collapse into a square: \(\left(x + \frac{b}{2}\right)^2\).
Level 2: Intermediate

Factoring \(a > 1\) & Vertex Form

Converting to vertex form \(y = a(x - h)^2 + k\):

  • Factor out \(a\) from the \(x\)-terms only: \(a(x^2 + \frac{b}{a}x)\).
  • Add \(\left(\frac{b}{2a}\right)^2\) inside parentheses.
  • Subtract \(a \cdot \left(\frac{b}{2a}\right)^2\) outside to preserve balance.
  • Vertex is immediately read as \((h, k) = \left(-\frac{b}{2a}, c - \frac{b^2}{4a}\right)\).
Level 3: Advanced STEM

Calculus Integrals & Conic Sections

In advanced university STEM curricula:

  • Calculus Integrals: Transforms \(\int \frac{dx}{x^2 + 4x + 13}\) into \(\int \frac{dx}{(x+2)^2 + 9} = \frac{1}{3}\arctan\left(\frac{x+2}{3}\right)\).
  • Quadric Surfaces: Completing the square across \(x, y, z\) diagonalizes 3D quadrics into standard ellipsoids, hyperboloids, and paraboloids.

Common Traps & Exam Pitfalls to Avoid

⚠️ Forgetting to Scale by \(a\) on the Other Side

In \(3(x^2 - 4x + 4)\), adding \(4\) inside the parentheses actually adds \(3 \times 4 = 12\) to that side of the equation. Adding only \(4\) to the right side breaks equality instantly.

⚠️ Sign Inversion Inside Binomial

The sign inside the squared binomial matches the sign of \(b\). If the middle term is \(-6x\), the binomial is \((x - 3)^2\), not \((x + 3)^2\). Writing a plus sign creates \(+6x\), reversing your solution signs.

⚠️ Rounding Odd Fractions to Decimals

When \(b = 5\), half is \(5/2\) and squared is \(25/4\). Converting to \(2.5\) and \(6.25\) leads to messy rounding errors when taking square roots. Always keep fractions exact: \(\sqrt{25/4} = 5/2\).

The Geometric and Algebraic History of Completing the Square

In the 9th century, Persian mathematician Muhammad ibn Musa al-Khwarizmi developed the geometric technique of completing the square in his treatise The Compendious Book on Calculation by Completion and Balancing.

To solve an equation like \(x^2 + bx = c\):

  1. Draw a square of side length \(x\), representing the area \(x^2\).
  2. Divide the term \(bx\) into two equal strips of area \(\frac{b}{2}x\), placing one strip along the top edge and the other along the right edge.
  3. The resulting L-shaped figure has an area of \(x^2 + bx = c\).
  4. Notice the missing corner piece in the top-right corner. It has dimensions \(\frac{b}{2} \times \frac{b}{2}\), with area \(\left(\frac{b}{2}\right)^2\).
  5. By adding \(\left(\frac{b}{2}\right)^2\) to the figure, you literally complete the square into a larger square of side length \(\left(x + \frac{b}{2}\right)\).

Deriving Vertex Form: \(y = a(x - h)^2 + k\)

When completing the square on a function \(y = ax^2 + bx + c\), we keep the expression balanced on one side:

\(y = a\left(x^2 + \frac{b}{a}x\right) + c\)

Adding and subtracting \(\left(\frac{b}{2a}\right)^2\) inside the parenthesis:

\(y = a\left(x + \frac{b}{2a}\right)^2 + \left(c - \frac{b^2}{4a}\right)\)

This yields the vertex coordinates \(h = -\frac{b}{2a}\) and \(k = c - \frac{b^2}{4a}\).

Worked Step-by-Step Examples

Example 1: Solving Quadratic (\(a = 1\))

Solve \(x^2 + 6x - 7 = 0\)

Step 1: Move constant to right side: \(x^2 + 6x = 7\).

Step 2: Add \((b/2)^2\) to both sides: \((6/2)^2 = 3^2 = 9\). Add \(9\):

\(x^2 + 6x + 9 = 7 + 9 \implies (x + 3)^2 = 16\).

Step 3: Take square root of both sides: \(x + 3 = \pm 4\).

Roots: \(x = -3 + 4 = 1\) and \(x = -3 - 4 = -7\).

Example 2: Vertex Form Conversion (\(a = 2\))

Convert \(y = 2x^2 - 8x + 3\)

Step 1: Factor leading coefficient from \(x\)-terms:

\(y = 2(x^2 - 4x) + 3\).

Step 2: Complete square inside parentheses: Add and subtract \((-4/2)^2 = 4\):

\(y = 2(x^2 - 4x + 4 - 4) + 3 = 2(x - 2)^2 - 8 + 3\).

Vertex Form: \(y = 2(x - 2)^2 - 5\). Parabola vertex is at \((h, k) = (2, -5)\).

Frequently Asked Questions

What is the method of completing the square?
Completing the square is an algebraic technique used to transform any quadratic expression ax^2 + bx + c into a perfect square binomial squared plus a constant: a(x - h)^2 + k. It allows you to solve quadratic equations, find the vertex of a parabola, and integrate rational functions in calculus.
What is the formula for the term added to complete the square?
For a monic quadratic x^2 + bx, the term added is (b / 2)^2. When the leading coefficient 'a' is not 1, you first divide by 'a' (or factor 'a' out), making the term to add inside the parenthesis equal to (b / (2a))^2.
How is the quadratic formula derived from completing the square?
The quadratic formula is derived by completing the square on the general standard form ax^2 + bx + c = 0. Dividing by a, adding (b / (2a))^2 to both sides, and taking the square root yields the exact formula x = (-b ± sqrt(b^2 - 4ac)) / (2a).
Why is completing the square useful for graphing parabolas?
Completing the square converts standard form y = ax^2 + bx + c into vertex form y = a(x - h)^2 + k. From vertex form, you can immediately read the parabola's vertex (h, k), axis of symmetry x = h, and maximum or minimum value without calculating derivatives.
Can completing the square solve quadratics with complex roots?
Yes. When the right-hand side is negative after isolating the squared binomial, taking the square root introduces the imaginary unit i = sqrt(-1), yielding two complex conjugate roots of the form h ± v*i.
What is the geometric meaning behind 'completing the square'?
Geometrically, an expression like x^2 + bx represents a large square of area x^2 and two adjacent rectangles each of area (b/2)*x. To complete this L-shaped region into a single large square of side length (x + b/2), you must physically add a missing corner square of area (b/2)^2.