For $n\times n$ matrices, is it true that $AB=CD\implies AEB=CED$? 
If $A,B,C,D,E$ are $n\times n$ matrices, does $AB=CD$ imply $AEB=CED$?

I only know that $AB=CD \implies ABE=CDE$, but I don't see how you can sandwhich $E$ within it.

Also, if $AB=CD=0$, does $\det(AB)=\det(CD)=0$?

I think this should be true because $AB$ and $CD$ are the same matrices and $\det(0)=0$
 A: Let $A$ and $D$ be the identity matrix.  Does $B=C$ imply $EB=CE$?
A: The first question is not true as the following counterexample shows:
$$ A = B = \begin{bmatrix}
0 & 1\\
0 & 0 \end{bmatrix}  \\
C = D = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\\ E = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$$
We get
$$ AB = 0 = CD$$
but
$$AEB = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}\\
CED = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}$$
A: The "sandwich" statement doesn't generally hold.  For example, take
$$
A = B = I = \pmatrix{1&0\\0&1}, \quad 
C = D = \pmatrix{0&1\\1&0}
$$
Verify that $AB = CD$.  However, if we take
$$
E = \pmatrix{1&0\\0&0}
$$
we find that $AEB \neq CED$
A: $A= \begin{bmatrix}
1 &0 \\ 
 0& 0
\end{bmatrix}$ 
,$B= \begin{bmatrix}
0 &0 \\ 
 0& 1
\end{bmatrix}$ ,$C=D=0$ ,$E= \begin{bmatrix}
1 &2 \\ 
 4& 3
\end{bmatrix}$.
 then that following equality is not true.
A: I don't think this works by sandwiching.....
$$A=\begin{pmatrix}
        1 & 3  \\
        0 & 1  \\
        \end{pmatrix},
B=\begin{pmatrix}
        1 & 2  \\
        0 & 1  \\
        \end{pmatrix},
C=\begin{pmatrix}
        1 & 1  \\
        0 & 1  \\
        \end{pmatrix},
D=\begin{pmatrix}
        1 & 4  \\
        0 & 1  \\
        \end{pmatrix},$$
Then we have that $AB=CD$ by matrix multiplication, however if
$$E=\begin{pmatrix}
        1 & 1  \\
        1 & 1  \\
        \end{pmatrix}$$
Then $AEB=\begin{pmatrix} 4 & 12\\ 1 & 3 \\ \end{pmatrix}\neq \begin{pmatrix} 2 & 10\\ 1 & 5 \\ \end{pmatrix}=CED$.
A: The first statement is only true if $E$ commutes with $B$ and with $D$ or if $E$ commutes with $A$ and with $C$
