Computing the metric tensor from its Killing vectors? On page. 139 of Carroll's GR book, during the discussion of Killing vectors, he quotes an explicit coordinate basis representation for the Killing vectors on $S^2$:
\begin{array}{l}
R=\partial_{\phi} \\
S=\cos \phi\,\partial_{\theta}-\cot \theta \sin \phi\,\partial_{\phi} \\
T=-\sin \phi\,\partial_{\theta}-\cot \theta \cos \phi\,\partial_{\phi} . \tag{3.188} 
\end{array}
I am trying to understand why one can go backwards, and compute the metric tensor components from the Killing vectors. It is straightforward to show that
\begin{align}
g^{\mu \nu} = K_i^\mu K_i^\nu
\end{align}
where $\mu, \nu = \theta, \phi$ and $i = 1, 2, 3$ corresponding to the $R, S, T$ Killing vectors, respectively. I can't find a discussion of this sort of calculation of $g^{\mu \nu}$ from Killing vectors in Carroll's book, or anywhere else really. Does this always work? Is there an intuitive physical reason why it should work? I was trying to show that it is true using Killing's equation, but this was unsuccessful.
 A: This cannot work in general since there are manifolds that admit no Killing vectors at all. It also cannot work in general because the Killing vectors are not unique - if $K$ is a Killing vector, then so is $\alpha K$ for $\alpha\in\mathbb{R}$ and if $K$ and $G$ are Killing vectors, then so is $K + \alpha G$.
The formula $g^{\mu\nu} = K_i^\mu K_i^\nu$ is not invariant under such changes of base for the Killing vectors of the 2-sphere - if you choose $R = 2\partial_\phi$ in your example instead, it doesn't work anymore. So this is a particular feature of your specific choice of basis for the algebra of Killing vectors, not a general property of Killing vectors.
A: Adjoint refresher
If you consider the Lie algebra $\mathfrak{g}$ as a vector space, then the Lie algebra has $\mathfrak{g}$ a natural action on the vector space $\mathfrak{g}$. This is called the adjoint representation $\mathrm{ad}_\mathfrak{g}$. It acts as, for $X, Y \in \mathfrak{g}$,
\begin{equation}
    \mathrm{ad}_X Y = [X, Y].
\end{equation}
This is a Lie algebra representation due to the Jacobi identity
\begin{equation}
    [X, [Y, Z]]+[Y, [Z, X]]+[Z, [X, Y]]=0
\end{equation}
because
\begin{align}
    [\mathrm{ad}_X, \mathrm{ad}_Y] Z &= (\mathrm{ad}_X \mathrm{ad}_Y - \mathrm{ad}_X \mathrm{ad}_Y ) Z \\
    &= [X, [Y, Z]] - [Y, [X, Z]] \\
    &= [[X, Y], Z] \\
    &= \mathrm{ad}_{[X, Y]} Z
\end{align}
as required.
Killing Form (first version)
You can define a bilinear form (the Killing form) on $\mathfrak{g}$ as
\begin{equation}
    \kappa(X, Y) = \mathrm{Tr}_\mathfrak{g}( \mathrm{ad}_X \mathrm{ad}_Y).
\end{equation}
The trace is being taken over the vector space $\mathfrak{g}$. Note that if $X$ commutes with all other elements in the Lie algebra, then $\kappa(X, \cdot)$ is degenerate. In particular, this means that we can't use this Killing form for abelian groups, and have to come up with a different bilinear form if you want one. (A popular choice is $\mathrm{Tr}(XY)$.) Actually, we can go a step further. A theorem called "Cartan's Criterion" states that $\kappa$ will be non degenerate as long as $\mathfrak{g}$ is semi-simple. For the rest of this answer we will therefore assume that $\mathfrak{g}$ is indeed semi-simple.
One nice property of the Killing form is that it is invariant under the adjoint action of the inputs.
\begin{equation}\label{killinginv}
    \kappa( \mathrm{ad}_Z X, Y) + \kappa(X, \mathrm{ad}_Z Y) = 0.
