  We prove Bergman's theorem on centralizers by using generic matrices and
Kontsevich's quantization method. For any field $\textbf{k} $ of positive
characteristics, set $A=\textbf{k} \langle x_1,\dots,x_s\rangle$ be a free
associative algebra, then any centralizer $\mathcal{C}(f)$ of nontrivial
element $f\in A\backslash \textbf{k}$ is a ring of polynomials on a single
variable. We also prove that there is no commutative subalgebra with
transcendent degree $\geq 2$ of $A$.
