Given $A\in Mat_{n\times n}(R)$ where $R$ is a non-commutative associative ring are there exist any (non-zero) matrices $X, Y\in Mat_{n\times n}(R)$ such that $XAY=diag(a_1, \ldots , a_n)$ for some $a_i$? The interesting answer for me is if $A=(x_{i,j})$ and $R=\mathbb Z [x_{i,j}]$ (free associative non-commutative algebra on $x_{i,j}$ over $\mathbb Z$).
For example if $R$ is commutative then we put $X=Id$, $Y=(det(A_{i,j}))$ and get $XAY=det A\cdot Id$. What about non-commutative polynomials?
Upd1: I want to have a non-commutative polynomial equality. Also I want $X$ and $Y$ to be in general invertible.
Upd2: Ok, I've understood that Update1 wasn't correct. I'm interested in having such matrices over $R=Mat_{m\times m}(A)$ where $A$ is a commutative ring with $1$.