# If there exists $E$ and $F$ square matrices such that $EA=B$ and $FB=A$, then there exists invertible matrix $G$ such that $GA=B$?

there exists $$E$$ and $$F$$ square matrices such that $$EA=B$$ and $$FB=A$$, then there exists invertible matrix $$G$$ such that $$GA=B$$?

I'm needing a way too detailed proof or a simple counter-example, 'cos I'm feeling so upset for not being able to prove this after a long try and I feel like this can't be done right without a detailed proof.

Let $$V = \text{Ran}(A)$$, the range (column space) of $$A$$, and $$W = \text{Ran}(B)$$. Thus $$E$$ maps $$V$$ onto $$W$$ and $$F$$ maps $$W$$ onto $$V$$, and $$E F$$ is the identity map on $$W$$. Let $$G = E$$ on $$V$$, and let it map the orthogonal complement of $$V$$ to the orthogonal complement of $$W$$.

EDIT: To address your comment, the matrix is the matrix of a linear transformation. To be more explicit, take a basis $$v_i$$ of $$\mathbb R^n$$ (if $$A$$ and $$B$$ are $$n \times m$$ matrices) such that the first $$k = \text{rank}(A)$$ elements are in $$V$$, and another basis $$w_i$$ of $$\mathbb R^n$$ whose first $$k$$ elements are in $$W$$. We want $$G v_i = E v_i$$ for $$i \le k$$ and $$G v_i = w_i$$ for $$i > k$$.

• Where is the matrix? You defined a function only and I am felling like that your map just make GA=BV for some V. May 15, 2020 at 21:29
• I filled out the details of the proof and what you said worked. =) May 16, 2020 at 0:53

It's not hard to come across the same question again and again. Filling up the details of Robert answer would be of great help for everyone, and me for sure. Let us suppose that $$A$$ and $$B$$ have dimention $$n \times m$$, as suggested by Robert.

Let us define the linear transformation $$T:\text{Im}(A) \rightarrow \mathbb{R}^n$$ such that $$T(x)=Ex$$ for all $$x\in \text{Im}(A)$$. First, note that $$\text{Im}(T) \subset \text{Im}(B)$$, since $$EA=B$$. Furthermore, $$T$$ is injective, since $$FEA=A$$, which means that $$T$$ has a left inverse given by $$F$$. Hence, thanks to Rank–nullity theorem, $$T$$ is a one-to-one correspondence between $$\text{Im}(A)$$ and $$\text{Im}(B)$$.

Define a new bijection $$W: \text{Kern}(A^{T}) \rightarrow \text{Kern}(B^T)$$, which exists because the dimenstions are the same, once $$\text{Kern}(A^{T})$$ is the orthogonal complement of the $$\text{Im}(A)$$ and $$\text{dim}(\text{Im}(A))= \text{dim}(\text{Im}(B))$$. Note that, since the sum $$\mathbb{R}^m=\text{Kern}(A^T) + \text{Im}(A)$$ is a direct sum, is possible to define the linear transformation given by $$H:\mathbb{R}^n \rightarrow \mathbb{R}^n$$ such that $$H(u+v)=T(u)+W(v)$$, with $$u \in \text{Im} (A)$$ e $$v \in \text{Kern} (A^T)$$. We can prove that $$H$$ is a bijection as a direct sum of bijective linear operators.

Lastly, taking $$G$$ as the matrix of $$H$$ in the canonical basis, $$G$$ is invertible. Now, since $$H(u)=T(u)= E u$$ for all $$u \in \text{Im}(A)$$, we have that $$G A = E A = B.$$