  In this paper, we study the determination of Hamiltonian from a given
equations of motion. It can be cast into a problem of matrix factorization
after reinterpretation of the system as first order evolutionary equations in
the phase space coordinates. We state the criterion on the evolution matrix for
a Hamiltonian to exist. In addition, the proof is constructive and an explicit
Hamiltonian with accompanied symplectic structure can be obtained. As an
application, we will study a class of PT-symmetric systems for illustration.
