On The Arithmetic of Elliptic Curves, Joseph H. Silverman, the definition of rational map is given by:
Let $V_1$ and $V_2 \subseteq \mathbb{P}^n$ be projective varieties. A rational map from $V_1$ to $V_2$ is a map of the form $$\varphi : V_1 \rightarrow V_2, \qquad \varphi = [f_0,\ldots,f_n]$$
where the functions $f_0,...,f_n ∈ K(V_1)$ have the property that for every point $P ∈ V_1$ at which $f_0,...,f_n$ are all defined, $$\varphi (P) = f_0(P),...,f_n(P).$$
And Hartshorne, the definition is:
Let $X$ and $Y$ be varieties. A rational map $\phi: X \to Y$ is an equivalence of pairs $(U, \phi_U)$ where $U$ is a nonempty open subset of $X$, and $\phi_U$ is a morphism of $U$ to $Y$, and where $(U, \phi_U)$ and $(V, \phi_V)$ are considered equivalent if $\phi_U$ and $\phi_V$ agree on $U \cap V$.
I wonder if these two definitions are equivalent? So far I can see the first definition satisfies Hartshorne's definition, but how to see if Hartshorne's also agrees with the first definition?