# $AB=z \mathrm{Id}_n$ implies $z^m BA = z^{m+1} \mathrm{Id}_n$ for what $m$?

This question builds on a series of questions looking for elementary proofs that $AB=\mathrm{Id}$ implies $BA=\mathrm{Id}$, for $A$ and $B$ both $n \times n$ matrices over a commutative ring. First the question, then motivation, then a small bit of progress.

Let $R$ be a commutative ring. Let $A$ and $B$ be $n \times n$ matrices with entries in $R$ satisfying $AB=z \mathrm{Id}_n$ for some $z \in R$. We cannot conclude that $BA = z \mathrm{Id}_n$: Take $R=\mathbb{Z}$, $z=0$, $A = \left( \begin{smallmatrix} 0 & 1 \\ 0 & 0 \end{smallmatrix} \right)$ and $B = \left( \begin{smallmatrix} 1 & 0 \\ 0 & 0 \end{smallmatrix} \right)$. However, we can conclude $z^n BA = z^{n+1} \mathrm{Id}$ (proof below).

What is the smallest $m$ (as a function of $n$) for which we can conclude $z^m BA = z^{m+1} \mathrm{Id}$?

Motivation Suppose that we can do this for some particular $m$ and $n$. Let $k[a,b,z]$ be the polynomial ring in $2n^2+1$ variables, $a_{ij}$, $b_{ij}$ and $z$ (over some field $k$). Let $S$ be the quotient of $k[a,b,z]$ by the $n^2$ relations gotten by expanding the matrix product $AB=z \mathrm{Id}_n$.

Since this question is framed for an arbitrary commutative ring, it applies in particular to $S$. So, if the answer is "yes" for some $(m,n)$, then the entries of $z^m BA - z^{m+1} \mathrm{Id}_n$ are zero in $S$. In other words, they lie in the ideal of $k[a,b,z]$ generated by the entries of $AB-z \mathrm{Id}_n$. I.e. we must have polynomial relations $$z^m \left( \sum_r B_{ir} A_{rj} - z \delta_{ij} \right) = \sum_{k, \ell} P_{ij}^{k \ell}(a, b, z) \left( \sum_s A_{ks} A_{s\ell} - z \delta_{k \ell} \right) \quad (\ast)$$ for some polynomials $P_{ij}^{k \ell}(a, b, z)$.

Put a grading on $k[a,b,z]$, where $\deg a_{ij} = \deg b_{ij}=1$ and $\deg z=2$. Then we may assume that the $P_{ij}^{k \ell}$ have degree $m$. Plugging in $z=1$ to $(\ast)$, we get a high school algebra proof that $AB=\mathrm{Id}_n$ implies $BA = \mathrm{Id}_n$ involving polynomials of degree $\leq m$.

Conversely, if we have a proof that $AB=\mathrm{Id}_n$ implies $BA = \mathrm{Id}_n$ by pure high school algebra (adding, multiplying and dividing polynomials and substituting in the equations $AB = \mathrm{Id}_n$) then we can take every formula in that proof in replace each $1$ by an appropriate power of $z$ to make the equations homogenous. The result will be a proof of $(\ast)$ for some $m$ and, again, the size of $m$ is a measure of the complexity of the proof.

Minor progress It is good enough to take $m=n$. Proof: simplify $(\det B) \mathrm{Ad}(A) A B A$ in two ways. One way gives $$(\det B) {\Big (} \mathrm{Ad}(A) A {\Big )} B A = (\det B) (\det A) BA = (\det A) ( \det B) BA = \det(AB) BA = z^n BA$$ the other gives $$(\det B) \mathrm{Ad}(A) {\Big (} A B {\Big )} A =(\det B) \mathrm{Ad}(A) z A = z (\det B) (\det A) = z \det(AB) = z^{n+1}.$$

When $n=1$, we can take $m=0$, as $R$ is commutative. For $n=2$, the above example of $z=0$, $A = \left( \begin{smallmatrix} 0 & 1 \\ 0 & 0 \end{smallmatrix} \right)$ and $B = \left( \begin{smallmatrix} 1 & 0 \\ 0 & 0 \end{smallmatrix} \right)$ shows we need $m \geq 1$ and it is easy to adapt this to show that we need $m \geq 1$ for any $n \geq 1$.

This is all I know! I don't even have an example to show that $m \geq 2$ is necessary for any $n$, although my gut says $m$ should grow linearly with $n$.

