TITLE: Why are locally closed subschemes not open subschemes of closed subschemes?
QUESTION [13 upvotes]: Ravi Vakil gives the following argument for why open subschemes of closed subschemes are locally closed: "Clearly an open subscheme U of a closed subscheme V of X can be interpreted as a closed subscheme of an open subscheme: as the topology of V is induced from the topology of X, the underlying set of U is the intersection of some open subset U' on X with V. We can take V' = $V \bigcap U'$, and then $V' \rightarrow U'$ is a closed embedding, and $U' \rightarrow X$ is an open embedding.
What I don't understand is why this argument doesn't also give the converse. It seems to me that if the words "closed" and "open" are switched in the above argument, we will "prove" that locally closed subschemes are open subschemes of closed subschemes. But this is false; what is wrong with the "proof"?

REPLY [4 votes]: QiL has already gave a nice explanation. I just want to add one comment. Follows the notation of QiL, if $Z$ is reduced, the converse is also true. But in general the converse is not true. For a counter-example please see Example 24.3.4 in the Stacks Project by de Jong. All the above can be found in the chapter 24 of the Stacks Project.