## kernel, image being direct summands

This is embarrassing but I seem to be having trouble with the first isomorphism theorem.

I'm reading stuff about endomorphisms' kernels and images being direct summands of a module. I haven't seen any explicit statements but the authors clearly imply that whether the kernel is a direct summand is indepentent from whether the image is. I don't understand why.

If I have a direct sum of two modules $\displaystyle K\oplus L$ isn't it always true that $\displaystyle (K\oplus L)/K$ is isomorphic to $\displaystyle L?$ Let $\displaystyle \phi:[(k,l)]\longmapsto l,\,\phi: (K\oplus L)/K\longrightarrow L.$ $\displaystyle \phi$ is clearly an isomorphism, isn't it? I've checked twice and I can't see why it wouldn't be.

But then, for $\displaystyle f:M\longrightarrow M,$ if $\displaystyle \ker f$ is a direct summand of $\displaystyle M,$ say $\displaystyle M\cong\ker f \oplus N,$ and I get

$\displaystyle N\cong (\ker f \oplus N)/\ker f\cong M/\ker f \cong \mathrm{im} f$

from the first isomorphism theorem. Which would mean, in particular, that $\displaystyle \mathrm{im} f$ is a direct summand of $\displaystyle M$ too. What am I doing wrong?

(I'm sorry if it's not very readable. I hope it is but it's 4.30 am here and I barely see anything.)