Confusion over calculating the gradient of a function $0 = f(x,y,z)$ VS. $z = f(x,y)$ So, I came across this question:

A plane perpendicular to the x-y plane contains the point (2, 1, 8) on the paraboloid $z = x^2 + 4y^2$. The cross-section of the paraboloid created by this plane has slope $0$ at this point. Find an equation of the plane.

I was able to figure it out by finding the gradient $<f_x, f_y>$ at the mentioned point and using that as my normal, to get an answer of $4(x-2)+8(y-1)=0$. All is well and good. Then I came across this question:

Find an equation for the plane tangent to $7=x^2 - 3y^2 +z^2 = 7$ at the point $(1,1,3)$.

Since this equation is not in terms of $z$, I used implicit differentiation to find $\frac{\partial{f}}{\partial{x}}$ and $\frac{\partial{f}}{\partial{y}}$, and thought of using these as my normal to the plane. However, looking at the back, they had an answer of $2(x-1) - 6(y-2) + 6(z-3)$. That is, they treated the function as $f(x,y,z)$ and just found the three partial derivatives, and used that as their normal. I don't quite understand why they can do this. The function is in three dimensions. So shouldn't the gradient have only two? Also, even if I assume we are allowed to do this, for the previous question, I should be able to write $0 = x^2 + 4y^2 - z$ and find a gradient $<2x, 8y, -1>$ just like the second question, but that changes my whole answer. So why is it not allowed in the first question, but allowed in the second?
 A: Hmm good question. So, suppose you have an equation $F(x,y) = x^2 + y^2-1$, now the level sets of that scalar functions are circles as long as $F(x,y)>-1$ (why?). Now, recall that gradient of $F$ is perpendicular to level sets and hence $\nabla F$ is perpendicular to the circle passing through point $(x,y)$. If you evaluate this function on a point on the circle, you can guess that you would get a vector in normal direction to circle.
Concrete example, consider the point $(0,1)$ on circle $x^2 +y^2=1$, to get the normal vector here rearrange to make it $F(x,y)=0$ and then take the grad:
$$ \nabla F = <2x,2y>$$
To get the unit normal divide by magnitude:
$$ \hat{n} = \frac{<x,y>}{\sqrt{x^2 +y^2} } = <x,y>$$
Plug in $(0,1)$ and you can see that this is indeed the unit normal at the point
Tl;dr: Bringing all the variables of a three variable equation to one side and gradien'ting it gives the normal to the surface corresponding to that equation.
Btw to compare with the first question, notice that the plane is not really tangent to the paraboloid.
