How to put this metric in matrix form? [closed]

Given the metric

$$ds^{2}=dt^{2}-2 dr dt-r^{2}(d\theta^{2}+\sin^{2}\theta \,d\phi^{2})$$

How to put this metric in matrix form?

I ask this because the metric is obviously not diagonal so what will the component of $g_{rr}$, $g_{tr}$, $g_{rt}$ be?

• Are you sure you aren't missing a $-dr^2$ in that metric? – John Rennie Aug 15 '16 at 10:56
• boooo! Mostly minus signatures are the worst signatures – Jim Aug 15 '16 at 12:56

$$\left(\begin{matrix} 1 & -1 & 0 & 0 \\ -1 & 0 & 0 & 0 \\ 0 & 0 & -r^2 & 0 \\ 0 & 0 & 0 & -r^2\sin^2\theta \end{matrix}\right)$$
• But why isn't $g_{rt}=0$ and $g_{tr}=-2$ it would still give the same metric? – MrDi Aug 15 '16 at 10:59
• @MrDi: the metric is always symmetric i.e. $g_{\alpha\beta} = g_{\beta\alpha}$ – John Rennie Aug 15 '16 at 11:00
The diagonal components shouldn't be complicated. For the non-diagonal components, you have to remember that the metric is a symmetric tensor, and therefore $g_{tr}=g_{rt}$.
Expanding the line element: $$ds^2= g_{\mu\nu}dx^\mu dx^\nu= g_{tr}dr dt+ g_{rt} dt dr+\cdots=2g_{rt} dr dt+\cdots$$
So, in your case, $g_{rt}=g_{tr}=-1$.