Ptychography is a technique for scanning diffractive imaging that allows reconstruction of the phase and amplitude of an object from multiple diffraction patterns collected at different positions. It uses an iterative algorithm to recover the object by alternating between updating an estimated object and simulated diffraction patterns. This document discusses using ptychography at scanning transmission x-ray microscopes to achieve resolutions below 10 nm, as well as its applications in 3D imaging of biological samples with resolutions of 100nm or better and quantitative chemical analysis.