From Maxwell's equations for electromagnetic fields, time-averaged energy n
ow density vector of stable monochromatic linearly polarized light in an is
otropic insulative nonmagnetic medium is deduced. By the introduction of ti
me-averaged energy new density rays and the definition of new generalized r
efractive index n(G1), Fermat's principle of geometric optics is further ge
neralized and its application conditions are discussed. The generalized Fer
mat's principle can be used to describe stable transmission of light in a m
edium with variable refractive index. The necessary and sufficient conditio
ns of a nondivergent and nonfocusing light beam are derived from this Ferma
t's principle.