  If $X$ is a smooth manifold then the $\mathbb R$-algebra $C^\infty(X)$ of
smooth functions $c:X\to\mathbb R$ is a $C^\infty$-$ring$. That is, for each
smooth function $f:{\mathbb R}^n\to\mathbb R$ there is an $n$-fold operation
$\Phi_f:C^\infty(X)^n\to C^\infty(X)$ acting by $\Phi_f:(c_1,\ldots,c_n)\mapsto
f(c_1,...,c_n)$, and these operations $\Phi_f$ satisfy many natural identities.
Thus, $C^\infty(X)$ actually has a far richer structure than the obvious
$\mathbb R$-algebra structure.
  We develop a version of algebraic geometry in which rings or algebras are
replaced by $C^\infty$-rings. As schemes are the basic objects in algebraic
geometry, the new basic objects are $C^\infty$-$schemes$, a category of
geometric objects which generalize smooth manifolds, and whose morphisms
generalize smooth maps. We also study quasicoherent and coherent sheaves on
$C^\infty$-schemes, and $C^\infty$-$stacks$, in particular Deligne-Mumford
$C^\infty$-stacks, a 2-category of geometric objects generalizing orbifolds.
  This enables us to use the tools of algebraic geometry in differential
geometry, and to describe singular spaces such as moduli spaces occurring in
differential geometric problems. This paper forms the foundations of the
author's new theory of "derived differential geometry", surveyed in
arXiv:1206.4207 and in more detail in arXiv:1208.4948, which studies
d-manifolds and d-orbifolds, "derived" versions of smooth manifolds and smooth
orbifolds. Derived differential geometry has applications to areas of
symplectic geometry involving moduli spaces of $J$-holomorphic curves.
  Many of these ideas are not new: $C^\infty$-rings and $C^\infty$-schemes have
long been part of synthetic differential geometry. But we develop them in new
directions. This paper is surveyed in arXiv:1104.4951.
