If $M$ is an $R$-module, when is $A\mapsto Aut(M\otimes_{R}A)$ a representable functor? Let $R$ be a ring (unitary, commutative, associative) and $M$ an $R$-module. Is the functor
\begin{eqnarray*}
    F & : & {R}\mathbf{-Alg} & \longrightarrow & \mathbf{Grp}\\
       & & A                & \longmapsto     & \operatorname{Aut}(M\otimes_{R}A)         
\end{eqnarray*}
representable? I know this is true if $M=R^{n}$ for some $n\in\mathbb{N}$, for then it is represented by the ring
\begin{equation*}
    A[x_{11},...,x_{nn},y]/(\det(x_{ij})y-1)\text{.}
\end{equation*}
I guess (although this is no more than a gut feeling) this should be true at least if $M$ is finitely generated and flat, but I might be wrong.
As usual, a literature reference might also be helpful.
 A: If $M$ is finitely presented and flat, then $F$ is representable; indeed this follows pretty easily from the finitely generated free case.  If $M$ is finitely presented and flat, then it is projective, so it is a direct summand of $R^n$ for some $n$.  This direct sum decomposition can be represented by an idempotent matrix $e\in M_n(R)$.  Then, the group of automorphisms of $M$ can be described as the set of $a\in GL_n(R)$ such that $ea(1-e)=(1-e)ae=0$ and $(1-e)a(1-e)=1-e$ (this just means that the matrix representation of $a$ with respect to the direct sum decomposition $R^n\cong M\oplus N$ has the form $\begin{pmatrix}b & 0 \\ 0 & 1_N\end{pmatrix}$ for some invertible $b$).  This description is still valid after base-changing, so the functor $\operatorname{Aut}(M\otimes-)$ is represented by the quotient of $R[a_{11},\dots,a_{nn},\det^{-1}]$ that imposes the relations $ea(1-e)=(1-e)ae=0$ and $(1-e)a(1-e)=1-e$.
A simple necessary condition for $F$ to be representable is that it must preserve monics.  For instance, this means that if $R$ is a domain and $M$ is a nonzero torsion module then $F$ cannot be representable, by considering what $F$ does to the inclusion from $R$ into its fraction field.
Here is another necessary condition that is a sort of finiteness condition (for instance, it implies $F$ cannot be representable if $R$ is nonzero and $M$ is free of infinite rank).  Suppose $F$ is representable.  Then for each $R$-algebra $A$ and each $m\in M\otimes A$, there must be a finitely generated submodule of $M\otimes A$ that contains the images of $m$ under all the automorphisms of $M\otimes A$.  To prove this, note that by base-changing to $A$, we may assume $A=R$. Let $S=\operatorname{Aut}(M)$ and consider $F(R^S)$.  Since $F$ is representable, it preserves products, so there is an automorphism $\alpha$ of $M\otimes R^S$ which becomes $s$ after applying the $s$th projection $R^S\to R$, for each $s\in S$.  This means that if we write $\alpha(m\otimes 1)$ as a sum $\sum x_i\otimes y_i$ of elementary tensors, we have $s(m)=\sum y_i(s)x_i$ for each $s\in S$.  Thus, all of these images $s(m)$ are contained in the submodule of $M$ generated by the finitely many elements $x_i$.
A: If $R$ is noetherian and $M$ is finitely generated then the automorphism sheaf is representable if and only if $M$ is projective, see here.
