The law was discovered by Pierre Bouguer before 1729, while looking at red wine, during a brief vacation in Alentejo, Portugal. It is often attributed to Johann Heinrich Lambert, who cited Bouguer's Essai d'optique sur la gradation de la lumière (Claude Jombert, Paris, 1729)--and even quoted from it--in his Photometria in 1760. Lambert's law stated that the loss of light intensity when it propagates in a medium is directly proportional to intensity and path length. Much later, August Beer discovered another attenuation relation in 1852. Beer's law stated that the transmittance of a solution remains constant if the product of concentration and path length stays constant. The modern derivation of the Beer-Lambert law combines the two laws and correlates the absorbance, which is the negative decadic logarithm of the transmittance, to both the concentrations of the attenuating species and the thickness of the material sample.
A common and practical expression of the Beer-Lambert law relates the optical attenuation of a physical material containing a single attenuating species of uniform concentration to the optical path length through the sample and absorptivity of the species. This expression is:
The law tends to break down at very high concentrations, especially if the material is highly scattering. Absorbance within range of 0.2 to 0.5 is ideal to maintain linearity in the Beer-Lambart law. If the radiation is especially intense, nonlinear optical processes can also cause variances. The main reason, however, is that the concentration dependence is in general non-linear and Beer's law is valid only under certain conditions as shown by derivation below. For strong oscillators and at high concentrations the deviations are stronger. If the molecules are closer to each other interactions can set in. These interactions can be roughly divided into physical and chemical interactions. Physical interaction do not alter the polarizability of the molecules as long as the interaction is not so strong that light and molecular quantum state intermix (strong coupling), but cause the attenuation cross sections to be non-additive via electromagnetic coupling. Chemical interactions in contrast change the polarizability and thus absorption.
Expression with attenuation coefficient
The Beer-Lambert law can be expressed in terms of attenuation coefficient, but in this case is better called Lambert's law since amount concentration, from Beer's law, is hidden inside the attenuation coefficient. The (Napierian) attenuation coefficient and the decadic attenuation coefficient of a material sample are related to its number densities and amount concentrations as
respectively, by definition of attenuation cross section and molar attenuation coefficient. Then the Beer-Lambert law becomes
In case of uniform attenuation, these relations become
In many cases, the attenuation coefficient does not vary with , in which case one does not have to perform an integral and can express the law as:
where the attenuation is usually an addition of absorption coefficient (creation of electron-hole pairs) or scattering (for example Rayleigh scattering if the scattering centers are much smaller than the incident wavelength). Also note that for some systems we can put (1 over inelastic mean free path) in place of .
Assume that a beam of light enters a material sample. Define z as an axis parallel to the direction of the beam. Divide the material sample into thin slices, perpendicular to the beam of light, with thickness dz sufficiently small that one particle in a slice cannot obscure another particle in the same slice when viewed along the z direction. The radiant flux of the light that emerges from a slice is reduced, compared to that of the light that entered, by , where ? is the (Napierian) attenuation coefficient, which yields the following first-order linear ODE:
The attenuation is caused by the photons that did not make it to the other side of the slice because of scattering or absorption. The solution to this differential equation is obtained by multiplying the integrating factor
throughout to obtain
which simplifies due to the product rule (applied backwards) to
Integrating both sides and solving for ?e for a material of real thickness l, with the incident radiant flux upon the slice and the transmitted radiant flux gives
Since the decadic attenuation coefficient ?10 is related to the (Napierian) attenuation coefficient by , one also have
To describe the attenuation coefficient in a way independent of the number densitiesni of the N attenuating species of the material sample, one introduces the attenuation cross section . ?i has the dimension of an area; it expresses the likelihood of interaction between the particles of the beam and the particles of the specie i in the material sample:
The above assumption that the attenuation cross sections are additive is generally incorrect since electromagnetic coupling occurs if the distances between the absorbing entities is small. 
The derivation of the concentration dependence of the absorbance is based on electromagnetic theory. Accordingly, the macroscopic polarization of a medium derives from the microscopic dipole moments in the absence of interaction according to
where is the dipole moment and the number of absorbing entities per unit volume. On the other hand, macroscopic polarization is given by:
Here represents the relative dielectric function, the vacuum permittivity and the electric field. After equating and solving for the relative dielectric function the result is:
If we take into account that the polarizability is defined by and that for the number of absorbers per unit volume holds, it follows that:
According to Maxwell's wave equation the following relation between the complex dielectric function and the complex index of refraction function holds for isotropic and homogeneous media. Therefore:
The imaginary part of the complex index of refraction is the index of absorption . Employing the imaginary part of the polarizability and the approximation it follows that:
Taking into account the relation between and , it eventually follows that
As a consequence, the linear relation between concentration and absorbance is generally an approximation, and holds in particular only for small polarisabilities and weak absorptions, i.e. oscillator strengths. If we do not introduce the approximation , and employ instead the following relation between the imaginary part of the relative dielectric function and index of refraction and absorption it can be seen that the molar attenuation coefficient depends on the index of refraction (which is itself concentration dependent):
Under certain conditions the Beer-Lambert law fails to maintain a linear relationship between attenuation and concentration of analyte. These deviations are classified into three categories:
Real--fundamental deviations due to the limitations of the law itself.
Chemical--deviations observed due to specific chemical species of the sample which is being analyzed.
Instrument--deviations which occur due to how the attenuation measurements are made.
There are at least six conditions that need to be fulfilled in order for the Beer-Lambert law to be valid. These are:
The attenuators must act independently of each other. Electromagnetic coupling must be excluded.
The attenuating medium must be homogeneous in the interaction volume.
The attenuating medium must not scatter the radiation--no turbidity--unless this is accounted for as in DOAS.
The incident radiation must consist of parallel rays, each traversing the same length in the absorbing medium.
The incident radiation should preferably be monochromatic, or have at least a width that is narrower than that of the attenuating transition. Otherwise a spectrometer as detector for the power is needed instead of a photodiode which has not a selective wavelength dependence.
The incident flux must not influence the atoms or molecules; it should only act as a non-invasive probe of the species under study. In particular, this implies that the light should not cause optical saturation or optical pumping, since such effects will deplete the lower level and possibly give rise to stimulated emission.
The wave properties of light must be negligible. In particular interference enhancement or decrease must not occur. 
If any of these conditions are not fulfilled, there will be deviations from the Beer-Lambert law.
The Beer-Lambert law is not compatible with Maxwell's equations. Being strict, the law does not describe the transmittance through a medium, but the propagation within that medium. It can be made compatible with Maxwell's equations if the transmittance of a sample with solute is ratioed against the transmittance of the pure solvent which explains why it works so well in spectrophotometry. As this is not possible for pure media, the uncritical employment of the Beer-Lambert law can easily generate errors of the order of 100% or more. In such cases it is necessary to apply the Transfer-matrix method. A detailed discussion of the incompatibility between the Beer-Lambert law and Maxwell's equations can be found in the review The Bouguer-Beer-Lambert law: Shining light on the obscure.
Recently it has also been demonstrated that Beer's law is a limiting law, since the absorbance is only approximately linearly depending on concentration. The reason is that the attenuation coefficient also depends on concentration and density, even in the absence of any interactions. These changes are, however, usually negligible except for high concentrations and large oscillator strength. For high concentrations and/or oscillator strengths, it is the integrated absorbance which is linearly depending on concentration, at least as long as there are no local field effects.  If there are local field effects, they can be approximately taken into account by applying the Lorentz-Lorenz relation. In fact, Beer's law, i.e. the concentration dependence of absorbance, can be derived directly from the Lorentz-Lorenz relation (or, equivalently, the Clausius-Mossotti relation). Correspondingly, it can be demonstrated that there is a twin law according to which the change of the refractive index is approximately linear to the molar concentration for diluted solutions. This twin law can also be derived from the Lorentz-Lorenz relation.
Chemical analysis by spectrophotometry
The Beer-Lambert law can be applied to the analysis of a mixture by spectrophotometry, without the need for extensive pre-processing of the sample. An example is the determination of bilirubin in blood plasma samples. The spectrum of pure bilirubin is known, so the molar attenuation coefficient ? is known. Measurements of decadic attenuation coefficient ?10 are made at one wavelength ? that is nearly unique for bilirubin and at a second wavelength in order to correct for possible interferences. The amount concentration c is then given by
For a more complicated example, consider a mixture in solution containing two species at amount concentrations c1 and c2. The decadic attenuation coefficient at any wavelength ? is, given by
Therefore, measurements at two wavelengths yields two equations in two unknowns and will suffice to determine the amount concentrations c1 and c2 as long as the molar attenuation coefficient of the two components, ?1 and ?2 are known at both wavelengths. This two system equation can be solved using Cramer's rule. In practice it is better to use linear least squares to determine the two amount concentrations from measurements made at more than two wavelengths. Mixtures containing more than two components can be analyzed in the same way, using a minimum of N wavelengths for a mixture containing N components.
This law is also applied to describe the attenuation of solar or stellar radiation as it travels through the atmosphere. In this case, there is scattering of radiation as well as absorption. The optical depth for a slant path is , where ? refers to a vertical path, m is called the relative airmass, and for a plane-parallel atmosphere it is determined as where ? is the zenith angle corresponding to the given path. The Beer-Lambert law for the atmosphere is usually written
where each ?x is the optical depth whose subscript identifies the source of the absorption or scattering it describes:
the selection of the attenuators which have to be considered depends on the wavelength range and can include various other compounds. This can include tetraoxygen, HONO, formaldehyde, glyoxal, a series of halogen radicals and others.
m is the optical mass or airmass factor, a term approximately equal (for small and moderate values of ?) to 1/cos ?, where ? is the observed object's zenith angle (the angle measured from the direction perpendicular to the Earth's surface at the observation site). This equation can be used to retrieve ?a, the aerosol optical thickness, which is necessary for the correction of satellite images and also important in accounting for the role of aerosols in climate.
^Thomas G. Mayerhöfer, Harald Mutschke, Jürgen Popp (2017), "The Electric Field Standing Wave Effect in Infrared Transmission Spectroscopy", ChemPhysChem (in German), 18 (20), pp. 2916-2923, doi:10.1002/cphc.201700688, ISSN1439-7641, PMID28771914CS1 maint: multiple names: authors list (link)
^Thomas G. Mayerhöfer, Alicja Dabrowska, Andreas Schwaighofer, Bernhard Lendl, Jürgen Popp (2020-04-20), "Beyond Beer's Law: Why the Index of Refraction Depends (Almost) Linearly on Concentration", ChemPhysChem (in German), 21 (8), pp. 707-711, doi:10.1002/cphc.202000018, ISSN1439-4235, PMC7216834, PMID32074389CS1 maint: multiple names: authors list (link)