\frac{\delta (\mathcal{L}_{\mathrm{matter}} \sqrt{-g}) }{\delta g_{\mu\nu}} = 2 \frac{\delta \mathcal{L}_\mathrm{matter}}{\delta g_{\mu\nu}} + g^{\mu\nu} \mathcal{L}_\mathrm{matter}.