I have a statement which I don't know how to prove. All matrices are real, $n \times n$.
For all $0 < k < n$ the following has to hold.
It is impossible do define a matrix $A$ of rank $\mathbf{k}$ such that the following holds.
$\forall M_1, M_2. A M_1 M_2 = A M_1 A M_2 $
Any hints greatly appreciated.
In case this is (as I suspect) part of a larger body of work which I am not aware of, I would appreciate if you gave me a pointer.
In case my statement is false, I would like a characterization of admissible $A$s given $k$.
If $A$ is a such matrix then $A=0$:
Proof: Lat $A$ such that $AM_1M_2=AM_1AM_2$ for all $M_1,M_2$:
In particular (for $M_1=M_2=I_n$) we obtain $A=A^2$, hence the polynomial $X^2-X=X(X-1)$ is annihilator of $A$, and it follow that $A$ is diagonalizable. we denote $D=\text{diag}(\lambda_1\ldots,\lambda_n)$, then $A=P^{-1}DP$ for some invertible matrix $P$ and $\lambda_i$ the eigenvalues of $A$ , it is clear that $\lambda_i\in \{0,1\}$ for all $i$. In the equation we can omit $M_2$ (by $M_2=I_n$), now we obtain $AM=AMA$ for all $M$, so $P^{-1}DPM=P^{-1}DPMP^{-1}DP$ for all $M$. also $D(PMP^{-1})=D(PMP^{-1})D$ for all $M$.
We know that the map $M\mapsto P^{-1}MP$ is bijective: now we obtain that $DM=DMD$ for all $M$. If we denote $M=(a_{i,j})$, the last equation is equivalent to $\lambda_ia_{i,j}=\lambda_i\lambda_ja_{i,j}$ that is $\lambda_ia_{i,j}(1-\lambda_j)=0$, since $D$ is not invertible ($A$ is not invertible $\text{rank}(A)<n$ ) there is $j_0$ such that $\lambda_{j_0}=0$, by taking $a_{i,j}=1$ for all $i,j$ we obtain $\lambda_i(1-\lambda_{j_0})=0$ for all $i$ , that is $\lambda_i=0$ for all $i$, Then $D=0$, it follow that $A=0$.