TITLE: Any finite algebraic subset of $\mathbb A^2_k$ can be determined by 2 equations
QUESTION [5 upvotes]: Please give me a hint for this exercise.

Show that every finite subset of the affine plane, $\mathbb A^2_k$, over an algebraically closed field, $k$, can be determined by two equations.

I am using Shafarevich's book.

REPLY [5 votes]: First case
If the points $P_i=(a_i,b_i)$ have different abscissae  $a_i\neq a_j$, take for one of the equations $y=f(x)$ where $f$ is a polynomial satisfying $b_i=f(a_i)$ [key word: Lagrange interpolation polynomial] and for the other equation take $\prod (x-a_i)=0$.
Second case
If you are unfortunate and some abscissae coincide, make a change of variables so as to reduce to the first case.
One possible such  change is $x=x'+y', y=\lambda y'$ with $\lambda \neq \frac {b_i-b_j}{a_i-a_j}$ for all $i\neq j$.
This works as soon as  $k$ infinite but not necessarily algebraically closed.