TITLE: Is there a non-commutative ring with a trivial automorphism group?
QUESTION [51 upvotes]: This question is related to this one. In that question, it is stated that nilpotent elements of a non-commutative ring with no non-trivial ring automorphisms form an ideal. Ted asks in the comment for examples of such rings but there are no answers. I would also like to know whether there are such rings and hence this question.

REPLY [11 votes]: Here's a construction of a non-commutative ring with no non-trivial automorphisms. It is not rigid though (rigid=no nontrivial endomorphisms. See Dejan's answer).
First, define sets $S_1,S_2\subset\mathbb{N}$, where $S_1$ is the set of square-free numbers whose prime factors are equal to 1 mod 4 and $S_2$ is the set of square-free numbers equal to 3 mod 4. (The precise choice of $S_1,S_2$ won't really matter).
Now, for $i=1,2$, define $G_i$ to be the set of nonnegative rational numbers of the form $p/q$ for $p$ a nonnegative integer and $q\in S_i$. These sets are closed under addition, so are commutative monoids. Now form the free product $G=G_1*G_2$ with canonical maps $\theta_i\colon G_i\to G$, which I will write multiplicatively. To be precise, $G$ is a (noncommutative) monoid generated by elements $\{\theta_i(x)\colon x\in G_i\}$ ($i=1,2$) subject to the relations that $\theta_i(0)=e$ is the identity and $\theta_i(x)\theta_i(y)=\theta_i(x+y)$. Every element $g\in G$ can be written uniquely as
$$
g=\theta_{i_1}(x_1)\theta_{i_2}(x_2)\cdots\theta_{i_n}(x_n)\qquad\qquad{\rm(1)}
$$
for $n\ge0$, $i_k\in\{1,2\}$, $x_k\in G_k\setminus\{0\}$ and $i_k\not=i_{k+1}$ (I'm taking the empty product to be the identity $e$, for the case $n=0$).
Construct the monoid ring $R=F_2[G]$, where $F_2$ is the field with two elements. Every element $a\in R$ can be written as
$$
a = \sum_{i=1}^na_i g_i\qquad\qquad{\rm(2)}
$$
for $n\ge0$, $a_i\in F_2$ and $g_i\in G$. Furthermore, this can be done so that $g_i$ are distinct and $a_i\not=0$ (equivalently, so that $n$ is minimal) in which case the representation is unique.
Then, $R$ is clearly noncommutative, as it contains the multiplicative and noncommutative monoid $G$. It also has no nontrivial automorphisms. I'll post the proof of this in a moment, but the idea is that any ring-automorphism of $R$ is given by a monoid-automorphism of $G$, and $G$ has no nontrivial automorphisms.

The proof that $R$ has no nontrivial automorphisms follows now.
First, I'll define a bit of notation denoting the 'degree' of elements of $G$ and $R$. For any $g\in G$, let $\vert g\vert$ denote the integer $n$ occuring in expansion (1). When we multiply two terms $g,h\in G$ then we just concatenate the expansions and, possibly combine the last term in the expansion for $g$ with the first term in the expansion for $h$. There can be no further cancellation, as $G_1,G_2$ have no nontrivial units. So,
$$
\vert g\vert+\vert h\vert-1\le\vert gh\vert\le\vert g\vert+\vert h\vert.
$$
Now, for any nonzero $a\in R$ let $\vert a \vert$ denote the maximum of $\vert g_i\vert$ as $g_i\in G$ runs through the terms in the minimal expansion (2) for $a$. If we have $a,b\in R$ then let $g\in G$ be a term in the expansion of $a$ maximizing $\vert g\vert$ and $h\in G$ be a term in the expansion of $b$ maximizing $\vert h\vert$. So, $\vert a\vert=\vert g\vert$ and $\vert b\vert=\vert h\vert$. Among the possible choices for $g$ choose one maximizing $x_n$ in expansion (1) and, among the possible choices for $h$, choose one maximizing $x_1$ in expansion (1). Then, expanding out $ab$, the term $gh$ occurs precisely once. So, $\vert ab\vert\ge\vert gh\vert$ and we get,
$$
\vert a\vert+\vert b\vert-1\le\vert ab\vert\le \vert a\vert+\vert b\vert.
$$
Now, we can prove the following.

If a nonzero element $a\in R$ has solutions to $b^n=a$ for infinitely many positive integers $n$, then $a=\theta_i(x)$ for some $i\in\{1,2\}$ and $x\in G_i$. Furthermore, in that case, the only solutions to $b^n=a$ are $b=\theta_i(x/n)$ and $x/n\in G_i$.

Proof: Assume $a$ is not the identity, for which the conclusion is immediate.
Suppose that $\vert b\vert\ge2$. Then, from the inequalities above, $\vert b^n\vert\ge n+1$. For large enough $n$, this will exceed $\vert a\vert$. So, we must have $\vert b\vert=1$ when $n$ is large. The only possibilities are $b\in\hat G_1\equiv{\rm Im}(\theta_1)$, $b\in \hat G_2\equiv{\rm Im}(\theta_2)$ and $b=g_1+g_2$ for $g_i\in G_i$. In the latter case, $g_1g_2g_1g_2\cdots$ occurs in the expansion for $b^n$, so $\vert b^n\vert=n$ which will exceed $\vert a\vert$ if $n$ is large. So, for large enough $n$, any solution to $b^n=a$ will be of the form $b=\theta_i(y)$ so $a=b^n=\theta_i(ny)$ as required.
So, we know that $a=\theta_i(x)$ for some nonzero $x\in G_i$ and, hence, $\vert a\vert=1$. If $b^n=a$ ($n > 1$) and $\vert b\vert\ge2$ then $\vert b^n\vert\ge n+1 > \vert a\vert$, giving a contradiction. As above, if $b$ is not of the form $\theta_j(y)$ for $y\in G_j$ then $\vert b^n\vert=n > \vert a\vert$. So, $b=\theta_j(y)$. As $\theta_j(ny)=b^n=a=\theta_i(x)$, we have $j=i$ and $x/n=y\in G_i$. QED.
Finally, for $i\in\{1,2\}$ and $x\in G_i$, the element $\theta_i(x)$ of $R$ is characterized purely by its algebraic properties, so must be fixed by every automorphism. This shows that the automorphism group of $R$ is trivial.

The element $a=\theta_i(x)$ of $R$ is uniquely determined by the following property: for postive integers $n$, $b^n=a$ has a solution in $R$ (for $b$) if and only if $x/n\in G_i$.

Proof:
The previous lemma shows that if $a$ is of the required form then $b^n=a$ has a solution if and only if $x/n\in G_i$. Conversely, suppose that $a$ satisfies the required property. Then, there are infinitely many $n$ so that $x/n\in G_i$ and, by the previous lemma, $a=\theta_j(y)$ for some $j\in\{1,2\}$. By the previous lemma, a positive integer $n$ satisfies $y/n\in G_j$ if and only if $b^n=a$ which, by the hypothesis, is equivalent to $x/n\in G_i$. By the choice of $G_1,G_2$ this forces $i=j$ and $x=y$. QED