What is the difference between the normal vector to a surface given by the traditional formula and the one given by the gradient? 
What is the difference between the normal vector to a surface given by the traditional formula and the one given by the gradient?

In my class we learnt that the normal vector to a surface described by a function $f(x,y)$ can be obtained by using this formula:
$$
n=\langle f_x(x_0,y_0), f_y(x_0,y_0),-1 \rangle
$$
So for example I have an ellipsoid $3x^2+2y^2+12z^2=42$. According to the formula above the normal vector is:
$$
n=\bigg\langle-\frac{3x}{\sqrt{12}\sqrt{42-3x^2-2y^2}},-\frac{2y}{\sqrt{12}\sqrt{42-3x^2-2y^2}},-1\bigg\rangle
$$
On the other hand we learnt that the normal vector to a surface can also be obtained by calculating the gradient so:
$$
n=\langle 6x,4y,24z\rangle
$$
Admittedly, the normal vector obtained by gradient is a much simpler calculation.
Are these results equivalent to one another? Is there any difference? Are there cases when one formula has to be used over another?
 A: As you mention, if you have a surface described by $z=f(x,y)$, the normal vector on $(x_0,y_0)$ can be computed by:
$$\vec{n}=\langle f_x(x_0,y_0), f_y(x_0,y_0),-1 \rangle.$$
But $z=f(x,y)$ can also be expressed as implicitly as $g(x,y,z)=f(x,y)-z=0$. In that case, the gradient of $g$ also gives you the normal vector on $(x_0,y_0,z_0)$, where $z_0=f(x_0,y_0)$:
$$\vec{n}=\langle g_x(x_0,y_0,z_0), g_y(x_0,y_0,z_0), g_z(x_0,y_0,z_0) \rangle.$$
Note that if you use the equation of the ellipsoid to substitute $z$ on your second vector. Then normalize both the first and the second one and you will see that both are equal (up to a sign).
You can read about those and many other ways of computing the normal vector here.
A: Well, there are different way to describe a surface with a function
When you say "a surface described by a function $f(x,y)$", you probably mean a surface described by the equation $$
z=f(x,y) \tag{*}$$
and not $$f(x,y)=0$$ because in the second case, the normal vector would have zero $z$ component.
The gradient formula is the general one, and applicable to any surface given by an expression $g(x,y,z)=0$, as in your example (with $g(x,y,z)= 3x^2+2y^2+12z^2-42$). 
Now you can rewrite your Eq. (*) as $$g(x,y,z)=f(x,y)-z=0\,,$$and simply apply the gradient formula to obtain your first expression.
