Ring Homomorphism by Idempotent

Theorem
Let $A$ be a commutative ring.

Let $e \mathop\in A$ be an idempotent element.

Let $eA := \ideal e$ be the ideal of $A$ generated by $e$.

Then the map
 * $f : A \to eA, \quad a \mapsto ea$

is a surjective ring homomorphism with kernel the ideal $\ideal {1-e}$ generated by $1-e$.

If $A$ is unital, then $f$ is a unital ring homomorphism.

Proof
Let $ea \mathop\in eA$ for some arbitrary $a \in A$.

Then

So $f$ is surjective.

Let $x, y \mathop\in A$.

Then

and

So $f$ is a ring homomorphism.

We have

Thus $1-e \in \map{\ker}{f}$ and $\ideal {1-e} \subseteq \map{\ker}{f}$.

Suppose $a \in \map{\ker}{f}$.

Then $ea = \map{f}{a} = 0$.

Thus $\map{\ker}{f} \subseteq \ideal {1-e}$, so $\map{\ker}{f} = \ideal {1-e}$.

Suppose $A$ is unital with unit $1$.

Then

Thus $f$ is a unital ring homomorphism.