# Very ample invertible sheaf relative to a scheme

I got confused when I am reading Hartshorne Algebraic Geometry II remark 5.16.1.

Definition. If $X$ is any scheme over $Y$, an invertible sheaf $\mathcal{L}$ On $X$ is very ample relative to $Y$ , if there is an immersion $i:X\rightarrow P^r_Y$ for some $r$, such that $i^*(O(1))\simeq \mathcal L$.

Remark 5.16.1. Let $Y$ be a noetherian scheme. Then a scheme $X$ over $Y$ is projective if and only if it is proper, and there exists a very ample sheaf on $X$ relative to $Y$. …… Conversely, if $X$ is proper over $Y$, and $\mathcal L$ is a very ample invertible sheaf, then $\mathcal L\simeq i^*(O(1))$ for some immersion $i:X\rightarrow P^r_Y$. The image of $X$ is close, so in fact $i$ is a closed immersion, so $X$ is projective over $Y$.

My question is why is the composition morphism $X\rightarrow P^r_Y \rightarrow Y$ the original morphism $X\rightarrow Y$?

Although Hartshorne doesn't explicitly say this, I assume that by opening the definition of very ample with "If $X$ is any scheme over $Y$..." he is restricting attention to the category of schemes over $Y$ (as in the definition immediately before Proposition 2.6). So the objects we're considering are schemes with morphisms to $Y$, and given objects $X_1\xrightarrow{f_1} Y$ and $X_2\xrightarrow{f_2} Y$, we only concern ourselves with morphisms $X_1\to X_2$ such that the composition $X_1\to X_2\xrightarrow{f_2} Y$ is $X_1\xrightarrow{f_1} Y$.