Figure 1: Depth of measurement in a pure silicate
Elements that fluoresce with low energy, such as silica at 1.7 keV, will only return photons from 20 μm deep into a SiO2 matrix, while elements that fluoresce at higher energies, such as Zirconium at 15.77 keV, will return photons from as deep as 3.4 mm. As a consequence, elements with higher energies of fluorescence will be more easily identified in smaller concentrations. As energy in x ray tubes is non evenly distributed, there is a further discrimination against the fluorescence of elements on the extreme ends of an energy spectrum (near 1 and 40 keV). Furthermore, the fluorescence of one element can influence that of another. A high concentration of Zinc, with a K-alpha fluorescence of 8.78 keV, sits on the absorption edge of Copper, with a K-alpha fluorescence of 8.01 keV. A high concentration of Zinc will distort the quantity of Copper present in the spectra.
It may be more intuitive to think about this in terms of a table:
Table 1: Depth of select elements in a silicate
However, density is important too. The same physical relationship is present between elements in a denser matrix, however the total depth is considerably shorter:
Figure 2: Depth of measurement in a lead glass.
You can see how this can vary by matrix to matrix. I am including a number of examples of measurement depth in different matrices below. The first section will be for common substrates, biological materials, historical pigments, metals, and plastics.