Magnesium stearate (Mg(C₁₈H₃₅O₂)₂) functions as an anti-caking and flow agent in powdered foods and supplements.