Linear systems of differential equations with an invariant in the form of a positive definite quadratic form in a real Hilbert space are considered. It is assumed that the system has a simple spectrum and the eigenvectors form a complete orthonormal system. Under these assumptions, the linear system can be represented in the form of the Schrödinger equation by introducing a suitable complex structure. As an example, we present such a representation for the Maxwell equations without currents. In view of these observations, the dynamics defined by some linear partial differential equations can be treated in terms of the basic principles and methods of quantum mechanics.