Proving a Ring Commutative 
Let $(A, +, \cdot)$ be a ring with the following properties
a) $1 + 1=0$;
b) $x^2=0$ for any noninvertible $x$;
c) $\forall x \in A$ that are invertible, $\exists x' \in Z(A)$ such that $x^2=(x')^2$.
Prove that $A$ is commutative.

$1+1=0 \Rightarrow a+a=0 \Rightarrow a=-a\forall x \in A$
Let $a$ and $b$ be two elements in $A$ such that at least one of them is not invertible. Then $ab$ is not invertible, so $(ab)^2=a^2b^2$.
Now let $x$ and $y$ be two invertible elements in $A$. $xy$ is invertible so there exists $a \in Z(A), (xy)^2=a \Rightarrow x(yx)y=a^2 \Rightarrow yx=x^{-1}a^2y^{-1}$. Because $a^2$ is in $Z(A)$ it commutes with every element in $A$, therefore $yx =x^{-1}y^{-1}a^2\Rightarrow (yx)^2=a^2=(xy)^2$.
I feel like $f:A \to A, f(x)=x^2$ should be a homomorphism, but I cannot seem to prove it. I know I should use the fact that $1+1=0$, but I could not find a meaningful way to use it.

Some observations:

*

*For $x \in Z(A), y \in A$ we have $(x+y)^2 = x^2 + xy + yx + y^2 = x^2 + xy + xy + y^2 = x^2 + y^2$, in patricular for $y \not\in A^*: (x + y)^2 = x^2$

*Let $x,y \in A$ with $x y \in A^*$. We show that $x,y \in A^*$.
Suppose that $y \not\in A^*$. Then $y = 1 \cdot y = (xy)^{-1} (xy) y = 0$, but then $0 = xy \in A^*$, a contradiction. Therefore $y \in A^*$ (and $x \in A^*$ by the same logic).

*Let $x \in A^*$. We can choose $x' \in Z(a)$ with $x^2 = (x')^2$. We note that since $x$ is a unit, $x'$ is also a unit by the equation before and step 2. Then $0 = x^2 + (x')^2 = (x + x')^2$ by step 1. Therefore $x + x'$ is not a unit, therefore we can write $x = x' + u$ for some $u \in A \setminus A^*$.

*Let $x,y \in A \setminus A^*$. We show that $x + y \in A \setminus A^*$.
Suppose $x + y = z \in A^*$. We write $z = z' + u$ as in step 3. Then $xy + yx = (z')^2$ by step 1 (using $x^2,y^2 = 0$), therefore $xy = (z')^2 + yx$. Squaring gives (using step 1 and that $yx$ is not a unit by step 2) that $xyxy = (z')^4 \in A^*$, therefore $x \in A^*$ by step 2, a contradiction. Therefore $x + y \not\in A^*$.

*We need to show that $xy = yx$ for all $x,y \in A$. This is equivalent to $x^2 + xy + yx + y^2 = x^2 + y^2$, i.e. equivalent to $(x + y)^2  = x^2 + y^2$ for all $x,y \in A$.

With these steps, it is not difficult to check $(x + y)^2  = x^2 + y^2$ by checking the cases $x,y \not\in A^*; x\in A^*, y \not\in A^*; x,y \in A^*$ (writing all units as in step 3).
Remark regarding your map $f$: If $A$ is a ring with $1 + 1 = 0$, then $x \mapsto x^2$ is a homomorphisms (of groups or rings) if and only if $A$ is commutative. This is essentially a rephrasing of step 5. $f$ is a monomorphism if and only if $A$ is a field.
