We provide some mathematical tool to analyze the possible theoretical structure of Hamiltonian reconstructed from von Neumann or Heisenberg’s equation for a finite-dimensional quantum system. To this end, we give an explicit polynomial representation for the general solution of the matrix equation AX−XA=C together with some (also polynomial) solvability conditions when A and C are some complex square matrices of the same size and the matrix A is semisimple. When the matrix A is normal, we derive a polynomial existence condition for Hermitian solutions and a similar formula for all solutions of this type.