The vertex of a parabola and completing the square

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

To do this we complete 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+2x^2 - 2x + 3 = (x^2 - 2x + 1) - 1 + 3 = (x - 1)^2 + 2

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 22 at x=1x = 1.

The vertical line x=1x = 1 through the vertex is the axis of the parabola. For example x=0x = 0 and x=2x = 2 both give y=3y = 3: points equally far to the left and right of the axis have the same height.

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 (0,0)(0, 0) 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 two large dots on the graph are the vertex (0,0)(0, 0) of y=x2y = x^2 and the vertex (1,2)(1, 2) of y=x22x+3y = x^2 - 2x + 3.