For $M$ and $N$ two invertible square matrices of the same size $n$, consider the equation $$ \forall i,j, \quad M_{ij}(M^{-1})_{ji} = N_{ij}(N^{-1})_{ji}\ . $$ Assuming we know $M$, we want to find all matrices $N$ that obey this equation. Obvious solutions are $$ N_{ij} = \lambda_i \mu_j M_{ij}\ , \\ N_{ij} = \lambda_i \mu_j (M^{-1})_{ji}\ , $$ for arbitrary vectors $\lambda_i$ and $\mu_j$.

But what are all the solutions?

4more comments