Chapter II Ex 2.7 in Hartshorne is to show that: to give a morphism $Spec K \to X$ it is equivalent to give $x \in X$ and an inclusion $k(x) \to K$. Here $k(x)$ is the residue field of $x$ and $X$ is a scheme.
Could someone explain me what he means by "equivalent" here? Does it actually mean: there exists a morphism $Spec K \to X$ if and only if there exist $x \in X$ such that $k(x) \to K$ is an inclusion? or does it mean something else?
Basically I am wondering if he is implying that there is a more canonical identification or not.
Thank you.
This is a pure definition-chase. Recall that a morphism of schemes $f:\operatorname{Spec} K \to X$ is the same as a morphism of topological spaces $\operatorname{Spec} K \to X$ and a morphism of sheaves $f^\sharp:\mathcal{O}_X\to f_*\mathcal{O}_{\operatorname{Spec} K}$. As $\operatorname{Spec} K$ is a point, the map of topological spaces gives us a point $x\in X$. By passing to stalks, the morphism of sheaves gives us a local map of local rings $f^\sharp_x:\mathcal{O}_{X,x}\to \mathcal{O}_{\operatorname{Spec} K,\{pt\}}=K$. As the maximal ideal of $k$ is the zero ideal, this says that $f^\sharp_x(\mathfrak{m}_x)=0$, so this map factors through the quotient $\mathcal{O}_{X,x}/\mathfrak{m}_x=\kappa(x)$. As all ring maps of fields are inclusions, this means we have an inclusion $\kappa(x)\to K$.
For the other way around, given a point $x$ with an inclusion $\kappa(x)\to K$, we can define our map $\operatorname{Spec} K\to X$ by letting the unique point of $\operatorname{Spec} K$ go to $x\in X$. For the morphism of sheaves we define $\mathcal{O}_{X}\to f_*\mathcal{O}_{\operatorname{Spec} K}$ as follows: over any open $U$ not containing $x$, the target and the map are both zero. If $U$ contains $x$, then we write our map as the composite $\mathcal{O}_{X}(U)\to \mathcal{O}_{X,x} \to \kappa(x) \to K=f_*\mathcal{O}_{\operatorname{Spec} K,\{pt\}}$ and it's immediate to see this gives a map of sheaves.