Let $A$ be a commutative ring with unity.
Let $\pi_a:A \rightarrow A$ be an endomorphism defined as:
$\pi_a(x) = ax$ where $a,x \in A$ (a is fixed)
Prove that the function $\pi_a(x)$ is surjective if and only if $a$ is invertible
I have seen similar questions on this topic, but all the ones I have found deal with topics/ideas (such as modules/metric spaces) I have not studied yet. Also, I am only asking for help on the forward direction.
My attempt (forward direction)
Assume $\pi_a(x)$ is surjective.
Since $\pi_a(x)$ is an endomorphism and surjective, it is also injective (I haven't proved that yet)
Thus, $\pi_a(x)$ is an isomorphism $\Rightarrow$ has an inverse function (we are allowed to use this result of isomorphisms).
Thus, $\pi_a(x)$ is invertible
Side question: does this even answer the original question since we were asked to prove $a$ was invertible (I am confused here)
$\Rightarrow$
Let $A$ be a commutative ring with unity.
Let $\pi_a:A\rightarrow A$ such that $\pi_a(x) = ax$ where $a$ is fixed.
Assume $\pi_a(x)$ is surjective.
Then, $\exists x \in A$ such that $\pi_a(x) = ax = 1_A$ (unity in $A$)
Since $ax=1_A$, $x$ is the inverse of $a,$ thus $a$ is inveritble.
$\Leftarrow$
Let $A$ be a commutative ring with unity.
Let $\pi_a:A\rightarrow A$ such that $\pi_a(x) = ax$ where $a$ is fixed.
Assume $a$ is invertible.
Then, $\forall y \in A$, $\pi_a(x) = y$ when $x = a^{-1}y$ and such an $x$ exists since $y \in A$ and $a$ is invertible.