Let $ R $ be commutative and let $ (e_1, ..., e_n) $ be a base for $ R^{(n)} $. Put $ f_i=\sum a_{ij}e_j $ where $ A=(a_{ij})\in M_n(R) $. Show that the $ f_i $ form a base for a free submodule $ K $ of $ R^{(n)} $ if and only if $ \det A $ is not a zero-divisor. Show that for any $ \bar{x}=x+K $ in $ R^{(n)}/K $ one has $ (\det A)\bar{x}=0 $. [Jacobson, Basic Algebra, Exercise 6, page 175]
My attempt:
Suppose $ f_i $ form a base for a free submodule $ K $ of $ R^{(n)} $ then it is clear that $ \det A $ is not a zero-divisor, because there exists a matrix $ B\in M_n(R) $, s.t. $ AB=I_n $ and we have $ \det A $ is not a zero-divisor. However, why can we get a base for a free submodule $ K $ if we only assume that $ \det A $ is not a zero-divisor? We know that if we suppose $ \det A $ is invertible, then it is trivial to see the conclusion. But why assuming not a zero-divisor also works?