Let $K$ be an integral domain, and consider a polynomial $f$ in $K[x]$ with degree $\deg(f) \leq n$. Suppose there exist $n + 1$ pairwise distinct elements $\alpha_1, \ldots, \alpha_{n+1} \in K$ such that $f(\alpha_i) = 0$ for $i = 1, \ldots, n + 1$. Prove that $f$ must be the zero polynomial.
So the proof goes as follows:
Let's suppose $f\ne 0$. We have $f(\alpha_1)=0\Rightarrow f=(x-\alpha_1)q_1$ for some $q_1\in K[x]$. Let's take $f(\alpha_2)=(\alpha_2-\alpha_1)q_1(\alpha_2)$. As $K$ is an integral domein and $\alpha_2-\alpha_1\ne0$, then $q_1(\alpha_2)=0$. Then $q_1=(x-\alpha_2)q_2$ for some $q_2\in K[x]$. So $$f=(x-\alpha_1)(x-\alpha_2)\dots(x-\alpha_{n+1})q_{n+1}, q_{n+1}\in K[x],$$ which contradicts $\deg(f)\le n$.
I can't really tell what's the specific property of integral domains that is needed for this result. Where are we using that $K$ is an integral domain (a commutative ring with identity which does not have divisors of zero)? We know that $\alpha_1,\dots,\alpha_{n+1}$ are pairwise distinct, so of course $\alpha_2-\alpha_1\ne0$. Why can't $K$ be just a ring?