# When $M\simeq Ker \oplus Im$? Where $M$ is a Module

Suppose that $$M=R^n$$ and $$R$$ a PID, where $$n\geq 1,$$ and suppose $$N$$ is a submodule of $$M$$. A complement of $$N$$ in $$M$$ is a submodule $$P$$ of $$M$$ so that $$M=N\oplus P$$ (internal). If $$A\in M_{n\times n}(R)$$, the nullspace of $$A$$ is the submodule $$\{x\in M:Ax=0\}$$. Prove that

$$N$$ has a complement in $$M \iff N$$ is the nullspace of some $$A\in M_{n\times n}(R)$$.

My Thoughts:

So I've been able to show that if $$N$$ has a complement in $$M$$, then $$N$$ is the nullspace of some $$A\in M_{n\times n}(R)$$. But I'm having a lot of trouble with the converse.

I ended up trying to show that $$M\simeq N\oplus M/N$$ (External), but either I'm doing it wrong or I'm on the wrong track. Any help with this problem is greatly appreciated.

• Title answer: always, see here. Mar 7, 2019 at 14:11
• @DietrichBurde This is not true, $\mathbb{Q}$ is not isomorphic to $\mathbb{Z} \oplus \mathbb{Q}/\mathbb{Z}$ as abelian groups. Mar 7, 2019 at 14:18
• You said always which I did not find clear in this context, as you pointed out the title specifically. Here this works because of this specific context, since you can find the map $\rho$ which is given as an assumption in your link. Mar 7, 2019 at 14:25
• @Junkyards Thank you for your help. My comment should be formulated more precisely, you are right. $M$ is a free $R$-module of rank $n$. Mar 7, 2019 at 14:34

Use the theorem of elementary divisors: if $$N$$ is a submodule of the free module $$R^n$$ ($$R$$ a PID) there exists a basis $$\{e_1,...,e_n\}$$ of $$R^n$$, an integer $$k\leq n$$ and elements $$r_1\mid\cdots\mid r_k$$ of $$R$$ (here $$\mid$$ denotes divisibility) such that $$\{r_1e_1,...,r_ke_k\}$$ is a basis of $$N$$.
The modules that have a complement are those such that $$r_1=\cdots=r_k=1$$ (the complement has basis $$\{e_{k+1},...,e_n\}$$).