When do all derivations come from automorphisms? Let $k$ be a field (algebraically closed for simplicity) and let $A$ be an $n$-dimensional algebra over $k$ (not necessarily commutative or even associative). The group $G=\mbox{Aut}(A)$ is an algebraic group. The elements of the lie algebra $\mathfrak{g}$ of $G$ act (naturally) on $A$ and they act as derivations over $k$. So we have the inclusion $\mathfrak{g}\subseteq \mbox{Der}_k(A)$. My first questions:


*

*Can this inclusion be strict?

*If so, how can $\mathfrak{g}$ be characterized within $\mbox{Der}_k(A)$? is it an Ideal (in the lie algebra sense)?

*Are there reasonable conditions on $A$ that ensure equality?


Now, for a more specialized setting, in Serre's book "Lie algebras and Lie groups" there is a proof of the theorem that if $\mathfrak{s}$ is a semi-simple real lie algebra with a definite killing form then it is a Lie algebra of some compact real Lie group $G$ (Thm 6.3). The group $G$ is taken to be $\mbox{Aut}(\mathfrak{s})$ and it is stated without explanation that "The Lie algebra of $\mbox{Aut}(\mathfrak{s})$ is the algebra of derivations of $\mathfrak{s}$" (which then equals $\mathfrak{s}$ itself since $\mathfrak{s}$ is semi-simple), so the more specialized question is


*

*Let $\mathfrak{g}$ be a Lie algebra, under what conditions the lie algebra of $\mbox{Aut}(\mathfrak{g})$ is the whole $\mbox{Der}_k(\mathfrak{g})$?

 A: $\def\fg{\mathfrak{g}}$These are always equal. Note that I am using the natural scheme structure of $G$, which need not be reduced (though it is if $A$ is finite dimensional and $k$ has characteristic zero) and taking $\fg$ to be the Zariski tangent space of $G$; the answer might be different if I were using the reduced scheme structure on $G$.
The defining property of the group scheme $G$ is that, for any commutative $k$-algebra $R$, $\mathrm{Hom}(\mathrm{Spec}\ R, G) = \mathrm{Aut}_R(A \otimes R)$. (The subscript means that the automorphisms must fix the elements of $R$.) Let $D$ be the ring $k[\epsilon]/\epsilon^2$. Given a $k$-scheme $X$ with a $k$-point $x$, the Zariski tangent space $T_x X$ can be identified with the set of maps $\mathrm{Spec}\ D \to X$ such that the composition $\mathrm{Spec} \ k \to \mathrm{Spec} \ D \to X$ has image $x$. 
Combining these two ideas, $\fg$ is identified with
$$\{ \phi \in \mathrm{Aut}_D(A \otimes D) : \phi \equiv \mathrm{Id} \bmod \epsilon \}.$$
For such a $\phi$, we have $\phi(a+\epsilon b) = \phi(a) + \epsilon \phi(b) = \phi(a) + \epsilon b = a + \epsilon \delta(a) + \epsilon b$ for some map $\delta: A \to A$. One can check that $a + \epsilon b \mapsto a + \epsilon \delta(a) + \epsilon b$ is an automorphism if and only if $\delta$ is a derivation. So $\fg$ is identified with $\mathrm{Der}(A)$. (And, if you trace it through, the vector space and Lie algebra structure match.)

Here is an infinite dimensional example where the reduced structures $\mathrm{Aut}(A)$ doesn't see all of $\mathrm{Der}(A)$. Look at $A=k[x, x^{-1}]$, so $\mathrm{Spec}\  A=k^{\ast}$. The only automorphisms of $\mathrm{Spec} \ A$ are $x \mapsto ax$ and $x \mapsto a x^{-1}$, for $a$ a nonzero element of $k$. So the reduced group of automorphisms of $\mathrm{Spec} A$ is $(\mathbb{Z}/2) \ltimes \mathbb{G}_m$, with one dimensional trivial Lie algebra. Explicitly, this Lie algebra is spanned by the derivation $x \partial/\partial x$. 
Look at $\partial/\partial x$. This DOES give an automorphism of $A \otimes D$; namely $x \mapsto x + \epsilon$, $x^{-1} \mapsto x^{-1} - x^{-2} \epsilon$. But this automorphism does not lift to a $1$ dimensional family of automorphisms, because $x+\epsilon$ is only invertible if $\epsilon$ is nilpotent.
I suspect that one can find a similar example using finite dimensional $A$ in characteristic $p$; in fact, I suspect $A = k[x]/x^p$ is such an example. But I haven't thought this through carefully.