\end{equation}
To see this, expand one of the terms
\begin{align}
    \kappa( \mathrm{ad}_Z X, Y) &= \kappa( [Z, X], Y) \\
    &= \mathrm{Tr}_\mathfrak{g} ( \mathrm{ad}_{[Z, X]} \mathrm{ad} ) \\
    &= \mathrm{Tr}_\mathfrak{g} ( \mathrm{ad}_Z \mathrm{ad}_X \mathrm{ad}_Y - \mathrm{ad}_X \mathrm{ad}_Z \mathrm{ad}_Y).
\end{align}
One can then use the cylic property of the trace to see that this term will cancel the other term, proving the result.
Anyway, let's actually compute what this bilinear form is in our basis.
\begin{equation}\newcommand{\ff}[3]{f^{#1 #2}_{\; \; \; \: #3}}
    \kappa^{ab} \equiv \kappa(T^a, T^b).
\end{equation}
Note that
\begin{align}
    \mathrm{ad}_{T^a} \mathrm{ad}_{T^b} T^c &= [T^a, [T^b, T^c]] \\
    &= \ff{b}{c}{d}[T^a,T^d] \\
    &= \ff{b}{c}{d} \ff{a}{d}{e} T^e.
\end{align}
If we want to calculate the trace, then we must extract the $T^c$ component from the above linear combination of $T^e$, and then sum over all $c$. This means that
\begin{equation}
    \kappa^{ab} = \ff{b}{c}{d} \ff{a}{d}{c}.
\end{equation}
The indices involved here reveal that $\kappa^{ab}$ can be thought of as a kind of metric with which we can raise and lower. For instance,
\begin{equation}
    f^{abc} \equiv \kappa^{cd}\ff{a}{b}{d}.
\end{equation}
One nice property of $f^{abc}$ is totally anti symmetry. We already know that
\begin{equation}
    \ff{a}{b}{c} = -\ff{b}{a}{c}
\end{equation}
just from the anti symmetry of the commutator. The antisymmetry under $b \leftrightarrow c$ is given by adjoint invariance of the Killing form we discussed previously, so
\begin{equation}
    0 = \kappa(T^c, [T^a, T^b]) + \kappa([T^a, T^c], T^b) = f^{abc} + f^{acb}
\end{equation}
as desired.
One final nice thing I want to say about the Killing form is that you can use it to construct the quadratic Casimir operator of the Lie algebra.
\begin{equation}
    C \equiv \kappa_{ab} T^a T^b.
\end{equation}
(Like with the metric, $\kappa_{ab}$ is defined to be the inverse matrix of $\kappa^{ab}$.) $C$ is commutes with all Lie algebra elements (in the universal enveloping algebra) because
\begin{align}
    [C, T_c] &= \kappa_{ab} T^a [T^b, T_c] + \kappa_{ab} [T^a, T_c] T^b \\
    &= \kappa_{ab} f^{b}_{\; \; cd} T^a T^d + \kappa_{ab} f^{a}_{\; \; cd} T^d T^b \\
    &= \kappa_{ab} f^{b}_{\; \; cd} T^a T^d + \kappa_{ab} f^{b}_{\; \; cd} T^d T^a \\
    &= \kappa_{ab} f^{b}_{\; \; cd} ( T^a T^d + T^d T^a) \\
    &=  f_{acd} ( T^a T^d + T^d T^a) \\
    &= 0.
\end{align}
In the third line we switch $a \leftrightarrow b$ for half of the terms and used the symmetry of $\kappa_{ab} = \kappa_{ba}$. The final line follows from the complete anti symmetry of $f_{abc}$.
(Recall that the complete anti-symmetry of $f_{abc}$ followed from that fact that $\kappa(X,Y)$ is invariant under the adjoint action, A.K.A. $\kappa([Z,X], Y) + \kappa(X, [Z, Y]) = 0$. Therefore if we cook up any other bilinear form $\kappa'$ which is similarly invariant, then $\kappa'_{ab} T^a T^b$ will likewise commute with the algebra.)
Relation to metric
For spacetime vector fields $u^\mu, v^\mu$, the Lie bracket is
$$
[u, v]^\mu = u^\nu \partial_\nu v^\mu - v^\nu \partial_\nu u^\mu.
$$
It turns out that the Lie derivative of one vector field with respect to another is exactly this commutator.
$$
\mathcal{L}_u v = [u, v].
$$
If you have a set of vectors which close under the Lie bracket,
$$
[K^i, K^j] = f^{ij}_{\;\; k} K^k
$$
then from the product rule of the Lie derivative, that for any two tensors $A$ and $B$
$$
\mathcal{L}_u (AB) = (\mathcal{L}_u A) B + A(\mathcal{L}_u B)
$$
we can clearly see that if we define the inverse metric by
$$
g^{\mu \nu} = \kappa_{ij} (K^i)^{(\mu} (K^j)^{\nu)}
$$
then from the previous section, it is not hard to show
\begin{align}
\mathcal{L}_{K^k} g^{\mu \nu} = 0
\end{align}
because the metric is just the quadratic Casimir. (There is a tiny wrinkle, which is the spacetime indices, but if you use the symmetric sum $(\mu \nu)$ as above, then that cancels out with the antisymmetry of $f$.) Therefore, we have explicitly constructed a metric for which all $K^i$ are Killing vectors.
Relation to OP's metric
Let us do an explicit example.
\begin{array}{l}
K^1=\partial_{\phi} \\
K^2=\cos \phi\,\partial_{\theta}-\cot \theta \sin \phi\,\partial_{\phi} \\
K^3=-\sin \phi\,\partial_{\theta}-\cot \theta \cos \phi\,\partial_{\phi}.
\end{array}
These satisfy the commutation relations
\begin{align}
[K^i, K^j] = \epsilon^{ijk} K^k.
\end{align}
where we shall momentarily drop the distinction between raised and lowered indices. Therefore
\begin{align}
\kappa^{ab} &= \epsilon^{bcd} \epsilon^{adc} \\
\kappa^{11} &= \epsilon^{1 cd} \epsilon^{1 dc} \\
 &= \epsilon^{1 2 3} \epsilon^{1 3 2} + \epsilon^{1 3 2} \epsilon^{1 2 3} \\
&= -1 -1 \\
&= -2 \\
\kappa^{12} &= \epsilon^{2 cd} \epsilon^{1 dc} \\
 &= 0
\end{align}
We can see that $\kappa^{ij} = - 2 \delta^{ij}$, which is just a constant times OP's metric.
Killing form (second version)
If your Lie algebra elements $X \in \mathfrak{g}$ can be realized as matrices, then we can also define another Killing form
$$
B(X, Y) = \mathrm{Tr}(XY).
$$
This Killing form is more appropriate for dealing with Lie algebras with commuting elements.
This is also invariant under the adjoint action of the Lie algebra), i.e. for any $Z \in \mathfrak{g}$,
$$
\delta X = [Z, X] , \hspace{1cm} \delta Y = [Z, Y]
$$
then
\begin{align}
\delta B(X, Y) &= B(\delta X, Y) + B(X, \delta Y) \\
&= \mathrm{Tr}(\delta X Y) + \mathrm{Tr}(X \delta Y) \\
&= \mathrm{Tr}([Z, X] Y + X[Z,Y] ) \\
&= \mathrm{Tr}( Z X Y - X Z Y + X Z Y - X Y Z) \\
&= 0
\end{align}
where the final line follows from the cyclic property of the trace.
A: You're going to need some sort of extra assumption in order to make this idea work, because not every spacetime even has a single global Killing vector, much less enough Killing vectors to span the spacetime.
