Theorem (morphisms of affine algebraic sets and algebra homomorphisms between coordinate rings)

Let $X\subseteq \mathbb{A}^x$ and $Y\subseteq \mathbb{A}^n$ be affine algebraic sets. The pullback gives bijections $$ \begin{align*} \set{\text{morphisms $X\to Y$}} &\leftrightarrow \set{\text{$k$-algebra homomorphisms $A(Y) \to A(X)$}} \\ \set{\text{isomorphisms $X\to Y$}}&\leftrightarrow \set{\text{$k$-algebra isomorphisms $A(Y) \to A(X)$}} \\ f &\mapsto f^\ast \\ (λy_1, \ldots, λy_n) &\mapsfrom λ \end{align*} $$ where $y_1, \ldots, y_n$ are coordinates in $\mathbb{A}^n$.

Proof