Is an identity that is true for matrix Lie groups true for all Lie groups? Many identities for Lie groups are more easily proved for matrix groups.  A non-trivial example is the equation
$$
\frac{d}{dt}\vert_{t=0} \exp(-X)\exp(X+tY) = \frac{1-e^{-\operatorname{ad} X}}{\operatorname{ad} X} Y. $$
My question is if it is always sufficient to prove identities in the case of matrix algebras.  For example, is there some sort of density argument using a topology on the space of Lie groups that makes matrix groups dense?  Or perhaps there is an analogue of the notion of "permanence of identities" used to prove statements about matrices.

EDIT:  Admittedly my question is vague, and as I responded to a comment, I am really looking for a heuristic that works in a large set of ``natural" cases.
Here is a good example of what I'm after is this mathoverflow question about showing if $\alpha$ and $\beta$ are one parameter subgroups of a Lie group then $(\alpha \beta)'(0)  = \alpha'(0) + \beta'(0)$.  This is very easy to prove for matrix groups since the product rule carries over.  It is not hard to prove for general Lie groups (see e.g. my answer to that question) but it is more difficult in my opinion.
 A: It is a consequence of the Peter-Weyl Theorem that any compact Lie group is isomorphic to a matrix Lie group.
A: Here is a general result on promoting identities for Lie groups from linear groups to all connected groups.
Let $\mathcal{LG}$ be the category of connected Lie groups and local isomorphisms ($=$ coverings) as morphisms. 
Assigning to a group $G$ the topological space $G^m \times \mathfrak{g}^n$ defines a functor 
from $\mathcal{LG}$ to topological spaces, with the property that it maps all coverings to coverings. It makes sense to ask for a natural subset $U(G) \subset G^m \times \mathfrak{g}^n$. In the example 
from the original question, $U= \mathfrak{g}^2$, 
in Tom's example, it is an algebraic set, but it could be the set of all $X \in \mathfrak{g}$ with $ad$-spectral radius bounded by $1$, 
for example. Now let $(F_i)_G:U(G) \to G$ (one could look at maps $\to \mathfrak{g}$ as well, which is slightly easier),
$i=0,1$, be continuous natural transformations.
If you unwind this definition, $F_i$ is a function that is composed out of the data that are available for all Lie groups: the group operations,
the identity element, vector space operation and Lie bracket on $\mathfrak{g}$, the adjoint representation, all operations in the matrix algebra 
$End (\mathfrak{g})$ (as taking power series, characteristic polynomials etc), the exponential map and taking derivatives of curves through the 
identity element in $G$ (no attempt to make a complete list).
Theorem: ''With the above notations, assume that 


*

*$F_0=F_1$ holds for all linear groups.

*$U(G)$ is path-connected for all $G$ (recall that I assumed all groups to be connected);

*For each covering $H \to G$, the map $U(H) \to U(G)$ is surjective;

*There exists a natural transformation $u:\ast \to U$ of functors such that $F_0 (u)=F_1(u)$ holds for all connected Lie groups.
Then $F_0=F_1$ is true for all connected Lie groups.''
Proof: ''Denote by $P(G)$ the statement that the Theorem holds for $G$. For each connected Lie group $G$, there exist, by Ado's theorem,
a Lie group $H$, a linear Lie group $L$ and coverings $H \to G$ and $p:H \to L$. Naturality and assumption $3$ show the implication $P(H) \Rightarrow P(G)$ and 
the tricky part is $P(L) \Rightarrow P(H)$. Observe that $p \circ (F_0)_H = (F_0)_L \circ p_U = (F_1)_L \circ p_U = p \circ (F_1)_H$; 
the second equality is assumption $1$. Therefore, $(F_0)_H$ and $(F_1)_H$ are both lifts of the map $(F_0)_L \circ p_U$ through the covering 
$H \to L$. By assumption $2$, they have to coincide once they coincide at one point, which is the content of assumption $4$. qed.''
The proof makes clear that one can restrict to the subcategory of connected Lie groups whose Lie algebra is isomorphic to one of a fixed set $S$ 
of Lie algebras,
say $S=\{\mathfrak{sl}_2 (\mathbb{R})\}$. 
The set $U$ in Toms example has at least two components: the boring one is $\{(0,0\}$ and other one contains those $(X,Y)$ that generate
$\mathfrak{sl}_2 (\mathbb{R})$ (this is probably connected). It is assumption $3$ that fails for this component.
The proof also shows that the target of the transformations $F_i$ can be more generally any functor from $\mathcal{LG}$ that maps local 
isomorphisms to coverings.
A: If you stretch things a little to include one identity following from others, it's not true. Here is a counterexample to something:
If $\frak g$ is the Lie algebra of $G$, and if elements $X$ and $Y$ of $\frak g$ satisfy $[[X,Y],X]=2X$ and $[[Y,X],Y]=2Y$, then it is not always true that $exp(2\pi(X-Y))=1_G$. But it is true in the special case when $G$ is contained in a matrix group $GL_n(\mathbb R)$.
EDIT  As André Henriques points out, what this is really saying is that a Lie algebra homomorphism from the Lie algebra of $SL_2(\mathbb R)$ to $\frak g$ does not always give a Lie group homomorphism $SL_2(\mathbb R)\to G$ (because $SL_2(\mathbb R)$ is not simply connected), though it must do so if $G$ is a matrix group (and an easy way to prove that is by observing that $SL_2(\mathbb C)$ is simply connected).
A: Every finite dimensional Lie algbera over a field of characteristic $0$ is a subalgebra of some matrix Lie algebra (Ado's theorem), so every Lie group is locally isomorphic to a group of matrices.
