In the ring $R=K[x_1,...,x_n]$, the variety of an ideal is defined as $V(I)=\{(a_1,...,a_n)\in K^n|f(a_1,...,a_n)=0, \space\forall f\in I\}$
The ideal of a variety is defined as
$I(V)=\{f\in R|f(a_1,...,a_n)=0, \space\forall (a_1,...,a_n)\in V\}$
I'm trying to show that $V(I(X))=X$, where $X\subseteq K^n$ is the variety for some other ideal. So for any $f\in I(X)$, we have $f(a_1,...,a_n)=0$, for all $(a_1,...,a_n)\in X$. But i don't know how applying the variety on this ideal will bring me back to the set $X$. Any help would be greatly appreciated!
Hint: At first, prove the following facts (which follow immediately from the definitions):
These facts include one of the two inclusions you need to show. The other inclusion can be shown by writing $X = V(J)$ for some ideal $J \subset K[x_1,\dotsc,x_n]$ and then applying 2. and 1.