  We consider theoretically the optomechanical interaction of several
mechanical modes with a single quantized cavity field mode for linear and
quadratic coupling. We focus specifically on situations where the optical
dissipation is the dominant source of damping, in which case the optical field
can be adiabatically eliminated, resulting in effective multimode interactions
between the mechanical modes. In the case of linear coupling, the coherent
contribution to the interaction can be exploited e.g. in quantum state swapping
protocols, while the incoherent part leads to significant modifications of cold
damping or amplification from the single-mode situation. Quadratic coupling can
result in a wealth of possible effective interactions including the analogs of
second-harmonic generation and four-wave mixing in nonlinear optics, with
specific forms depending sensitively on the sign of the coupling. The
cavity-mediated mechanical interaction of two modes is investigated in two
limiting cases, the resolved sideband and the Doppler regime. As an
illustrative application of the formal analysis we discuss in some detail a
two-mode system where a Bose-Einstein condensate is optomechanically linearly
coupled to the moving end mirror of a Fabry-P\'erot cavity.
