Fermat’s principle is a fundamental concept in optics that describes how light travels through different mediums. It states that light follows the path between two points that requires the least time, not necessarily the shortest physical distance. According to Fermat’s principle, light rays bend or change direction when transitioning between mediums with different optical densities, such as air and glass, to minimize the time taken to travel from one point to another. This principle underlies the foundation of geometrical optics and the behavior of light refraction, guiding the understanding of phenomena like the bending of light in lenses, the formation of images, and the principles behind optical devices such as lenses and prisms.