Is $T^{\mu\nu}=-\frac{2}{\sqrt{-g}}\frac{\delta S_m}{\delta g_{\mu\nu}}$ a true tensor or a density? The energy-momentum tensor is defined by
$$T^{\mu\nu}=-\frac{2}{\sqrt{-g}}\frac{\delta S_m}{\delta g_{\mu\nu}}$$
where $S_m$ is the matter action
$$S_m =\int d^4x\sqrt{-g}\mathcal{L}_m$$
and $\mathcal{L}_m$ is the matter Lagrangian-density.
If the total expression is a tensor, and the determinant of the metric is not a Lorentz scalar but rather a density, then that leads me to conclude that
$$\frac{\delta S_m}{\delta g_{\mu\nu}}$$
must be some kind of tensor density, rather than a full-fledge Lorentz tensor. Is this correct? If so, how is that possible since the action integrated over $d^4x$ already contains a $\sqrt{-g}$ in the measure? How is the variation of a Lorentz scalar ($S_m$) with respect to a tensor (the metric) not itself a tensor? When people write the energy-momentum tensor as a variation of the action, do they actually mean a variation of $\sqrt{-g}\mathcal{L}$? In that case I think we're really definining the Energy-Momentum Tensor-Density.
 A: If you define $T^{\mu\nu}$ explicitly, by writing
$$
\delta S= -\int d^dx \sqrt{g}\, T^{\mu\nu} \delta g_{\mu\nu},
$$
then the  invariance of $S$ and $d^dx \sqrt{g}$ under coordinate transformations shows that $T^{\mu\nu}$ is a tensor, rather than a tensor density.
I think the definition in terms of $\delta S/\delta g_{\mu\nu}$ is ambiguous  because some people include and some omit the $\sqrt{g}$ in the definition of $\delta S/\delta g_{\mu\nu}$.
A: OP's question touches upon the very definition of a functional/variational derivative:

*

*If we define
$$\frac{\delta\phi(x)}{\delta\phi(y)}~=~\delta^d(x-y),\tag{1}$$
then we have to live with consequences that the RHS is a density.


*If the theory has a density $\rho$ [e.g. if there's a metric tensor $g$, we can construct $\rho=\sqrt{|\det g|}$], then it is possible to define a covariant functional derivative
$$\frac{\delta\phi(x)}{\delta\phi(y)}~=~\frac{\delta^d(x-y)}{\rho(x)},\tag{2}$$
such that the RHS is a scalar.
There is an analogous ambiguity for the functional derivative wrt. other tensor fields, e.g. the metric tensor field that OP asks about:
$$ \frac{\delta g_{\mu\nu}(x)}{\delta g_{\alpha\beta}(y)}
~=~\frac{1}{2}\left( \delta_{\mu}^{\alpha}\delta_{\nu}^{\beta} + \delta_{\nu}^{\alpha}\delta_{\mu}^{\beta}\right)\delta^d(x-y) \tag{1'} $$
versus
$$ \frac{\delta g_{\mu\nu}(x)}{\delta g_{\alpha\beta}(y)}
~=~\frac{1}{2}\left( \delta_{\mu}^{\alpha}\delta_{\nu}^{\beta} + \delta_{\nu}^{\alpha}\delta_{\mu}^{\beta}\right)\frac{\delta^d(x-y)}{\sqrt{|\det g(x)|}}. \tag{2'} $$
See also this related Phys.SE post for a related issue for the Euler-Lagrange (EL) equations.
