A definition of the parabola that I like is the set of all points equidistant from a line (directrix) and a point not on the line (focus). If we're talking about a function, then the directrix is obviously horizontal.
Let the directrix be the line
y=k and the focus be the point
(xf,yf). Using the definition above, we may then state:
[MATH]\left(x-x_f\right)^2+\left(y-y_f\right)^2=(y-k)^2[/MATH]
[MATH]\left(x-x_f\right)^2+y^2-2y_fy+y_f^2=y^2-2ky+k^2[/MATH]
[MATH]\left(x-x_f\right)^2+y_f^2-k^2=2y\left(y_f-k\right)[/MATH]
[MATH]y=\frac{\left(x-x_f\right)^2+y_f^2-k^2}{2\left(y_f-k\right)}[/MATH]
Now, we know the axis of symmetry will be the line through the focus and perpendicular to the directrix, which is
x=xf and the vertex will be at the point on the axis of symmetry midway between the focus and directrix which is
(h,k)=(xf,2k+yf), and so we obtain:
[MATH]y=\frac{1}{2\left(y_f-k\right)}\left(x-h\right)^2+k[/MATH]
We then see that if the focus is above the directrix, the parabola opens upwards, and if the focus is below the directrix, the parabola opens downwards.