Examples of derivation of Lie algebras Let $A$ be an algebra over a field $F$. A derivation of $A$ is an $F$-linear map
$D : A\to A$ such that
$D(ab) = aD(b) + D(a)b$ for all $a, b \in A$.
The map $adx : L \to L$ is inner derivation. I'm looking for some examples non-inner derivations of Lie algebras.
 A: I'll venture an example, at the risk of being too trivial.
The zero Lie bracket makes the real polynomials $\Bbb R[x]$ into a Lie algebra, and any inner derivation with respect to this bracket would have to be uniformly zero.
But ordinary differentiation is a nonzero derivation of real polynomials, so this would furnish an example.
A: An instructive example is to pick a field $k$ and the commutative algebra $A=k[X]/(X^n)$. Since $A$ is commutative, its only inner derivation is the zero map, so any example of derivation you can come up with will be outer. 
Write down explicitly the conditions for a linear map $A\to A$ to be a derivation, and solve them :-)
A: The easiest example is perhaps to consider all derivations of the Heisenberg Lie Algebra $\mathfrak{h}_3(K)$, i.e., all linear maps $D\colon \mathfrak{h}_3(K) \rightarrow \mathfrak{h}_3(K)$ satisfying $D([x,y])=[D(x),y]+[x,D(y)]$ for all $x,y$. Here the brackets
are given by $[e_1,e_2]=-[e_2,e_1]=e_3$, where $(e_1,e_2,e_3)$ denotes a basis.
The inner derivations are of the form $ad (x)$, and are linear combinations of
$$
ad (e_1)=\begin{pmatrix} 0 & 0 & 0\cr
0 & 0 & 0\cr
0 & 1 & 0\cr
\end{pmatrix},\;
ad (e_2)=\begin{pmatrix} 0 & 0 & 0\cr
0 & 0 & 0\cr
-1 & 0 & 0\cr
\end{pmatrix},\, ad(e_3)=0.
$$
However, the Heisenberg Lie Algebra has many other derivations (outer derivations). In fact, all linear maps of the form
$$
D=\begin{pmatrix} d_1 & d_4 & 0\cr
d_2 & d_5 & 0\cr
d_3 & d_6 & d_1+d_5\cr
\end{pmatrix}
$$
are derivations of the Heisenberg Lie algebra.
A: I just the same calculations and i get 
\begin{pmatrix} d_1 & d_4 & 0\cr
    d_2 & d_2 & 0\cr
    d_3 & d_5 & d_1 + d_2\cr
     \end{pmatrix}
for the derivations of  $\mathfrak{h}_3$.
I'm not sure who is right :P
