Calculating the Lie algebra of $SO(2,1)$ I am trying to calculate the Lie algebra of the group $SO(2,1)$, realized as
$$SO(2,1)=\{X\in \operatorname{Mat}_3(\mathbb{R}) \,|\, X^t\eta X=\eta, \det(X)=1\},$$ where $$\eta = \left ( \begin{array}{ccc} 1 &0&0\\0&1&0\\0&0&-1\end{array}\right ) .$$
But I am a bit unsure as how to procee:, I know that I need to take a curve in $SO(2,1)$ that passes through the identity at 0 and then differentiate at 0 but I am unsure as to what the form of curves in $SO(2,1)$ are?
So do I let $a(t)\in SO(2,1)$ be a curve with $a(0)=1$ so that:
$$a'(0)^t\eta+\eta a'(0)=\eta ?$$

We identify the Lie algebra $\mathfrak{so}(2, 1)$ with the tangent space $T_1 SO(2, 1)$ to $SO(2, 1)$ at the identity $1$. As hinted in the question, for any $A \in \mathfrak{so}(2, 1)$ we can pick a curve $a: J \to SO(2, 1)$ such that $a'(0) = A$. (We'll see below that the existence of such curves is all we need, i.e., we don't need to write out curves explicitly.) Then, the characterizing equation of $A$ gives
$$a(t)^T \eta a(t) = \eta,$$
and differentiating with respect to $t$ gives
$$a'(t)^T \eta a(t) + a(t)^T \eta a'(t) = 0$$
(note that the r.h.s. is $0$, not $\eta$). Evaluating at $t = 0$ gives
$$\phantom{(\ast)} \qquad A^T \eta + \eta A = 0. \qquad (\ast)$$
(By the way, up to this point we haven't used the form of $\eta$ yet, so this characterization holds just as well for any nondegenerate bilinear form $\eta$ in any finite dimension.)
Now we can write the Lie algebra explicitly simply working out the (linear) conditions determined by the above characterization. This is just a matter of writing out $(\ast)$ in components, but observe that the form of $\eta$ suggests a natural block decomposition of the Lie algebra. (Here this doesn't save so much effort, but this technique is quite useful for computing explicitly Lie algebras $\mathfrak{so}(\eta)$ for bilinear forms $\eta$ on higher-dimensional vector spaces.) Decompose a general element $A \in \mathfrak{so}(2, 1)$ as
$$A = \begin{pmatrix} W & x \\ y^T & z \end{pmatrix},$$
where $W \in M(2, \mathbb{R})$, $x, y \in \mathbb{R}^2$, $z \in \mathbb{R}$. In this block decomposition,
$\eta = \begin{pmatrix} \mathbb{I}_2 & 0 \\ 0 & -1\end{pmatrix}$
and $(\ast)$ becomes
$$\begin{pmatrix} W^T & y \\ x^T & z\end{pmatrix} \begin{pmatrix} \mathbb{I}_2 & 0 \\ 0 & -1\end{pmatrix} + \begin{pmatrix} \mathbb{I}_2 & 0 \\ 0 & -1\end{pmatrix} \begin{pmatrix} W & x \\ y^T & z\end{pmatrix} = \begin{pmatrix} 0 & 0 \\ 0 & 0\end{pmatrix}.$$
Writing out separately the equation for each block imposes precisely the conditions
$$W^T = -W, \qquad y = x, \qquad z = 0,$$
so,
\begin{align}
\mathfrak{so}(2, 1)
&= \left\{ \begin{pmatrix} W & x \\ x^T & 0\end{pmatrix} : W^T = -W \right\} \\
&= \left\{ \begin{pmatrix} 0 & -w & x_1 \\ w & 0 & x_2 \\ x_1 & x_2 & 0 \end{pmatrix} \right\}  \textrm{.}
\end{align}
(Of course, the condition on $W$ is just that $W \in \mathfrak{so}(2, \mathbb{R})$, where the bilinear form on $\mathbb{R}^2$ is just the standard one, i.e., the one with matrix representation $\mathbb{I}_2$.)
