I was reading of Shaferevich's book of Basic Algebraic Geometry 1. On page 25 Example 4 it says that if $X$ and $Y$ are any closed sets in $\mathbb{A}^n$ and $\mathbb{A}^m$ respectively then $k[X\times Y]=k[X]\otimes k[Y]$. Here $k[X]$ is the ring of regular functions on $X$ (Coordiante ring of $X$).
He defines $\phi :k[X]\otimes k[Y]\rightarrow k[X\times Y]$ by
$\phi (\sum_if_i\otimes g_i)(x,y)=\sum_if_i(x)g_i(y)$. This is well-defined and surjective $k$-algebra homomorphism. But I could not understand how it is injective.
If anyone explains me I will be very grateful. Thank you.