A linear dispersion relation for the gyrotron operating at general

modes has been derived within the Maxwell-Vlasov system under the tenuous beam assumption. Unlike previous analyses, the dispersion equation accurately predicts the linear gain of the gyrotron on the entire range of wave frequency near the electron cyclotron instability. By careful choice of variables for the beam distribution both the instability driving and the stabilizing terms are obtained accurately. Not only is the dispersion equation valid for arbitrary beam distribution but it describes the negative mass instability as well. The explicit expression for the growth rate of the cold beam and its dependence on the wavenumber and the wall radius are examined. The optimization conditions on the wall radius, the beam center location (r
0), the radial mode number (

), and the azimuthal mode number (

) are also found. It is found that for a given harmonic number

, the negative mass in-Stability with

(i.e.,

) for a "rotating" beam whose guiding center coincides with the waveguide axis (i.e.,

), yields the highest linear gain, typically twice of that for

annular beam.