Let $R^2 = R \times R$ be a free module of rank $2$ over a principal ideal domain.
I am trying to prove that for every non-zero element $a$ of $R^2$ there is a basis such that $a$ belongs to one of the basis axes.
Is this correct?
My attempt to prove it:
Two elements $(a, b)$ and $(c,d)$ of $R^2$ form a basis if and only if there are scalars $x$, $y$, $v$, $w$ such that:
$x(a,b) + y(c,d) = (1,0)$
$v(a,b) + w(c,d) = (0,1)$
or
$xa + yc = 1$
$xb + yd = 0$
$va + wc = 0$
$vb + wd = 1$
The equations hold if
$ad - bc = 1$
then
$x = d$
$y = -b$
$v = -c$
$w = a$
Now let's take an arbitrary non-zero element $(a',b')$ from $R^2$.
In every PID the Bezout’s identity holds:
for any scalars $a'$, $b'$ of a PID there are scalars $c$, $d$ such that
$a'd - b'c = gcd(a',b')$
If $gcd(a',b') \ne 0$ (which is true if $a' \ne 0$ or $b' \ne 0$), then there are also scalars $a$, $b$
such that
$a' = gcd(a',b')a$
$b' = gcd(a',b')b$
and
$ad - bc = 1$
The scalars $a$, $b$, $c$, $d$ satisfy the necessary and sufficient equations, so elements $(a,b)$ and $(c,d)$ form a basis of $R^2$.
The element $(a',b')$ belongs to the axis generated by $(a,b)$ since $(a',b') = g(a,b)$, where $g = gcd(a',b')$.
Your intuition is correct. It's quite unusual to write $M$ for the regular module (free module of rank $1$), but I'll stick to it.
Suppose $(r,s)\in M^2$. Then let $d$ be a greatest common divisor of $r$ and $s$. If $r=da$ and $s=db$, you know that $1$ is a greatest common divisor of $a$ and $b$, so by Bézout's identity, there exist $c$ and $d$ such that $ad-bc=1$.
Then $\{(a,b),(c,d)\}$ is a basis of $M^2$ and $(r,s)=d(a,b)$.