Why are morphisms of schemes locally given by ring homomorphisms?

I am trying to prove the statement: A morphism $f:Y \rightarrow X$ of schemes is determined locally by homomorphisms of rings.

Here is my attempt:

Given the morphism $f:Y \rightarrow X$ and any point $y \in Y$. Consider $f(y) = x \in X$, there is an affine neighborhood $U = \mathrm{Spec}\: A \subset X$ containing $x$. There is also an affine neighborhood $V = \mathrm{Spec}\: B \subset f^{-1}(U)$ containing $y$. Restricting the map $f$ we have a map $f:V \rightarrow U$ which is determined by the corresponding ring homomorphism $f^* : A \rightarrow B$.

So we have shown that for any point in $Y$ there is a neighborhood on which the map is determined by a map of rings.

Is this ok? I think I have confused myself pretty badly. Maybe it is just the poor presentation of my proof.

• That seems to be the only reasonable interpretation of the statement. – Zhen Lin Aug 3 '14 at 21:00
• Your proof seems fine. To be complete, you may also want to think about the relation between $f^*$ and the local map on stalks of the structure sheaves – zcn Aug 4 '14 at 4:50
• The proof is not poor, the formulation of the claim is. – Martin Brandenburg Aug 4 '14 at 9:13