First observe that, if u, vare units in any ring S, then an element a ∈ S is von Neumann regular iff uav is. (To see this, it suffices to provethe “only if” part. Suppose a = asa for some s ∈ S; we call any such s a “pseudo-inverse”of a. To find a pseudo-inverse t for uav, we need to solvethe equation: uav = (uav)t(uav). This amounts to a= a(vtu)a, so it suffices to choose t = v−1su−1,and all pseudo-inverses for uav arise in this way.) Applying this remarkto Mn(R), it follows that, for U, V , A,UAV is von Neumann regular (since A = A2 = A3is). Conversely, let B be any von Neumann regular element in Mn(R).By the Smith Normal Form Theorem, there exist P, Q ∈ GLn(R) such that PBQ = diag(b1, . . . , bn),where bi+1 ∈ biR for each i < n. By the remark above,diag(b1, . . . , bn) is von Neumann regular. Thus, upon interpretingMn(R) as EndR(Rn), im(diag(b1,. . . , bn)) = b1R⊕· · ·⊕bnR ⊆ Rn must be a direct summand of Rn. Thisis possible only if each biR is either 0 or R. Sincethe “elementary divisors” bi are determined up to units anyway, we mayassume that
diag(b1, . . . , bn) =diag(1, . . . , 1, 0, . . . , 0) := A,
and so B = UAV for U= P−1 and V = Q−1in GLn(R).