# Spectrum of a quasi-coherent algebra on an algebraic stack

Let $X$ be an algebraic stack and $\mathcal{A}$ a quasi-coherent $\mathcal{O}_X$-algebra. Define the stack $\mathrm{Spec}(\mathcal{A})$ by

$\mathrm{Spec}(\mathcal{A})(T) := \{(f,h) : f \in X(T), h \in \hom_{\mathrm{Alg}(\mathcal{O}_T)}(f^* \mathcal{A},\mathcal{O}_T)\}$

and the obvious restriction maps. Is it true that $\mathrm{Spec}(\mathcal{A})$ is an algebraic stack? Do you know a reference? I cannot even prove that the diagonal is representable. Perhaps first the case of an algebraic space has to be done. Note that if $X$ is a scheme, this coincides with the usual definition of the spectrum as in EGA I.

-

Yes, $\mathrm{Spec}_\mathcal{X} (\mathcal{A})$ is an algebraic stack. The key fact is that if $f: \mathcal{Y} \rightarrow \mathcal{X}$ is a representable morphism of stacks, then if $\mathcal{X}$ is algebraic, so is $\mathcal{Y}$; cf. Lemma 32.5 in Anton Geraschenko's notes for Martin Olsson's course:
The morphism $\mathrm{Spec}_\mathcal{X} (\mathcal{A}) \rightarrow \mathcal{X}$ is representable, since for any morphism $g:X \rightarrow \mathcal{X}$ with $X$ a scheme, the pullback of $\mathrm{Spec}_\mathcal{X} (\mathcal{A})$ is $\mathrm{Spec}_X (g^* \mathcal{A})$.