MY METHOD:
I thought I would use the conventional method for finding the unit normal vector by calculating the gradient of S. Where $S: x^2 +y^2 - z^2 = 0$.
$\hat n = \frac{\nabla S}{mag[\nabla S]}$
$\hat n = \frac{2x \hat i + 2y \hat j -2z \hat k}{\sqrt{(2x)^2 +(2y)^2 +(2z)^2 }}$
$\hat n = \frac{2x \hat i + 2y \hat j -2z \hat k}{\sqrt{(4x^2 +4y^2 +4z^2 }}$
$\hat n = \frac{2x \hat i + 2y \hat j -2z \hat k}{\sqrt{(4r^2 +4r^2}}$
giving $\hat n$ as:
$\hat n = \frac{x \hat i + y \hat j -z \hat k}{\sqrt{2}}$ which is not equivalent to the solution above.
Also does anyone know exactly what they did? I am having difficult to comprehend it. Why is are they calculating the cross product of the partials? Is it to do with multivariable chain rule - which is so can someone expand on this explanation by going more in depth?
Addition Edit
I saw this equation on the internet but am unsure why that is the case. Why are they multiplying again by the magnitude?
Any help is much appreciated!!



It works well too. Try better with $z-\sqrt{x^2+y^2}=0$
$\vec n=(-z_x,-z_y,1)=\left(\dfrac{-x}{\sqrt{x^2+y^2}},\dfrac{-y}{\sqrt{x^2+y^2}},1\right)=(\cos\theta,\sin\theta,1)$
$d\mathbf S=\vec ndS=(-z_x,-z_y,1)dxdy=(-\cos\theta,-\sin\theta,1)rdrd\theta $
$=(-r\cos\theta,-r\sin\theta,r)drd\theta$