# Derivative of the Metric Tensor With Respect to a Scalar Field

In Sean Caroll's Spacetime and Geometry Textbook, at page 183 (discussing scalar-tensor theories) Carroll defines a conformal metric by performing a conformal transformation as:

$$\tilde{g}_{\mu\nu} = 16\pi\tilde{G} f(\lambda) g_{\mu\nu}$$

where $$\lambda$$ is some scalar field and f is a function of $$\lambda$$.

On the way he he also defines another scalar field $$\phi$$ in terms of $$\lambda$$. But it is not important the relation between them for this question an can be thought of they are the same.

In page 185, Using $$g^{\alpha\beta} = 16 \pi \tilde{G} f \tilde{g}^{\mu\nu}$$(*) he does the following calculation:

\begin{align} \frac{\delta S_M}{\delta \phi} =& \frac{\partial g^{\alpha\beta}}{\partial \phi} \frac{\delta S_M}{\delta g^{\alpha\beta}}\\ =& \bigg( 16\pi \tilde{G} \frac{df}{d\phi} \bigg)\bigg( -\frac{1}{2} \sqrt{-g} T^M_{\alpha\beta} \bigg) \end{align}

where $$T^M_{\alpha\beta}$$ is energy momentum tensor and $$S_M$$ is the matter piece of the action. and second term in parenthesis is true by definition. What I don't understand is the first term:

\begin{align} \frac{\partial g^{\alpha\beta}}{\partial \phi} = 16\pi \tilde{G}\frac{df}{d\phi} \end{align} looking at (*) this seems fine but isn't the conformal metric $$\tilde{g}_{\mu\nu}$$ who has a $$\phi$$ (or $$\lambda$$) dependence, not ordinary metric $$g_{\mu\nu}$$ . Shouldn't this be true for also their inverses. I would expect to have something like this:

\begin{align} \frac{\partial g^{\alpha\beta}}{\partial \phi} = 16\pi \tilde{G}\frac{df}{d\phi} + 16\pi \tilde{G} f \frac{\partial \tilde{g}^{\alpha\beta}}{\partial \phi} = 0 \end{align}

I appreciate any kind of help.