Lie groups and Lie algebras for matrices Recently, I stumbled over a few things in very basic Lie group/Lie algebra theory concerning matrix groups.
Basically, my question is: Is there a way to canonically understand all the Lie groups at once?
So there is the group $\mathrm{GL}(n, \mathbb{R})$. This is the only group where I immediately see the manifold structure, as $\mathrm{GL}(n, \mathbb{R}) = \mathbb{R}^{n \times n} \setminus \det^{-1}(\{0\})$ is an open set in $\mathbb{R}^{n \times n}$ just by continuity of the determinant and hence it is a manifold of dimension $n^2$.
The Lie algebra in the context of real matrix theory is apparently given by all matrices $\{X; e^{tX} \in G\}$ where $G$ is the respective Lie group.
From this it is clear that any endomorphism $X$ is in the Lie algebra of the general linear group, since $e^{tX}$ is always invertible.
All other guys like $\mathrm{SL}, \mathrm{SO}, \mathrm{O}, \mathrm{Sp}, \dotsc$ are now somewhat harder to me.
But maybe we can answer this question more canonically?
Cause a friend of mine showed me a trick how to figure out what the Lie algebras might be without investigating this exponential.
Let $Y = \mathrm{Id} + tX + o(t^2)$ be a Taylor expansion and then you plug this into the defining property of the group:
For instance, if we consider $\mathrm{O}(n)$:
$$
  Y^T Y
  = (\mathrm{Id} + t X^t + o(t^2))(\mathrm{Id} + t X^t + o(t^2))
  = \mathrm{Id} + t X + t X^t + o(t^2) \,,
$$
now the Lie algebra is the set of all matrices that have no order $t$ term in this expansion. So in the case of the orthogonal group this means that $X + X^t = 0$.
In the case of $\mathrm{SL}(n)$ the defining property is that $\det(\mathrm{Id} + tX) = 1$ which is for small $t$ equivalent to $\det(\mathrm{Id} + tX) \approx 1 + t \cdot \mathrm{tr}(X) = 1$ and hence we must have trace-free matrices in the respective Lie algebra.
Somehow, we can apparently conclude what the Lie algebra has to be from first order Taylor expansion. This is nice because it seems to work generally.
My first question is: Why does this work and where does the condition that the first order term has to vanish come from?
Now, I would like to understand the Lie groups itself also better and maybe also in a more general way.

*

*I don't see how the manifold structure is actually defined on these groups. Sure, in the case of $\mathrm{O}$ or $\mathrm{SO}$ the regular value theorem may be applied somehow, but this does not provide me with a parametrization or chart explicitly. In especially, is there a canonical way to find charts/parametrizations for such matrix groups or is this different in each case?


*Is there a way to see directly what the dimension of any such matrix group has to be? I mean, think of you sitting in an exam. Is there a way to figure out what the dimension of the respective manifold has to be? Or is this something that has to be investigated in each case differently?
 A: I can answer some of your questions.
First, suppose that your Lie group $G$ is characterized by matrices $M$ satisfying some differentiable relation $f(M) = 0$. Let $\gamma(t)$ be any curve $\mathbb{R} \to G$ with $\gamma(0) = I$. Then
$$f(\gamma(t)) = 0$$
and in particular
$$\frac{d}{dt}f(\gamma(t))\Big\vert_{t\to 0} = 0.$$
Tayor expanding $f \circ \gamma$ gives
$$0 = \frac{d}{dt} \left[f(\gamma(0)) + t df(\gamma(0))\gamma'(0) + t^2 g(t)\right]\Big\vert_{t\to 0} = df(I)\gamma'(0).$$
Therefore all tangent vectors of $G$ at $I$ (and hence the elements of the Lie algebra) are characterized by being in the kernel of $df$ at $I$.
So for example, $O(n)$:
\begin{align*}
f(M) &= M^TM-I\\
df(M)v &= v^TM + M^Tv\\
df(I)v &= v^T + v
\end{align*}
and the Lie algebra consists of the skew-symmetric matrices.
For $SL(\mathbb{R},n)$, $f(M) = \det(M) - 1$ and as you calculated, $df(I)v = \operatorname{tr}(v)$ and the Lie algebra are the trace-free matices.
Now to compute the dimension of $G$, you can compute the dimension of the Lie algebra; $df(I)$ is a linear map from $TGL(\mathbb{R},n)$ to whatever the codomain of $f$ happens to be, and you can calculate the dimension of the Lie algebra by computing the nullity of $df(I)$.
As for computing charts: perhaps somebody else can give you a computationally easier approach, but the conceptually easiest is to use the exponential map right in front of you: pick a basis $\{b_i\}_{i=1}^k$ for the nullspace of $df(I)$ and you have a chart for a neighborhood $S$ of $I$ given by
$$\phi:\mathbb{R}^k \to S$$
$$\phi(\mathbf{x}) = e^{\sum_i x_i b_i}$$
which you can turn into a chart of the neighborhood of any point $p$ on $G$ by e.g. left-multiplying by $p$.
