<s>[INST] Why doesn't this method of calculating Gaussian curvature of a sphere work? Suppose we have a sphere defined as $x^2 + y^2 + z^2 = 9$. With radius of 3, we know the Gaussian Curvature should be $\frac{1}{9}$ at every point on the surface.
Since this defines a level set, the gradient gives the normals. So, the normals should be
$$\begin{bmatrix}
 2x \\\\
 2y \\\\
 2z 
\end{bmatrix}$$
We can then normalize these normals, giving
$$\begin{bmatrix}
 \frac{2x}{\sqrt{4x^2+4y^2+4z^2}} \\\\
 \frac{2y}{\sqrt{4x^2+4y^2+4z^2}} \\\\
 \frac{2z}{\sqrt{4x^2+4y^2+4z^2}} \\\\
\end{bmatrix}$$
By my understanding, this gives us the surface normals on the unit sphere (the Gauss Map).
According to Wolfram MathWorld's article on Gauss Map, if we take the partial derivatives of the Gauss Map function, and then take the determinant of that matrix, we should get the curvature. The matrix in question is
$$\begin{bmatrix}
 \frac{y^2+z^2}{{(x^2+y^2+z^2)}^{\frac{3}{2}}} & \frac{-xy}{{(x^2+y^2+z^2)}^{\frac{3}{2}}} & \frac{-xz}{{(x^2+y^2+z^2)}^{\frac{3}{2}}} \\\\
 \frac{-xy}{{(x^2+y^2+z^2)}^{\frac{3}{2}}} & \frac{x^2+z^2}{{(x^2+y^2+z^2)}^{\frac{3}{2}}} & \frac{-yz}{{(x^2+y^2+z^2)}^{\frac{3}{2}}} \\\\
 \frac{-xz}{{(x^2+y^2+z^2)}^{\frac{3}{2}}} & \frac{-yz}{{(x^2+y^2+z^2)}^{\frac{3}{2}}} & \frac{x^2+y^2}{{(x^2+y^2+z^2)}^{\frac{3}{2}}}
\end{bmatrix}$$
However, if we pick a point on the sphere, (0,3,0), then the resulting determinant is zero when we plug in that point. Where am I going wrong? The result should be $\frac{1}{9}$.
 [/INST] First observe that your normalization simplifies greatly since $x^2 + y^2 + z^2 = 9$.  So really the unit normal vector is just $\frac{1}{3} (x,y,z)$.  Now the Gauss map takes the sphere to the unit sphere and the differential of this in coordinates should be a two by two matrix since this is a map between surfaces.  Locally we can choose any two of $x,y,z$ to serve as coordinates on the sphere.  Then the differential of the Gauss map in such coordinates is just 1/3 times the (2x2) identity matrix so the determinant is 1/9.
</s>