2. Prove that if f is surjective and I is an ideal of R then f(I) is an ideal.

Let $\displaystyle J = \{ j = f(i) : i \in I\} $

We know $\displaystyle 0 \in I\ $. Therefore, because f is an homomorphism, $\displaystyle f(0)=0 $, $\displaystyle 0 \in I $ and $\displaystyle 0 \in J $

We have $\displaystyle a,b \in I \implies a+b \in I $ and because f is an homomorphism $\displaystyle f(a+b) = f(a) + f(b) $ thus $\displaystyle f(a)+f(b) \in J $

We have $\displaystyle a \in I, r\in R \implies ar \in I $ and because f is an homomorphism $\displaystyle f(ar) = f(a)f(r) $ and that gives $\displaystyle f(a)f(r) \in J $ and conversely s $\displaystyle f(r)f(a) \in J $

Ok I miss some steps because it is tidious to write but you understand what I did. I don't understand where the fact that f is surjective intervene. Can you tell me where and why please?