Every module over a field is free. Is every commutative ring whose modules are all free a field?
Solution 1:
I would think so.
Let $0\neq x\in A$ a non-invertible element. Then the ideal $Ax$ is proper. Now consider the quotient $A/xA$ as an $A$-module. Since $x\cdot\bar1=\bar 0$, it is torsion, thus not free.
Solution 2:
If $I$ is a proper ideal of $A$ then $A/I$ is free by assumption, but any element in a basis will be killed by anything in $I$, so we must have $I = (0)$, and thus $A$ must be a field.
Solution 3:
Tobias's and Andrea's answers are pretty much optimal for commutative rings. I'd just like to share a strategy that works for noncommutative rings as well.
For any ring (with identity) $R$, all right $R$ modules are free iff $R$ is a division ring.
Proof: Let $S$ be a simple right $R$ module. Then $S$ is free. Since it's simple, it cannot have more than one copy of $R$ in its decomposition into a sum of copies of $R$. Thus $S\cong R$ as right $R$ modules, and this shows $R$ is a simple right $R$ module. That immediately implies $R$ is a division ring.
Solution 4:
Assume that $R$ is a commutative ring with $1$ whose every module is free. Let $I\subseteq R$ be an ideal. Note that $R/I$ is an $R$-module and therefore free. If $I\neq\{0\}$, then every element of $R/I$ is a torsion element (since we can act by any non-zero element of I to obtain $0$ in $R/I$). Since $R/I$ is also free, $R/I=\{0\}$. Therefore, $I=R$. So, the only ideals are $\{0\}$ and $R$, meaning $R$ is a field.