TITLE: Automorphism group of a scheme
QUESTION [20 upvotes]: I have a probably stupid question on schemes ...
 Let $S$ be a scheme, and let $A = \mathsf{Aut}(S)$ be its automorphism group. Does $A$ carry 
a scheme structure itself, that is, can one see $A$ as a group scheme ? 
 Thanks !

REPLY [7 votes]: This is a partial answer to THC's question about a "direct" way to do this.
Let $X$ be a smooth projective variety such that $\omega_X$ is ample. Then there is some $m\in\mathbb N$ such that $\mathscr L=\omega_X^{\otimes m}$ is very ample, so $X$ has an embedding into $\mathbb P^N=\mathbb P(H^0(X,\mathscr L))$. 
Obviously $\mathscr L$ is invariant under any automorphism, and hence so is $H^0(X,\mathscr L)$. This implies that the automorphisms of $X$ extend to automorphisms of the ambient $\mathbb P^N$. In other words ${\rm Aut}(X)$ can be identified with a quotient of a subgroup of ${\rm Aut}(\mathbb P^N)$ and hence it inherits a natural scheme structure.
On the other hand it actually also follows that in this case ${\rm Aut}(X)$ is finite (see below why) and in fact it seems to me that this argument could only possibly work if something close to that is true.
Assume that $X$ is embedded into a projective space and all automorphisms of $X$ are induced by automorphisms of the ambient projective space. Then ${\rm Aut}(X)$ has a scheme structure (as above) and let ${\rm Aut}^\circ (X)$ denote the connected component of ${\rm Aut}(X)$ containing the identity. Then the quotient ${\rm Aut}(X)/{\rm Aut}^\circ (X)$ is a discrete group which is the quotient group of a linear algebraic group and hence it is finite.
The action of ${\rm Aut}^\circ (X)$ (in this case) exhibits $X$ as a uniruled variety and hence if $X$ is not uniruled (e.g., when $\omega_X$ is ample) it implies that ${\rm Aut}(X)$ is finite.
In other words if the scheme structure on ${\rm Aut}(X)$ given by the Hilbert scheme argument has infinitely many components, then it cannot be the quotient of a subgroup of ${\rm Aut}(\mathbb P^N)$. This happens for instance for K3 surfaces with an infinite automorphism group, in particular for any supersingular K3.