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 ?$$
 A: 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$.)
A: 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.
