# Is $\operatorname{rank}(AQB)=\operatorname{rank}(AB)$ if $Q$ is non-singular?

$$\newcommand{\rank}{\operatorname{rank}}$$We know that $$\rank(PA)=\rank(AQ)=\rank(PAQ)=\rank(A)$$ where $$A\in M_{m\times n}(\mathbb F), P, Q$$ are $$m\times m, n\times n$$ invertible matrices.

mean to say , from the matrix product we can remove the non-singular matrices; rank will not be effected.

After studying this, it came to my mind, then what will happen in the case of $$\rank(PAQB)$$ where $$B\in M_{n\times m}(\mathbb F)$$ ?

No idea. The only thing I got is $$\rank(PAQB)=\rank(AQB)$$. Can we remove $$Q$$ as well and write $$\rank(AQB)=\rank(AB)$$?

No. Worse, the much weaker property of the product being zero is not preserved by insertion of a nonsingular matrix: If we take $$A = B = \pmatrix{0&1\\0&0}, \quad Q = \pmatrix{0&1\\1&0},$$ then $$AQB = A \neq 0$$ but $$AB = 0.$$
To give an example in the opposite direction of Travis's answer, consider $$A = B = \left[\begin{array}{cc} 1 & 0\\0 & 0\end{array}\right],\quad Q = \left[\begin{array}{cc} 0 & 1\\1 & 0\end{array}\right]$$
Then, $AB = A$ has rank $1$, but $AQB = 0$ has rank $0$. Geometrically, $A$ fixes $e_1$, and maps $e_2$ to $0$, and $Q$ interchanged $e_1$ and $e_2$, where $e_1 = \left[\begin{array}{c} 1\\0\end{array}\right], e_2 = \left[\begin{array}{c} 0\\1\end{array}\right]$ are the standard basis.