X-rays interact with materials by penetrating them and being absorbed or scattered. This interaction can provide valuable information about the internal structure, composition, and properties of materials down to the atomic level. Techniques such as X-ray diffraction (XRD) and X-ray photoelectron spectroscopy (XPS) are fundamental in the analysis of nanomaterials.