Help in this proof (easy) DEFINITION
Over any commutative ring $A$, for two column vectors $f,g$ we write $f\sim g$ over $A$ to mean that there exists $M\in GL_n(A)$ such that $f=Mg$.
Saying that I have a little doubt in this proof (I'm sure I'm forgetting something and this should be very simple):

Why $\det M(x)$ is constant in $S^{-1}R$?
Thanks in advance

The matrix $M\in \mathrm{GL}_n(S^{-1}R[x])$ is invertible so $\det(M)$ belongs to the group of units of $S^{-1}R[x]$. It remains to see that these elements are in $S^{-1}R$, i.e. are "constant". As $x$ is an independent variable, you can write $A=S^{-1}R$ and think of $S^{-1}R[x]=A[x]$ as a polynomial ring over $A$. 
If $A$ is an integral domain and if $P,Q\in A[x]$ are two polynomials such that $PQ=1$, then both $P$ and $Q$ have to be in $A$. Indeed, if $P$ is of degree $m$ and $Q$ is of degree $n$ then $PQ$ is of degree $m+n$. Since $1$ is of degree $0$, you get that both $P$ and $Q$ are constants.
