A formalism for the construction of energy principles for dissipative systems is presented. It is shown that dissipative systems satisfy a conservation law for the bilinear Hamiltonian provided the Lagrangian is time invariant. The energy on the other hand, differs from the Hamiltonian by being quadratic and by having a negative definite time derivative (positive power dissipation). The energy is a Lyapunov functional whose definiteness yields necessary and sufficient stability criteria. The stability problem of resistive magnetohydrodynamic (MHD) is addressed: the energy principle for ideal MHD is generalized and the stability criterion by Tasso [Phys. Lett. 147, 28 (1990)] is shown to be necessary in addition to sufficient for real growth rates. An energy principle is found for the inner layer equations that yields the resistive stability criterion D-R<0 in the incompressible limit, whereas the tearing mode criterion Delta'<0 is shown to result from the conservation law of the bilinear concomitant in the resistive layer. (C) 1997 American Institute of Physics.