Hi! I would like some help with this question I need to prove

let R be a non zero commutative ring and we are required to prove that any linearly independent subset of Rsquared has at most 2 elements I wanted to use the theorem where every submodule M of Rtothe N has a basis with at most N elements BUT this is only true for PIDs