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 ?$$
I don't know if what I'm about to write is completely correct, I face the same difficulties with $SU(1,1)$, and this is what I came up with.
First of all because we are working with matrices this means we are embedding $SO(2,1)$ in $GL_{2}(\mathbb{R})$, this is the case if $SO(2,1)$ is a Lie subgroup of $GL_{2}(\mathbb{R})$, a general theorem (stated in almost every introductory texts on Lie groups) assures us that every close subgroup of $GL_{n}(\mathbb{R})$ is a matrix Lie group.
Suppose we proved that $SO(2,1)$ is a a closed subgroup of $GL_{2}(\mathbb{R})$, thus there is an embedding $i$ of $SO(2,1)$ in $i(SO(2,1))\subset GL_{2}(\mathbb{R})$.
This embedding is such that the exponential function $\exp:\mathfrak{so}(2,1)\longrightarrow SO(2,1)$ of $SO(2,1)$ is the usual exponential of a matrix in $i(SO(2,1))\subset GL_{2}(\mathbb{R})$ (this can be proved).
From this it follows that the Lie algebra $i(\mathfrak{so}(2,1))$ of $i(SO(2,1))$ is characterized by the condition:
$$ A: exp(tA)\in i(SO(2,1))\;\;\;\forall t $$ therefore from the defining condition of $SO(2,1)$ we get:
$$ (exp(tA))^{T}\eta \exp(tA)=\eta $$
Then:
$$ \frac{d (exp(tA))^{T}\eta \exp(tA)}{dt}\left|_{t=0}\right.=\frac{d\eta}{dt}\left|_{t=0}\right. $$
Which means:
$$ A^{T}\eta + A\eta=0 $$
Moreover we can use the general properties of the exponential $\exp$ of a matrix:
$$ det(\exp(A))=\exp(Tr(A)) $$ in order to obtain:
$$ Tr(A)=0 $$
Thus the Lie algebra of $i(SO(2,1))$ is the set of matrices such that:
$$ Tr(A)=0 \;\;\;\mbox{ and } \;\;\; A^{T}\eta + A\eta=0 $$
If you want to use the curves in $SO(2,1)$ you have to find a coordinate system on $SO(2,1)$, in order to explicitely write the curve $a(t)$ and calculate its tangent vectors at the identity.