Solution (source code)

= Solution

Use the real three-dimensional space of traceless <matrices>
$$
X=\begin{pmatrix}x&t+y\\-t+y&-x\end{pmatrix},
\qquad \det X=t^2-x^2-y^2.
$$
Thus $-\det X$ is a quadratic form of signature $(2,1)$. The adjoint action $X\mapsto AXA^{-1}$ of $SL(2,\mathbb R)$ preserves trace and <determinant>. Connectedness puts its image in $SO_0(2,1)$.

A kernel element commutes with every <traceless matrix> and with the identity, hence with every real <matrix>; it is therefore scalar. <Determinant> one leaves $\pm I$. The derivative is injective and both groups have dimension three, so the image is open and equals the <identity component>. Consequently
$$
\boxed{SO_0(2,1)\cong SL(2,\mathbb R)/\{\pm I\}.}
$$