I've seen the fundamental theorem for finitely generated modules over a PID in it's invariant factor form. I'm trying to understand the rational behind how we compute invariant factors. Here is an excerpt I'm having difficulty with. Let $M$ be a module over a PID $R$.
How to compute invariant factors: Pick a generating set $X= \{x_1,\dots,x_n\}$ for $M$. Then there's an onto module homomorphism $f:R^n \rightarrow M$ by $(r_1,\dots,r_n) \mapsto \sum_1^n r_ix_i$. It will be shown later that $\ker(f)$ is finitely generated, so we can pick a generating set $\{y_1,\dots,y_m\}$ for $\ker(f)$. Define a map $$ g:R^m \rightarrow R^n \text{ by } (r_1,\dots,r_m) \mapsto \sum_1^m r_jy_j. $$ Then $\ker(f) = g(R^m)$ and so $M \cong R^n/g(R^m)$.
There are two main things I'm not seeing.
- Why is $g$ a map into $R^n$? I suppose you might be tacitly mapping the sum $\sum_1^m r_jy_j \mapsto (r_1,\dots,r_n)$ where you add in extra zeros or truncate at the $n$'th entry depending on whether or not $n<m$ or $n>m$. Is that what's going on? I know that if $X$ is a basis for a free $R$-module $M$ then $M \cong \oplus_{x \in X} R$, but we just have a generating set, not necessarily a basis.
- The fact that the kernel of $f$ is equal to the image of $g$. Straight from definitions, $$ \ker(f) = \{(r_1,\dots,r_n) \in R^n \mid \sum_1^nr_ix_i = 0 \} $$ and $$ g(R^m) = \{g(a) \mid a \in R^m\} = \{\sum_1^mr_jy_j \mid (r_1,\dots,r_m) \in R^m\}. $$ I have no idea why these should be the same. Thanks in advance for the clarification.