TITLE: When is $(BA)^\dagger\neq A^\dagger B^\dagger$ for the Moore Penrose inverse?
QUESTION [6 upvotes]: I wanted to find real matrices $A$ and $B$ such that:$$(BA)^\dagger\neq A^\dagger B^\dagger$$
whereas $A^\dagger$ denotes the Moore-Penrose pseudoinverse of a matrix.
I tried some things and ended up with:
$$
B = \begin{pmatrix} 0 & 0\\ 1 & 2\end{pmatrix} , A=\begin{pmatrix} 1 & 0 \\ 0 & 0\end{pmatrix}
$$
for these matrices I get $$A^\dagger=\begin{pmatrix} 1 & 0\\ 0 & 0\end{pmatrix}, B^\dagger = \begin{pmatrix} 0 & \frac 15 \\ 0 & \frac 25\end{pmatrix}, A^\dagger B^\dagger = \begin{pmatrix} 0 & \frac 15 \\ 0 & 0\end{pmatrix}$$
but 
$$(BA)^\dagger=\begin{pmatrix}0 & 1\\ 0 & 0\end{pmatrix}$$
so these two are obviously not equal. I found on Wikipedia that the equality stated above holds, when for example $B$ or $A$ has orthonormal columns or rows.
What I am trying to find out here is: Is there a criterion such that the equality does $\bf not$ hold? When trying to find such matrices I just stumbled upon these by accident, say I just picked random matrices which did not fulfill the requirements that the equality automatically holds.
Any help is greatly appreciated!

REPLY [4 votes]: Obviously, you need at least one of your matrices to be not invertible.
So let's try it for $2 \times 2$ matrices where $A$ is not invertible but $B$ is.  Thus $A$ is of the form $v w^T$ where $v$ and $w$ are column vectors, which I'll suppose are nonzero.  It turns out that
$$A^\dagger = \frac{w v^T}{ (v^T v) (w^T w)}$$
so that
$$ A^\dagger B^\dagger = \frac{w v^T B^{-1}}{(v^T v) (w^T w)} $$
while $B A = (B v) w^T$ so
$$ (B A)^\dagger = \frac{w v^T B^T}{((Bv)^T B v) (w^T w)}$$
Thus the columns of both $A^\dagger B^\dagger$ and $(BA)^\dagger$ are
scalar multiples of $w$, but the rows are in the one case multiples of 
$v^T B^{-1} = ((B^{-1})^T v)^T$, and in the other case multiples of $v^T B^T = (B v)^T$.  If $(B^{-1})^T$ is not a scalar multiple of $B$, then for almost all $v$ these vectors are not scalar multiples of each other and  we will have $A^\dagger B^\dagger \ne (BA)^\dagger$.