rank of product of matrices I need your help for the following question:
Do we have rank(AB)=rank(ADB), where D is a diagonal positive definite  matrix, and the products are well defined?
Many thanks!
 A: My initial belief was "this must be true!" so I set out to prove it. Turned out I was wrong. I love being surprised this way.
Let's look at $A=\left(\array{1&-1/2\\1&-1/2}\right)$, and $B=\left(\array{1&1\\1&1}\right)$, both having rank 1, as well as their product $AB=\left(\array{1/2&1/2\\1/2&1/2}\right)$. Now plug $D=\left(\array{1&0\\0&2}\right)$ between them and you end up with $ADB$ being the null matrix with rank zero.
A: Ok since we already have a counter example here's my attempt to explain:
First we write singular value decompositions of $\bf A$ and $\bf B$, all in all we can write:
$$A = {\bf V_AE_AW_A}^T, B = {\bf V_BE_BW_B}^T$$
$$AB = {\bf V_A(E_AW_A}^T{\bf V_BE_BW_B}^T)$$
$$ADB = {\bf V_A(E_AW_A}^T{\bf D}{\bf V_BE_BW_B}^T)$$
Now if we multiply this together we will find the elements to be linear in terms of diagonal elements of $\bf D$. This should be possible to use to make rows which aren't linearly dependent in $\bf AB$ to become linearly dependent. To make two rows parallell to each other should require max as many parameters as the side of the matrix, which is exactly what we've got.
