a ideal of the ring of regular functions of an affine variety. We assume that $\Bbb k$ is an algebraically closed field.
Let $X \subset \Bbb A^n$ be an affine $\Bbb k$-variety  , let's consider $ \mathfrak A_X \subset \Bbb k[t_1,...t_n]$ as the ideal of polynomials that vanish on $X$. Given a closed subset $Y\subset X$ we associate the ideal $ a_Y \subset k[X]$ defined by $
a_Y  = \left\{ {f \in k[X];f = 0\,on\,Y} \right\}
$. 
I'm reading " Basic Algebraic Geometry of Shafarevich" and it says that " It follows from Nullstellensatz that $Y$ is the empty set if and only if $a_Y = K[X] $ But I don't know how to prove this . Maybe it's trivial , but I need help anyway.
After knowing if the result is true here, I want to know if it's true in the case of quasiprojective varieties, but first the affine case =)
It remains to prove that if $ Y\subset X $ then $$
Y = \phi  \Rightarrow a_Y  = k\left[ X \right]
$$
For that side we need Hilbert Nullstelensatz, but I don't know how to use it.

The Nullstellensatz is unnecessary here. If every function vanishes on a set Y (including all constant functions) then the set Y must obviously be empty; else the function f(x)=1 would be non-vanishing at some point x. Conversely if the set Y is empty then every function attains 0 at every point of Y.
