Ehrlich's Characterization of Unit Regular Elements I recently came across the following characterization of unit regular elements of an endomorphism ring (Corollary to Theorem 1 in this article).

Let $M$ be a vector space over the division ring $D$, and let $R = \text{End}(M)$. If $a \in R$, then $a$ is unit regular if and only if $\text{dim}(\ker a) = \text{dim}(\text{coker}\, a)$

Is Ehrlich implicity assuming that the dimension of $M$ is countable and the dimensions of the kernel and cokernel are finite, or is there an example of a unit regular endomorphism with infinite kernel or cokernel?
 A: The claim is making no assumptions on the dimensions of $M$, $\ker(a)$, or $\operatorname{coker}(a)$. Notice in Theorem 1 of the paper that unit-regularity of the endomorphism $a$ is equivalent to its kernel and cokernel being isomorphic. That statement in the corollary then reduces to the observation that two subspaces of a vector space are isomorphic if and only if they have the same dimension (viewed as a cardinal, possibly infinite, not necessarily countable).
A: Manny's answer is absolutely correct.  I wanted to add that Ehrlich's argument, which in its original formulation requires the endomorphism ring to be von Neumann regular, actually characterizes unit-regular elements in the endomorphism ring of arbitrary modules, as noted by T. Y. Lam and others (in numerous places, but perhaps most prominently in his "Exercises in Classical Ring Theory" book).  The characterization is as follows:
Let $k$ be a ring, let $M_k$ be any right $k$-module, and let $R={\rm End}(M_k)$.
An element $a\in R$ is (von Neumann) regular if and only if ${\rm ker}(a)$ and ${\rm im}(a)$ are direct summands of $M$.  Moreover, in this case, $a$ is unit-regular if and only if ${\rm ker}(a)\cong {\rm coker}(a)$.
