For any non-zero $A\in M_{m.n}(R)$, the *inner rank* of $A$ is defined as the least positive integer $r$ such that there are matrices $P\in M_{m,r}(R)$, $Q\in M_{r,n}(R)$ satisfying $A=PQ$. It's not difficult to see this definition coincides with the usual rank if $R=\mathbb{C}$. And when $R$ is some non-commutative ring, this notion also behaves "like" a rank. You can look its many nice properties in Section 5.4 in Cohn's book: *Free ideal rings and localization in general rings*, Cambridge University Press, 2006. I hope it can help you.