nilpotent elements of $M_2(\mathbb{R})$, $M_2(\mathbb{Z}/4\mathbb{Z})$ Let $R$ be a ring. We define $\mathfrak{N}(R)$ to be the set of nilpotent elements in $R$. Find $\mathfrak{N}(R)$ for:


*

*$R = M_2(\mathbb{R})$

*$R = M_2(\mathbb{Z}/4\mathbb{Z})$
 A: We first review some facts in linear algebra.
Lemma 1. Suppose $F$ is a field, $A \in M_n(F)$ is an $n \times n$ matrix with coefficients in $F$. If for some $k \ge 1$ we have 
$$\text{rank}(A^k) = \text{rank}(A^{k+1})$$ 
then for any $l \ge k$, we have $$\text{rank}(A^k) = \text{rank}(A^l).$$
Proof. For any positive integer $i$, let $S_i$ be the set of $x \in F^n$ such that $A^ix = 0$. Using linear algebra, we know that $S_i$ is a vector space over $F$ and $\text{dim}_F = n - \text{rank}(A^i)$.
Notice that $S_i \subseteq S_j$ for any $1 \le i < j$. In particular, $S_k \subseteq S_{k+1}$. The condition $\text{rank}(A^k) = \text{rank}(A^{k+1})$ implies that $\text{dim}_F(S_k) = \text{dim}_F(S_{k+1})$ and hence $S_k = S_{k+1}$.
Now for any $l \ge k$, we prove that $S_l = S_{l+1}$. On the one hand, as mentioned above, we have $S_l \subseteq S_{l+1}$. On the other hand, for any $y \in S_{l+1}$, we have $A^{l+1}y = A^{k+1}A^{l-k}y = 0$ and hence $A^{l-k}y \in S_{k+1} = S_k$. Hence $A^kA^{l-k}y = A^ly = 0$ and $y \in S_l$. This proves $S_l \supseteq S_{l+1}$ and hence $S_l = S_{l+1}$.
Therefore we have$$S_k = S_{k+1} = S_{k+2} = \dots$$so we get$$\text{rank}(A^k) = \text{rank}(A^{k+1}) = \text{rank}(A^{k+2}) = \dots.$$
$\tag*{$\square$}$
Lemma 2. Suppose $F$ is a field, $A \in M_n(F)$ is an $n \times n$ matrix with coefficients in $F$. If $A$ is nilpotent, then $A^n = 0$.
$($We remark that a good thing about Lemma 2 is that it transforms the question about finding all nilpotent elements in $M_n(F)$ into the question about solving finitely many questions.$)$
Proof. As mentioned in Lemma 1, we have the increasing sequence$$S_1 \subseteq S_2 \subseteq \dots \subseteq S_n \subseteq S_{n+1} \subseteq \dots$$and hence a decreasing sequence of natural numbers$$n \ge \text{rank}\,{A} \ge \text{rank}(A^2) \ge \dots \ge \text{rank}(A^n) \ge \text{rank}(A^{n+1}) \ge \dots \ge 0.$$If $A$ is nilpotent, then we must have $n> \text{rank}(A)$, because otherwise $A$ would be invertible and hence not nilpotent. Given this condition, we can see that there must be some $1 \le i \le n$ such that $$\text{rank}(A^i) = \text{rank}(A^{i+1})$$and hence by Lemma 1, for all $l \ge i$, $\text{rank}(A^l) = \text{rank}(A^i)$. Since $i \ge n$, in any case we will get $\text{rank}(A^n) = \text{rank}(A^l)$ for all $l \ge n$.
Since $A$ is nilpotent, there must be some $l \ge n$ such that $\text{rank}(A^l) = 0$, and hence $\text{rank}(A^n) = 0$ and hence $A^n = 0$. $\tag*{$\square$}$
1.
By our lemmas, a matrix $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \in M_2(\mathbb{R})$ is nilpotent if $A^2 = 0$, which is the case if and only if$$a^2 + bc = d^2 + bc = b(a+d) = c(a+d) = 0.$$So the set of nilpotent elements is$$\mathfrak{N}(M_2(\mathbb{R})) = \left\{\begin{pmatrix} a & b \\ c & -a \end{pmatrix}\Bigg|\text{ } a^2 + bc = 0,\text{ }a,b,c \in \mathbb{R}\right\}.$$
2.
Here $\mathbb{Z}/4\mathbb{Z}$ is not a field, so we can not apply our lemmas directly. However, notice that the quotient map$$\iota:\mathbb{Z}/4\mathbb{Z} \to \mathbb{Z}/2\mathbb{Z},\text{ }x\,\text{mod}\,4\mapsto x\,\text{mod}\,2$$induces a quotient map$$\pi: M_2(\mathbb{Z}/4\mathbb{Z}) \to M_2(\mathbb{Z}/2\mathbb{Z}),\begin{pmatrix} a & b \\ c & d \end{pmatrix} \mapsto \begin{pmatrix} \iota(a) & \iota(b) \\ \iota(c) & \iota(d) \end{pmatrix}.$$It is easy to check that $\pi$ is indeed a ring homomorphism.
Now suppose $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$ is a nilpotent element in $M_2(\mathbb{Z}/4\mathbb{Z})$, then $\pi(A) \in M_2(\mathbb{Z}/2\mathbb{Z})$ is also a nilpotent element. Notice that $\mathbb{Z}/2\mathbb{Z}$ is a field, so by Lemma 2, we can conclude that $\pi(A^2) = 0$ and hence $A^2 \in M_2(\mathbb{Z}/4\mathbb{Z})$ has every entry divisible by $2$.
Conversely, if $A \in M_2(\mathbb{Z}/2\mathbb{Z})$ such that $A^2$ has every entry divisible by $2$, then it is easy to see that $A^4$ has every entry divisible by $4$, and hence $A^4 = 0$, so $A$ is nilpotent.
Hence we proved that $$\mathfrak{N}(M_2(\mathbb{Z}/4\mathbb{Z})) = \{A \in M_2(\mathbb{Z}/4\mathbb{Z}): A^2 \text{ has every entry divisible by }2\}$$$$=\left\{A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \in M_2(\mathbb{Z}/4\mathbb{Z})\text{ } \Bigg|\text{ }2\mid a + d\text{ and }2\mid a^2 + bc\right\}.$$
Remark. Notice that when $R$ is noncommutative, $\mathfrak{N}(R)$ may not form an ideal in $R$. For example, let $$x = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix},\text{ }y = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} \in M_2(\mathbb{R})$$be nilpotent elements. Their sum $$x+y = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$$is not nilpotent.
