The vertex of a parabola and completing the square

The graph of a quadratic function turns around at its tip, the vertex. Let us find the vertex of y=x22x+3y = x^2 - 2x + 3 by completing the square1.

Completing the square

Half of the coefficient 2-2 of the linear term is 1-1, and we use that (x1)2=x22x+1(x - 1)^2 = x^2 - 2x + 1 contains x22xx^2 - 2x.

x22x+3=(x22x+1)1+3=(x1)2+2\begin{align*} x^2 - 2x + 3 &= (x^2 - 2x + 1) - 1 + 3 \\ &= (x - 1)^2 + 2 \end{align*}

Since (x1)2(x - 1)^2 is a square, it is always at least 00, and it is smallest when x=1x = 1, where y=2y = 2. So the vertex is (1,2)(1, 2), and because a=1>0a = 1 > 0 the parabola opens upward, taking its minimum value there.

The axis

The vertical line x=1x = 1 through the vertex is the axis of the parabola. Points equally far to the left and right of the axis have the same height.

xxyy
0033
1122
2233

Vertex form

The form (x1)2+2(x - 1)^2 + 2 shows that this graph is y=x2y = x^2 shifted 11 to the right and 22 up; indeed the vertex has moved from the origin to (1,2)(1, 2). In general y=a(xp)2+qy = a(x - p)^2 + q is y=ax2y = ax^2 shifted pp right and qq up, with vertex (p,q)(p, q) and axis x=px = p.

The general formula

Completing the square on y=ax2+bx+cy = ax^2 + bx + c gives the following.

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

So the xx-coordinate of the vertex is always b2a-\dfrac{b}{2a}. Here that is 11, matching what we found. The yy-coordinate follows by substituting back.

What the sign of aa decides

Sign of aaOpeningThe vertex is
a>0a > 0upwarda minimum
a<0a < 0downwarda maximum

Either way, the vertex is the point that answers questions about largest and smallest values. The sign of its yy-coordinate also decides whether the parabola meets the xx-axis: here the vertex sits above the axis and the parabola opens upward, so the graph never crosses the xx-axis at all.

The two large dots on the graph are the vertex of y=x2y = x^2 and the vertex of y=x22x+3y = x^2 - 2x + 3.

  1. Completing the square, Wikipedia