Two exact expressions are derived for the effective mode indices of dielectric slab waveguides with complex refractive indices. One is for TE modes, the other for TM modes. The identities are valid for any guided mode of any dielectric slab waveguide and can be successfully employed to check the accuracy of mode solvers. They explain why TE gain can be much greater than TM gain even when the confinement factors are comparable. Also, it is shown that an often used approximation for the TM gain is unreliable under practical conditions. A correct approximation is given.