The definition of "algebraically independent" In Lang's Algebra, he gives a definition that 

Elements $x_1, \cdots, x_n\in B$ are called algebraically independent over $A$[a subring of $B$] if the evaluation map $$f\mapsto f(x)$$is injective. Equivalently, we could say that if $f\in A[X]$ is a polynomial and $f(x)=0$, then $f=0$.

I am confused about the "injective" here. Two possible interpretations in my mind:


*

*Fix an $f$, for $x\neq y,f(x)\neq f(y).$

*Fix an $x$, for $f_1\neq f_2,f_1(x)\neq f_2(x).$


I was wondering which one is correct and why. Could you give me some helpful examples?
Besides, why are these two definitions equivalent?
Thanks in advance.
 A: Formally, it means that given any $f\in A[X_1,\ldots,X_n]$, if $f(x_1,\ldots,x_n)=0$ then $f=0$ as a polynomial.
A: The evaluation map is from $A[X_1,\dots,X_n]$ to $B$.  I'll denote it $\text{ev}_x : A[X] \rightarrow B$.  Writing it out very explicitly, $\text{ev}_x(f(X_1,\dots,X_n)) = f(x_1,\dots,x_n)$.  To say that it is injective is to say $ev_x(f) = ev_x(g) \Rightarrow f = g$.  This is your second interpretation.  To see that the two definitions are equivalent, recall that for any ring homomorphism $\phi : R \rightarrow S$, $\phi(r) = \phi(r')$ $\Longleftrightarrow$ $r - r' \in \text{ker}(\phi)$.  Then it is a little exercise to see that $\phi$ is injective if and only if $\text{ker}(\phi) = \{0\}$.  Apply this result to $ev_x$ and it says that $ev_x$ is injective if and only if $ev_x(f) = 0 \Rightarrow f = 0$.  But $ev_x(f) = f(x_1,\dots,x_n)$, so the condition becomes $f(x_1,\dots,x_n) = 0 \Rightarrow f(X_1,\dots,X_n) = 0$.  It is important to understand throughout that $f(x_1,\dots,x_n)$ is always an element of $B$, while $f(X_1,\dots,X_n)$ is always a polynomial in several variables with coefficients in $A$ (that is, an element of $A[X]$).
