Lemma 37.8.8. Let $f : X \to S$ be a morphism of schemes. Assume $X$ and $S$ are affine. Then $f$ is formally étale if and only if $\mathcal{O}_ S(S) \to \mathcal{O}_ X(X)$ is a formally étale ring map.

Proof. This is immediate from the definitions (Definition 37.8.1 and Algebra, Definition 10.150.1) by the equivalence of categories of rings and affine schemes, see Schemes, Lemma 26.6.5. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).