  An analytical and numerical study is presented of transmission of radiation
through a multi-mode waveguide containing a random medium with a complex
dielectric constant $\epsilon= \epsilon'+i\epsilon''$. Depending on the sign of
$\epsilon''$, the medium is absorbing or amplifying. The transmitted intensity
decays exponentially $\propto\exp(-L/\xi)$ as the waveguide length
$L\to\infty$, regardless of the sign of $\epsilon''$. The localization length
$\xi$ is computed as a function of the mean free path $l$, the absorption or
amplification length $|\sigma|^{-1}$, and the number of modes in the waveguide
$N$. The method used is an extension of the Fokker-Planck approach of Dorokhov,
Mello, Pereyra, and Kumar to non-unitary scattering matrices. Asymptotically
exact results are obtained for $N\gg1$ and $|\sigma|\gg1/N^2l$. An approximate
interpolation formula for all $\sigma$ agrees reasonably well with numerical
simulations.
