In algebraic geometry, given a morphism of schemes , the diagonal morphism is a morphism determined by the universal property of the fiber product of p and p applied to the identity and the identity . It is a special case of a graph morphism: given a morphism over S, the graph morphism of it is induced by and the identity . The diagonal embedding is the graph morphism of . By definition, X is a separated scheme over S ( is a separated morphism) if the diagonal morphism is a closed immersion. Also, a morphism locally of finite presentation is an unramified morphism if and only if the diagonal embedding is an open immersion. Explanation As an example, consider an algebraic variety over an algebraically closed field k and the structure map. Then, identifying X with the set of its k-rational points, and is given as ; whence the name diagonal morphism. Separated morphism A separated morphism is a morphism such that the fiber product of with itself along has its diagonal as a closed subscheme — in other words, the diagonal morphism is a closed immersion. As a consequence, a scheme is separated when the diagonal of within the scheme product of with itself is a closed immersion. Emphasizing the relative point of view, one might equivalently define a scheme to be separated if the unique morphism is separated. Notice that a topological space Y is Hausdorff iff the diagonal embedding is closed. In algebraic geometry, the above formulation is used because a scheme which is a Hausdorff space is necessarily empty or zero-dimensional. The difference between the topological and algebro-geometric context comes from the topological structure of the fiber product (in the category of schemes) , which is different from the product of topological spaces. Any affine scheme Spec A is separated, because the diagonal corresponds to the surjective map of rings (hence is a closed immersion of schemes): . Let be a scheme obtained by identifying two affine lines through the identity map except at the origins (see gluing scheme#Examples). It is not separated. Indeed, the image of the diagonal morphism image has two origins, while its closure contains four origins. Use in intersection theory A classic way to define the intersection product of algebraic cycles on a smooth variety X is by intersecting (restricting) their cartesian product with (to) the diagonal: precisely, where is the