Klein-Gordon equation from general relativity? I am trying to derive the Klein-Gordon equation from Einstein's field equation, since the energy momentum tensor for the Klein-Gordon equation is defined as:
$$T^{\mu\nu} =\partial^{\mu}\phi \ \partial^{\nu}\phi-\eta^{\mu\nu}L_{KG}$$
where $L_{KG}$ is Klein-Gordon Lagrangian, defined as:
$$L_{KG}=\frac{1}{2}\partial_{\mu}\phi \ \partial^{\mu}\phi-\frac{1}{2}m^{2}\phi^{2}.$$
If I substitute above Energy-momentum tensor in Einstein's field equation and trying to solve for Einstein tensor, will I get the Klein-Gordon equation of motion?
 A: To derive a field equation (equation of motion) one needs an action (or a Lagrangian). In this particular scenario you mention, the action will be
$$S = \int d^4x \sqrt{-g} \left(\frac{R}{2} - \frac{1}{2}\partial^{\mu}\phi\partial_{\mu}\phi - \frac{1}{2}m^2\phi^2\right)$$
In this action, we have considered two fields. The gravitational metric field $g_{\mu\nu}$ which is hidden in the volume element through the determinant term $\sqrt{-g}$, in the Ricci scalar $R \equiv R_{\mu\nu}g^{\mu\nu}$, and in the kinetic energy of the scalar field, since, $\partial_{\mu}\phi\partial^{\mu}\phi = g^{\mu\nu}\partial_{\mu}\phi\partial_{\nu}\phi$, and the scalar field $\phi$. Hence these two types of field are coupled minimally via the volume element in this action. By variation with respect to the metric and the scalar fields, one obtains
$$G_{\mu\nu} = T_{\mu\nu} \equiv \partial_{μ}\phi\partial_{ν}\phi - \cfrac{1}{2}g_{μν}g^{αβ}\partial_{α}\phi\partial_{β}\phi - g_{\mu\nu}m^2\phi^2/2$$
$$\Box \phi = m^2\phi$$
So, one can obtain the Klein-Gordon equation without using anything but the variational principle. In order to obtain the Klein-Gordon equation from general relativity as you mention you will need to use the fact that the Einstein tensor is covariantly free
$$\nabla^{\mu} G_{\mu\nu}=0$$
Now applying the divergence free property $\nabla^{\mu} G_{\mu\nu}=0 \to \nabla^{
\mu}T_{\mu\nu}=0$, you will end up with the Klein-Gordon equation.
A: The Einstein field equations give you the dynamical equations for the metric tensor, which is taken as a second rank tensor field whose evolution describes the evolution of the background. The Klein Gordon equation is the dynamical equation for a scalar field in a fixed background. They are fundamentally different things.
What you can do of course, is to start with an action that has a scalar field coupled to gravity (this could be done in many ways), and by varying the action with respect to the scalar field (or the matter field) obtain the Klein Gordon equation. Note that this is not a special case of the Einstein equations since in deriving those, we vary the Einstein Hilbert action with respect to the metric tensor field. You don't need a dynamical background (metric) to derive the Klein Gordon equation, and you don't need a scalar field to derive the Einstein equations.
Update in response to a comment:
The divergence of the energy momentum tensor being zero is true and has a more geometrical origin (called the Bianchi identity), but the equations of motion depend on the matter Lagrangian. That is to say, even for a scalar field you could have any Lagrangian. The usual Klein Gordon Lagrangian has a specific form for the EM tensor. But I could very well have a different Lagrangian with a scalar field (eg the $\phi^4$ theory). In this case, the form of the EM tensor will also be different. This EM tensor will also be divergenceless, but demanding this will not give you the KG equation.
As an aside, note that dynamical equations for a matter field (or any field) are obtained by varying the action with respect to that field. As I mentioned previously, the Einstein equations are obtained by varying the (Einstein-Hilbert) action with respect to the metric.
Further, regarding the point about the vanishing divergence of the EM tensor. It can be shown that if I have an action of the form $\mathcal{S}_Q = \int d^4 x \text{ }\sqrt{-g} Q$ where $Q$ is a scalar, then demading that $\delta \mathcal{S}_Q = 0$ will always give me some tensor $M^{\mu \nu}$ such that $\nabla_{\mu}M^{\mu \nu} = 0$. The fact that the Einstein tensor and the EM tensor obey this are simply examples of this more general fact.
