# Metric tensor determinant under coordinate transformation

I've been studying GR through Wald's and Carroll's books, and I've been trying to derive one expression.

$$g(x^{\mu^\prime}) = \left|\dfrac{\partial x^{\mu^\prime}}{\partial x^{\mu}}\right|^{-2} g(x^\mu)$$

I'm not going anywhere, I'm stuck in some chain rules, but it does not seem to be the right way, could I do it?

Let's suppose we are transforming from $$x^\mu$$ coordinates to $$y^\alpha$$ coordinates. Then define the transformation $$J^{\alpha}_{\ \ \ \mu} = \frac{\partial y^{\alpha}}{\partial x^\mu}, \ \ [J^{-1}]^\mu_{\ \ \ \alpha} = \frac{\partial x^\mu}{\partial y^\alpha}$$ We can write the metric in terms of the $$y$$ coordinates in terms of the metric in the $$x$$ coordinates as $$g_{\alpha\beta}(y) = [J^{-1}]^\mu_{\ \ \ \alpha} [J^{-1}]^\nu_{\ \ \ \beta}g_{\mu\nu}(x)$$ Now we take the determinant of both sizes and use $$\det(AB)=\det(A)\det(B)$$ and $$\det(A^{-1})=\det(A)^{-1}$$ $$|g(y)| = |J|^{-2}|g(x)|$$ which is the expression you want to derive.
Recall the transformation rule for a doubly covariant tensor, and that $${\rm det}[A^TGA]= {\rm det}[A^T]{\rm det}[G]{\rm det}[A] =({\rm det}[A])^2 {\rm det}[G].$$