Right invertible and left zero divisor in matrix rings over a commutative ring

If a ring $R$ is commutative, I don't understand why if $A, B \in R^{n \times n}$, $AB=1$ means that $BA=1$, i.e., $R^{n \times n}$ is Dedekind finite.

Arguing with determinant seems to be wrong, although $\det(AB)=\det(BA ) =1$ but it necessarily doesn't mean that $BA =1$.

And is every left zero divisor also a right divisor ?


Lemma. Every surjective endomorphism $f : M \to M$ of a finitely generated $R$-module $M$ is an isomorphism.

Proof: $M$ becomes an $R[x]$-module, where $x$ acts by $f$. By assumption, $M=xM$. Nakayama's Lemma implies that there is some $p \in R[x]$ such that $(1-px)M=0$. This means $\mathrm{id}=p(f) f$. Hence, $f$ is injective. $\square$

Corollary: If $f,g$ are endomorphisms of a finitely generated $R$-module satisfying $fg=\mathrm{id}$, then also $gf=\mathrm{id}$.


I believe arguing with the determinant works, as $1 = A B$ implies $1 = \det(A B) = \det(A) \det(B)$, so $\det(A) \in R$ is invertible, and $A$ is.

PS I believe this argument is implicit in @YACP comment to the original post.


Here's a slightly different argument.

The poster's initial argument was by using determinants, which as said above, implies that both $\det(A), \det(B) \in R^\times.$ Hence, both matrices have bilateral inverses, i.e. $\operatorname{adj}(A^T) \det(A)^{-1}$ and resp. for $B$ - recall that the formula $$A\operatorname{adj}(A^T)= \operatorname{adj}(A^T)A= (\det A) I$$ is universal.

Now, for two maps (of sets) $f:S\to T$ and $g:T\to S$, if $f$ or $g$ is bijective and $fg=id_T$, then clearly $gf=id_S.$ This settles the first question.


Zero-divisor question: Suppose that $AB=0$ for $A, B \neq 0$ square matrices; then $\det(A) \det(B)=0.$ Will there be a square matrix $C\neq 0$ such that $CA=0$

If $\det(A)$ is a zero divisor (and by definition, non-zero), we're done, since for $0\neq b\in R$ satisfying $\det(A)b=0$, the matrix $C=\operatorname{adj}(A^T)b$ is by the above a zero-divisor on both sides!

The case I still haven't worked out is the following. If $\det(A)=0$ and $\operatorname{adj}(A^T)\neq 0$, then $C=\operatorname{adj}(A^T)$ satisfies $CA=AC=0$, but what if $\operatorname{adj}(A)=0$?

So, the case that remains (so far) is when $\operatorname{adj}(A)=0$, which is equivalent to the condition $\Lambda^{n-1}A=0$ (exterior product). We'll come back later.