Homomorphism of free modules $A^m\to A^n$ Let's $\varphi:A^m\to A^n$ is a homomorphism of free modules over commutative (associative and without zerodivisors) unital ring $A$. Is it true that $\ker\varphi\subset A^m$ is a free module?
Thanks a lot!
 A: Unfortunately, the kernel need not be free.  Consider the case $m=n=1$: the homomorphism $\phi:A\to A$ is then multiplication by some $a\in A$, and if $a$ is a zerodivisor, $\ker\phi$ cannot be free because it is annihilated by $a$.
Edit: If $A$ is an integral domain (has no zerodivisors) but has a nonfree stably free module $M$, (see Keith Conrad's expository writeup "A nonfree stably free module" for a minimal example), then we can write $A^m\cong A^n\oplus M$, and the projection $A^m\to A^n$ has kernel $M$, which is not free.
A: Let $A$ be a Dedekind domain which is not a PID, and $I=(a,b)\subset A$ a non-principal ideal.  Define a map $\varphi:A^2\to A$, $(x,y)\mapsto ax+by$.  We have a short exact sequence
$$
0\to \ker(\varphi)\to A^2\to I\to0
$$
of $A$-modules.  $I$ is projective, so this sequence splits, and we get $A^2\cong I\oplus \ker(\varphi)$.  The structure theorem for finitely generated modules over a Dedekind domain now tells us that $\ker(\varphi)\cong I^{-1}$, so $\ker(\varphi)$ is not free.
A: Here is a counterexample which is in some sense universal for the case $m = 2, n = 1$. Let $R = k[x, y, z, w]/(xy - zw)$ ($k$ a field). This is an integral domain because $xy - zw$ is irreducible. The homomorphism $R^2 \to R$ given by
$$(m, n) \mapsto (xm - zn)$$
has a kernel which contains both $(y, w)$ and $(z, x)$. If the kernel is free then it must be free on these two elements by degree considerations, but $x(y, w) = (zw, xw) = w(z, x)$ is a relation between them. 
