This diagram illustrates how the dimensions of clay minerals' crystal structure are affected by which ions are present in the composition of the mineral. Different clay minerals were identified this way at two sites in Mars' Gale Crater: "Murray Buttes" and "Yellowknife Bay."
In otherwise identical clay minerals, a composition that includes aluminum and ferric iron ions (red dots) results in slightly smaller crystalline unit cells than one that instead includes magnesium and ferrous iron ions (green dots). Ferric iron is more highly oxidized than ferrous iron.
Crystalline cell units are the basic repeating building blocks that define minerals. X-ray diffraction analysis, a capability of the Chemistry and Mineralogy (CheMin) instrument on NASA's Curiosity Mars rover, identifies minerals from their crystalline structure.
http://photojournal.jpl.nasa.gov/catalog/PIA21148