Io is the intensity entering the sample at z=0, Iz is the intensity entering the infinitesimal slab at z, dI is the intensity absorbed in the slab, and I is the intensity of light leaving the sample. Then, the total opaque area on the slab due to the absorbers is * N * A * dz. Then, the fraction of photons absorbed will be * N * A * dz / A so,