Proof: Let M be a free module over a PID R, and let N be a submodule of M. We want to show that N is also a free module.
Since M is a free module, it has a basis B. Let B = {b1, b2, ..., bn} be a basis for M.
Now, consider the set S = {x ∈ N | x can be written as a linear combination of elements in B}. We claim that S is a basis for N.
First, we need to show that S is a generating set for N. Let y ∈ N. Since N is a submodule of M, y can be written as a linear combination of elements in B. Therefore, y ∈ S, and S is a generating set for N.
Next, we need to show that S is linearly independent. Suppose that there exist elements s1, s2, ..., sk ∈ S and scalars r1, r2, ..., rk ∈ R such that r1s1 + r2s2 + ... + rksk = 0. We want to show that r1 = r2 = ... = rk = 0.
Since each si ∈ S, we can write si as a linear combination of elements in B. Let si = a1i1 + a2i2 + ... + anin, where ai1, ai2, ..., ain ∈ R and i1, i2, ..., in are indices corresponding to elements in B.
Substituting the expressions for si into the equation r1s1 + r2s2 + ... + rksk = 0, we get:
r1(a11 + a21 + ... + an1) + r2(a12 + a22 + ... + an2) + ... + rk(a1k + a2k + ... + ank) = 0.
Since B is a basis for M, the elements b1, b2, ..., bn are linearly independent. Therefore, the coefficients in the above equation must all be zero. This gives us a system of equations:
r1a11 + r2a12 + ... + rka1k = 0,
r1a21 + r2a22 + ... + rka2k = 0,
...
r1an1 + r2an2 + ... + rkan = 0.
Since R is a PID, it follows that the only solution to this system of equations is r1 = r2 = ... = rk = 0. Therefore, S is linearly independent.
Since S is a generating set for N and is linearly independent, it is a basis for N. Thus, N is a free module over R.
Therefore, we have proved that every submodule of a free module over a PID is free.