Einstein-Hilbert action

The Einstein-Hilbert action:


 * $$S[g]=\frac{1}{16\pi G}\int d^4x \sqrt{-g}(R-2\Lambda )$$


 * Not sure why S is given as depending g, which he defines to be the determinant of the metric.
 * The metric is denoted by $$g_{\mu \nu }(x)$$(where a mathematician would use "g" to denote the whole matrix).
 * Note that there is an explicit dependence on the location, x, here which is suppressed above
 * R is the "Ricci scalar" which apparently is a tensor since $$R_{\mu \nu }- \frac{1}{2}R g_{\mu \nu }+\Lambda g_{\mu \nu } = 0$$. It would seem that S does not depend on g (and x) alone???