is $x = \frac 1y $ a function or a relationship? A teacher says $x = \frac 1y $ is indeed a function, because it's the same as $y = \frac 1x$ 
But I don't think so, 
because no restrictions for $x$ , so $x$ could be zero
but there is no solution for zero, so there's an $x$ that has no $y$
My dear teacher says 0 should be out of the domain in the first place 
Please help me know what's correct? 

The relation $y=f(x)$ is indeed a function with respect to $x$ iff $$x_1=x_2\Longrightarrow f(x_1)=f(x_2)$$ Here, you have $xy=1$ or $x=1/y$ or $y=1/x$. If we get the later relation then, it is not hard seeing that $y=1/x$ or $y=f(x)=1/x$ is a well-defined function. Of course, $1/0$ is a forbidden state so, we cannot select $x=0$ to put in $f$. If fact we cannot let $x$ to stand on $0$ on the real line $\mathbb R$. This means that, your dear teacher told you the very right fact. $$0\notin D_{f(x)=1/x}$$
