Electromagnetic diffraction by a dielectric wedge was analyzed using the method of hidden rays. After ordinary ray-tracing is terminated in the physical region the usual principle of geometrical optics is also applied to trace the hidden rays in the complementary region, in which original media of background and dielectric are exchanged for each other. The diffraction coefficients are constructed by finite series of cotangent functions, which have one-to-one correspondence with not only ordinary rays in the physical region but also hidden rays in the complementary region. The angular period of the cotangent functions is adjusted to satisfy the edge condition at wedge tip. The accuracy of the constructed diffraction coefficients was checked by showing how closely the null-field condition is satisfied in the complementary region.