A method is proposed for discussing the linear stability of the stationary states of a Lagrangian system by considering the marginally stable modes. A necessary and sufficient condition for marginal stability is derived. Perturbation theory is used to compute the change in frequency of a marginally stable mode as a result of a small change in the system. It is then possible to determine the changes of stability of a system depending continuously on one parameter. The method is of practical interest as it enables one to discuss stability by considering only normal modes for real values of the frequency. It reduces to Poincaré's method of forms of bifurcation in the particular case of equilibria, for which the square of the frequency of a normal mode is always real.