This is about something that I found intriguing while computing some geometric identities for the cylinder of radius $r$ which we denote by $C = \{(r\cos(\theta),r\sin(\theta),z) : \theta \in [0,2\pi), z \in \mathbb{R}\}$. We see that each point in the cylinder can be identified with a tuple $(\theta,z)$ which we take as coordinates.
A metric $g$ for $C$ can be induced by pulling back the Riemannian metric via the inclusion $\iota : C \rightarrow \mathbb{R}^3$. Then we see that $$g_C = \iota^*(g) = d(r\cos(\theta))^2 + d(r\sin(\theta))^2 + d(z)^2 = r^2d\theta^2 + dz^2.$$Then, $$g_C = \begin{pmatrix}r^2 & 0 \\ 0 & 1\end{pmatrix},$$so that $$\hat{g} = \begin{pmatrix} 1& 0 \\ 0&1/r^2\end{pmatrix}.$$From this we compute the gradient of $f : C \rightarrow \mathbb{R}$, $$\nabla f = (df)^\sharp = g^{ij} \frac{\partial f}{\partial x^i}\frac{\partial}{\partial x^j} = \frac{\partial f}{\partial z}\frac{\partial}{\partial z}+\frac{1}{r^2}\frac{\partial f}{\partial \theta}\frac{\partial}{\partial \theta}.$$
From this we can also see the gradient in polar coordinates since $C \rightarrow \mathbb{R}^2 - \{0\} \cong S^1$ by $(\theta,z) \mapsto (\theta,R)$. Changing $z$ with $R$ gives the gradient in polar coordinates!
The Laplace operator for the cylinder reads $$ \Delta = -\frac{1}{\sqrt{\det{g}}}\frac{\partial}{\partial x^i}\left(g^{ij}\sqrt{\det{g}}\frac{\partial}{\partial x^j}\right) = -\frac{1}{r}\frac{\partial}{\partial \theta}\left(r\frac{\partial}{\partial \theta}\right) - \frac{1}{r}\frac{\partial}{\partial z}\left(\frac{1}{r}\frac{\partial}{\partial z}\right) = -\frac{\partial^2}{\partial \theta^2} - \frac{1}{r^2}\frac{\partial^2}{\partial z^2}.$$
Or is it that the coordinates change for the inverse matrix? i.e. $\hat{g}^{ij}$ considers first the $j$ coordinate? i.e. it should instead be $$-\frac{\partial^2}{\partial \theta^2} - \frac{1}{r^2}\frac{\partial^2}{\partial z^2} \rightarrow -\frac{\partial^2}{\partial z^2} - \frac{1}{r^2}\frac{\partial^2}{\partial \theta^2}.$$
Another question is that if this is in fact correct and if there's something more happening under the hood for the gradient to coincide with the Laplacian (up to a minus sign)?
Thanks in advance.