# fiber product of schemes and commutative diagram

Let $$f: X\rightarrow Y$$and $$g: Y\rightarrow Z$$ be two morphism between schemes, we assume $$g\circ f$$ is projective and $$g$$ is separated, then I want to prove $$f$$ is projective.

What I have done:

Since $$g$$ is separated, base change $$Y\rightarrow Y\times_Z Y$$, we get $$X\times_YY\rightarrow X\times_ZY\times_YY$$ is projective, then by two isomorphisms, $$X\rightarrow X\times_ZY$$ is projective.

Since $$g\circ f: X\rightarrow Z$$ is projective, then base change, we get $$X\times_Z Y\rightarrow Y$$ is projective.

To prove $$f$$ is projective, I want to prove that the composition of $$X\rightarrow X\times_ZY$$ and $$X\times_Z Y\rightarrow Y$$ is exactly $$f$$. Actually, the definition of the first morphism contain a base change and two isomorphisms, the second morphism is just a projection of fiber product. I have the intuition that the composition is $$f$$, since these constructions are natural, but when I want to give a strict proof by using the uniqueness of the morphism induced by the universal property of fiber product, I get a complicated commutative diagram and I don't know how to continue.

So could anyone help me explain why the composition of the two morphisms is $$f$$?

In addition, if the following diagram is a cartesian diagram, can we prove that $$h$$ is exactly the identity map? $$X\overset{f}{\rightarrow} Y\\{h} \downarrow \,\,\,\,\,\,\, \downarrow{id} \\ X\underset{f}{\rightarrow} Y$$

Thanks very much!

• For your last question, the answer is no. Take $X$ to be 2 points, $Y$ to be a point, $f$ to be the fold map, and $h$ the isomorphism that switches the two points. Then you can check that the diagram is cartesian. All you can deduce is that $h$ is an isomorphism such that $fh=f$. – jgon Oct 22 at 0:32
• @jgon Thanks, I think your example is right. But in general, how to deduce $h$ is an isomorphism? – Sate Oct 22 at 0:53
• well, the square with the identity is cartesian, and any other pullback must be isomorphic to the identity one. – jgon Oct 22 at 5:37

First, we should be careful when we base change $$\Delta : Y\to Y\times_Z Y$$: you're taking the base change over $$Y,$$ but there are two natural maps $$Y\times_Z Y\to Y$$ (it doesn't change anything which you use, but it's something to be aware of).
$$\require{AMScd} \begin{CD} X @>f>> Y @>\operatorname{id}_Y>> Y\\ @V\operatorname{id}_X\times f VV @VV\Delta V @VV\operatorname{id}_YV\\ X\times_Z Y @>>> Y\times_Z Y @>p_2>> Y\\ @V{p_1}VV @Vp_1VV @VVgV\\ X @>f>> Y @>g>> Z. \end{CD}$$ The map you want to consider is then one of the maps from $$X$$ in the upper left hand corner to either $$Y$$ in the lower-right square, and the diagram shows that either composition is in fact $$f.$$