Prove that any ring consisting of 5 elements is either isomorphic to $\mathbb Z_5$ or has “null multiplication”

Prove that any ring $K$ consisting of 5 elements is either isomorphic to $\mathbb Z_5$ or has $ab = 0\ \forall a, b \in K$.

*** UPD

Thank's to @almagest's hint I was able to prove this this. So here is the proof:

1) Let's take any non-zero element $a$ from additive group. It generates cyclic subgroup. According to Lagrange's theorem order of subgroup divides order of group. In our case order of group is prime therefore the subgroup is equal to the group. So all elements of the ring $K$ can be represented as $0, a, 2a, 3a, 4a$.

2) Build tables of addition and multiplication using distributive law. For example: $2a + 4a = 6a \equiv 2a \mod 5$
$2a \cdot 4a = 8a^2 \equiv 3a^2 \mod 5$
Every non-zero element in multiplication table will have form of $na^2$.

3) In case when there is $1$ in the ring it can be used as $a$ which gives us $a^2 = a$. In such case following map is an isomorphism: $f: na \mapsto n \bmod 5$. Indeed:

$f(na+ma) = f((n+m)a) \equiv n+m = f(na) + f(ma) \bmod5$ $f(na \cdot ma) = f((nm)a^2) = f((nm)a) \equiv nm = f(na)f(ma) \bmod 5$

4) Now let's prove that either ring contains $1$ or it has "null multiplication" (sorry I don't know correct term).

In case when $a \cdot a = a^2 = 0$ multiplication table of the ring will contain only zeroes.

In case when $a^2 = b \neq 0$ multiplication table for $a$ will look like this: $0, b, 2b, 3b, 4b$. According to logic of point 1) these elements constitute whole ring. Therefore one of them equals to $a$. That is $a \cdot c = a$. It is easy to check that $c = 1$.

• Sorry but I don't have any good thoughts on this. So asking for ideas. – Ivan Smirnov Apr 21 '16 at 14:14
• Well a good starting point is to notice that the additive group must be cyclic. So we can write the elements as $0,a,a+a,a+a+a,a+a+a+a$. Now use the distributive law to explore what happens if $a\cdot a\ne 0$. – almagest Apr 21 '16 at 14:23
• Thanks @almagest. Your hint showed the right path – Ivan Smirnov Apr 24 '16 at 13:12

Here is a hint before they succeed in closing the question. Under addition $R$ is an abelian group, so it has the same additive structure as $\mathbb{Z}_5$, now just show the multiplicative structure is the same. Good luck !
Make the assumption that $1\cdot 1 \neq 0$.