# Ring with $\frac{n+1}{2}$ squares

Let $R$ be a ring with $n=|R|\geq3$ elements, which has $\frac{n+1}{2}$ squares. Prove that $1+1$ is invertible and $R$ is a field.

I thought that if there are $\frac{n+1}{2}$ squares, then $n+1$ is even, which means $n$ is odd.
Let $k$ be the order of $1$. Obviously, $k|n$, hence $k$ is odd, which implies $(2,n)=1$, resulting that $1+1\neq0,$ i.e. $1+1$ is invertible.

We see that for any $x\in R$, $x\neq-x$, but I got stuck here.

• Is the ring supposed to be commutative? – punctured dusk Mar 9 '17 at 21:45
• It's not said, but I guess we can start by proving it is, since every finite field is commutative. – ztefelina Mar 9 '17 at 21:49
• That's a good start (+1). We clearly have that $x^2=(-x)^2$. As any $(x,-x)$ pair thus produces only one square, it must be that there are no other repetitions among squares (otherwise there will be too few of them). This implies that $k$ must be a prime. For if $k$ has distinct odd prime factors, then (by the Chinese Remainder Theorem), $1$ is the square of at least four distinct elements. Also, if $k$ is divisible by a square of a prime, then $0$ will be the square of more than one element, again contradicting what we learned. So $k$ is an odd prime. – Jyrki Lahtonen Mar 9 '17 at 22:16
• I would argue that you don't know that $n$ is odd because the natural parsing of "if there are ____ squares" would be "at least ___ squares" not "precisely ____ squares.". $\mathbb{Z}$ has $4$ squares. It also has $1000$ squares and $11/2$ squares. – Stella Biderman Mar 9 '17 at 22:40
• So $R$ will be an algebra over $\Bbb{F}_p$ without nilpotent elements. There may be a suitable structure theorem for such beasts allowing us to conclude. But, Morpheus beckons here. Stella's interpretation is also interesting. But, if $R$ is a field of $n=4$ elements, it has four squares, $4\ge (4+1)/2$, but $1+1$ is not invertible. IMHO this is a point in favor of the interpretation that the number of squares should be exactly $(n+1)/2$. It may still be true that if the number of squares is at least $(n+1)/2$, then $R$ is a field. But I'm not sure? Anyway, I don't see a proof. – Jyrki Lahtonen Mar 9 '17 at 22:46

I am assuming the interpretation that the number of squares is exactly $$(n+1)/2$$. As the OP observed, this implies that $$n$$ must be odd, and hence the additive order $$k$$ of $$1$$ is also an odd integer.

1. It follows that $$k\cdot x=0$$ for all the elements of $$R$$. If $$x\neq0$$, this implies that $$x\neq -x$$ for otherwise the order of $$x$$ is a factor of both $$k$$ and $$2$$, which is absurd.

2. As $$x^2=(-x)^2$$ for all $$x\neq0$$, the $$n-1$$ non-zero elements of $$R$$ can have at most $$(n-1)/2$$ distinct squares. Adding $$0^2=0$$ to the tally, we can have at most $$(n+1)/2$$ distinct squares. This means that we must have the following implication:

If $$x^2=y^2$$ in the ring $$R$$, then either $$x=y$$ or $$x=-y$$.

3. It follows that $$R$$ can have no zero divisors. This is a bit tricky. Assume contrariwise that $$uv=0$$ for some elements $$u,v\in R\setminus\{0\}$$. Then
• We also have $$vu=0$$. For if $$vu\neq0$$, then we have $$0^2=0=v0u=vuvu=(vu)^2$$ in violation of the highlighted implication.
• But if $$vu=uv=0$$, then we have $$(u-v)^2=u^2-uv-vu+v^2=u^2+v^2$$ as well as $$(u+v)^2=u^2+uv+vu+v^2=u^2+v^2.$$ The highlighted implication then tells us that $$u-v=\pm(u+v)$$ implying that either $$u=0$$ or $$v=0$$. This is a contradiction.
4. In a ring without zero divisors the cancellation law, $$ca=cb\implies a=b$$ holds whenever $$c\neq0$$. Similarly the cancellation law, $$ac=bc\implies a=b$$ also holds.
5. Let $$r\in R, r\neq0$$, be arbitrary. By item 4 the elements $$ra$$, $$a$$ ranging over $$R$$, are all distinct. As $$R$$ is finite, $$1$$ is among them, and we can conclude that $$r$$ has a right inverse. Similarly we see that $$r$$ has a left inverse. Associativity of the product then implies in the usual way that the left and right inverses must coincide. Therefore $$r$$ is invertible.
6. So $$R$$ is a division ring. By a theorem of Wedderburn every finite division ring is a field, and we are done.
• I wonder whether the piece of information about the number of squares will also let us get away with using Wedderburn. IOW, I hope there might be a lower technology substitute for my step 6. – Jyrki Lahtonen Mar 11 at 11:02