• Dear David: Could you tell me what $k$ is? – Pierre-Yves Gaillard Aug 6 '14 at 17:02
• @Pierre-YvesGaillard Some field. (Edited to add) – David E Speyer Aug 6 '14 at 19:42
• $\newcommand\adj{\operatorname{adj}}$ Actually, you can always get by with $m = n-1$. Indeed, $AB = zI_n$ yields $\adj\left(AB\right) = \adj\left(zI_n\right) = z^{n-1} I_n$, so that $z^{n-1} I_n = \adj\left(AB\right) = \adj B \cdot \adj A$ and thus $z^{n-1} BA = B \underbrace{\left(z^{n-1} I_n\right)}_{= \adj B \cdot \adj A} A = \underbrace{B \adj B}_{= \left(\det B\right) I_n} \underbrace{A \adj A}_{= \left(\det A\right) I_n} = \left(\det B\right) I_n \left(\det A\right) I_n = \underbrace{\det A \cdot \det B}_{=\det\left(AB\right) = \det\left(zI_n\right) = z^n} \cdot I_n = z^n I_n$. – darij grinberg Aug 6 '14 at 21:29
• For $n = 3$, the bound $m = 2$ is optimal. For $n = 4$, the bound $m = 3$ is optimal. This is all my stupid Sage code can do. I am saying "stupid" since it uses Gröbner bases, which explode badly in high dimensions. A smarter approach would start by observing that the requirements are homogeneous polynomial equations if the entries of $A$ and $B$ are given degree $1$ and $z$ is given degree $2$. – darij grinberg Aug 6 '14 at 21:36
• Here's an observation which restates the problem in a fairly simple form. Notice that $(BA)^{2} = z(BA),$ and notice that if $X^{2} = zX,$ it follows by induction that $(X-zI)^{r} = z^{r-1}X - z^{r}I$ for each positive integer $r.$ Hence the question asks for the least positive integer $m$ such that $(BA-zI)^{m+1} = 0.$ – Geoff Robinson Aug 8 '14 at 22:47

Just some considerations:

Suppose $AB=zI_n$. If $z=0$, then $zBA=0=z^2I_n$, so $m=1$ is ok.

If $z\neq 0$ is not a zero divisor, consider the multiplicatively closed set $S_z:=\{z^n, n\in\mathbb{N}\}$. Since $z$ is not a zero divisor, we have an injection of $R$ in $S_z^{-1}R$, and then we can see the relation $AB=zI_n$ in this bigger ring. We have then $$\left(\frac{1}{z}A\right)B=I$$ hence $$B\left(\frac{1}{z}A\right)=I_n,$$and finally $$BA=zI_n,$$ that means $m=0$ is ok. If $z$ is nilpotent, we have $z^m=0$ for some $m\geq 2$. Then, $$0=z^mBA=z^{m+1}I$$ The argument above fail if $R$ is not commutative, cause in general $AB=I$ doesn't imply $BA=I$ (ring that satisfies this condition are called stable finite, it would be interesting to understand if the localization of a stable finite ring si still stable finite).

Comment posted as a community wiki answer.

I'll describe below how I understand David's question, but I suspect that my understanding is incorrect, and would be most grateful to whoever would try to explain to me what I'm missing.

Let $$R:=\mathbb Z[(A_{ij}),(B_{ij}),Z]$$ be the polynomial ring over $\mathbb Z$ in $2n^2+1$ variables, $A_{ij}$, $B_{ij}$ and $Z$.

David shows that there is a least $m=m_n\le n$ such that there exists a family of polynomials $P_{ij}^{k \ell}$ in $R$ satisfying $$Z^m \left( \sum_r B_{ir} A_{rj} - Z \delta_{ij} \right) = \sum_{k, \ell}\left( \sum_s A_{ks} A_{s\ell} - Z \delta_{k \ell} \right)P_{ij}^{k \ell}.$$ Put a grading on $R$, where $\deg A_{ij} = \deg B_{ij}=1$ and $\deg Z=2$. Then we may assume that the $P_{ij}^{k \ell}$ are homogeneous of degree $m$.

Is it possible to compute $m=m_n$ explicitly?

Is it possible to write down explicitly, for all $n$, a family of polynomials $P_{ij}^{k \ell}$ satisfying the above conditions?