quasi-affine/projective varieties | f=g on dense subset | diagonal subset | how to show that (f,g) is continuous? Let $f: X \to Y$ and $g: X \to Y$ be morphisms in the category $(QProj-k)$ (its objects are quasi-projective and quasi-affine $k$-varieties). Show that $f=g$ if and only if $f$ and $g$ are identical on a dense subset of $X$.

I have been working for a while on this exercice, and made the following progress:


*

*We first introduce the notion of the diagonal $\triangle(\mathbb{P}_k^n) \subset \mathbb{P}_k^n \times \mathbb{P}_k^n$. We say that $([x_0,\ldots,x_n], [y_0, \ldots, y_n]) \in \mathbb{P}_k^n \times \mathbb{P}_k^n$ is in $\triangle(\mathbb{P}_k^n)$ if and only if $[x_0,\ldots,x_n] = [y_0, \ldots, y_n]$. This condition can be neatly summarized by
$$V( \ \{ \psi_{ij} = x_i y_j - x_i y_i \| 0 \leq i,j \leq n\} \ )$$
and it is clear that this is a closed subset.

*If $V \subset \mathbb{P}_k^n$ then $V \times V$ inherits its topology as a subset of $\mathbb{P}_k^n \times \mathbb{P}_k^n$. Therefore $$\triangle_V = \triangle(\mathbb{P}_k^n) \cap (V \times V)$$ is closed in $V \times V$ since $\triangle(\mathbb{P}^n)$ is closed in $\mathbb{P}_k^n \times \mathbb{P}_k^n$. For this reason the special case can easily be reduced to the case where $Y = \mathbb{P}_k^n$.

*Notice that $\{ x \in X \mid f(x) = g(x) \}$ is the inverse image of $\triangle(Y)$ under the continuous mapping. 
$$(f,g): X \to Y \times Y: x \mapsto (f(x),g(x))$$
Therefore this preimage is closed. But having a closed dense subset means that $f=g$ everywhere. 

It only remains to show why the above map $(f,g)$ is continuous. Maybe I am making things too complicated. But I suspect something is fishy. In common sense topology (i.e. taking cartesian product $\mathbb{R} \times \mathbb{R}$) we have nice open sets $U \times V$ where $U,V$ are open in $\mathbb{R}$. But the same does not hold with the Zariski topology. Just look at the simple case of $\mathbb{A}^1 \times \mathbb{A}^1$ where each component has as closed sets the singletons respectively. But this obviously does not encompass the Zariski topology on $\mathbb{A}^2$.
In other words, to solve this exercice, I have to determine the whole topology on the product, right? This seems an enormous amount of work (cf. the Segre embedding) and in the context of this exercice makes no sense. Am I missing something obvious? Is there an easy way to conclude that $(f,g)$ is continuous? Also, put yet another way, in what sense is $(f,g)$ a morphism "naturally" (in the categorical sense for the product) if $f$ and $g$ are morphisms?
 A: You are on the right track. First of all a morphism is continuous for the following reason: Let $f:X\to Y$ be a morphism. Since continuity is local, we can assume that $X$ and $Y$ are affine, and $X\subseteq\mathbb{A}^n$ and $Y\subseteq\mathbb{A}^m$. Let $q$ be a polynomial in $m$ variables. Then $f^{-1}(q=0)=\{x\in X:q(f(x))=0\}$. Now $f$ is polynomial in each coordinate, and so $q\circ f$ is a polynomial on $\mathbb{A}^n$. Thus $f^{-1}(q=0)$ is closed, and so $f$ is continuous. 
You could analyze the product topology and show that $f\times g$ is continuous (this isn't that hard knowing what a basis for the topology is), but I'll show you a more elementary approach that doesn't involve products:
First, if $f$ and $g$ go to $\mathbb{A}^1$, then $(f-g)^{-1}(0)$ is the set where they coincide and this is closed (since $f-g$ is continuous and $0$ is closed). Now assume that $x\in X$ is such that $f(x)\neq g(x)$. Take an affine neighborhood $U$ of $x$ and an affine neighborhood $V$ of $f(x)$ such that $f(U)\subseteq V$ and such that $g(U)\subseteq V$. $f$ and $g$ coincide on a dense open set of $U$. Now, $f$ and $g$ can be written as polynomials in coordinates, and each of these coordinates coincides on a dense open set. By what we said at the beginning of this paragraph, they must coincide everywhere. Therefore $f=g$ everywhere on $U$, and so $x$ never existed.
Additional comment on products You are right that the Zariski topology on the product of varieties is not the product topology, but products of open affine sets are open and form a basis of the Zariski topology on the product. Therefore you can prove continuity of the product function on the product of affines.
