Factoring a ring homomorphism From Atiyah-Macdonald, bottom of page 9:
"Let $f: A \to B$ be a ring homomorphism. 
...
We can factorize $f$ as follows:
$$ A \xrightarrow{p} f(A) \xrightarrow{j} B$$
where $p$ is surjective and $j$ is injective. For $p$ the situation is very simple (1.1): there is a one-to-one correspondence between ideals of $f(A)$ and of ideals of $A$ which contain $\ker(f)$, and prime ideals correspond to prime ideals. For $j$, OTOH, the general situation is very complicated. The classical example is from algebraic number theory. ..."

My questions:
1.$p = f$ and $j$ is the inclusion, no? 
2.Why do we want to factor $f$?
3.Since the chapter is about contractions and extensions I assume we can use this factorisation of $f$ to find the extension and contraction of ideals in $A$ and $B$. How do we do this?
On the next page, there is an example $\mathbb Z \to \mathbb Z[i]$ for $i = \sqrt{-1}$ where some extensions are listed. But the example doesn't seem to use this factorisation. Also: 
4.If the map is not explicitly given, $\mathbb Z \to \mathbb Z[i]$, is it the inclusion or any ring homomorphism?
Many thanks for your help.
 A: 1) On elements, we have $p(a)=f(a)$. But $p \neq f$ since the codomains ( = targets) differ. Many mathematicians regard the codomain as part of the data of a map. This becomes especially important in category theory and related areas. But yes, $j$ is the inclusion (not to confused with the identity; same remark about domains).
2) In some situations this becomes helpful. Sorry, but imprecise questions are rewarded with imprecise answers ;).
3) No. You have already quoted the point made by Atiyah. For surjective homomorphisms, it is easy to analyze the extended and contracted ideals. For injective homomorphisms, it is not.
3x) Well $\mathbb{Z} \hookrightarrow \mathbb{Z}[i]$ is already an inclusion.
4) For every ring $R$ (with unit, but this is the setting in Atiyah's book) there is a unique ring homomorphsm $\mathbb{Z} \to R$ (important exercise for you).
A: Here's one use of the factorization:
Consider a certain class of objects you are interested in; e.g., all commutative rings and the morphisms between them. An epimorphism in the class is a morphism $f\colon A\to B$ with the property that for all objects $C$ and all morphisms $g,h\colon B\to C$, if $gf=hf$, then $g=h$. 
In the class of sets and functions between sets, for example, epimorphism is synonymous with "surjective". In other contexts, it is not. For example, in the class of rings, the map $\mathbb{Z}\hookrightarrow\mathbb{Q}$ is an epimorphism.  In the class of Hausdorff spaces with continuous functions, a continuous function $f\colon X\to Y$ is an epimorphism if and only if $f(X)$ is dense in $Y$.
The factorization in question allows us to simplify the problem: a morphism $f\colon A\to B$ is an epimorphism if and only if the inclusion $f(A)\hookrightarrow B$ is an epimorphism. This reduces the problem from studying all maps to only studying how substructures behave inside fixed structures. This leads, in many settings, to results characterizing when a morphism is onto in terms of how the image sits inside the target (like the Hausdorff space case above).
Another: In order to study all possible homomorphism from a group $G$ to groups $K$, it suffices to study all possible onto maps $G\to K$ (which in turn can be done by studying only the onto maps of the form $G\to G/N$ where $N$ is a normal subgroup of $G$). If you understand all possible onto maps of $G$, then to understand all possible maps you just consider the possible onto maps, and subgroups.
