The lateral shift of a ray refracted through a parallel-sided glass slab is given by the formula:
This formula can be derived from the geometry of refraction. The ray undergoes refraction at both the entry and exit surfaces of the glass slab, and the lateral shift corresponds to the displacement of the ray after passing through the slab.
Since the ray travels a distance in the slab, the shift depends on the angles of incidence and refraction .
Thus, the correct option is option (4).