Fluid mixing controls many natural and industrial processes, including the spread of air pollution 1 , mass transfer and reactions in microfluidic devices 2,3 and the detection of odours or other chemical signals 4 . Strongly nonlinear flows enhance mixing by chaotic advection 5,6 , stretching and folding 7,8 fluid volumes. Though these processes have been studied in simple models 9,10 , stretching and folding are difficult to distinguish in real flows with complex spatiotemporal structure. Here we report measurements of these two distinct processes in a two-dimensional laboratory flow. We decouple stretching and folding using tools developed for analysing glassy solids 11 and colloids 12 , breaking fluid deformation into a linear, affine component (primarily stretching) and a nonlinear, non-affine component (primarily folding). Short-time deformation is dominated by stretching, whereas folding occurs only after fluid elements are elongated. The relative strength of the two processes depends strongly on space and time; foldingdominated regions are initially isolated, but later grow to fill space.Mixing is fundamentally a diffusion process: at the boundary of an impurity in a fluid, the concentration gradient is large and material flows until the gradient vanishes. Diffusion alone is inefficient for large-scale transport, such as is required in industrial mixers or observed in geophysical flow. Moving fluids, however, can greatly enhance mixing through chaotic advection 5,6 . As the fluid moves, the region containing the impurity is strongly deformed, the length of its boundary grows exponentially and diffusion becomes efficient. The key to understanding chaotic mixing, then, is the characterization of the deformation of fluid elements 8 . As first described by Reynolds 7 , this process is one of stretching, which increases the length of the interface, and folding, which constrains the fluid element to fill a finite region of space. These geometric processes are often studied in simple mathematical models such as the baker's or horseshoe maps 9,10 . Such models, however, differ from actual fluid flow in that they are discrete, periodic and highly idealized. Although stretching and folding have been described qualitatively in real flows 2,13,14 , they have not been quantitatively distinguished spatially, temporally or dynamically in flows with complex spatiotemporal structure.Deformation of a material volume consists of the relative motion, and potentially rearrangement, of infinitesimal fluid elements. These relative displacements can be broadly characterized as either affine-that is, some combination of rotation, shear, dilation or compression 15 -or non-affine. Affine deformation is linear, and can be represented by a matrix operator. Non-affine deformation is nonlinear, and generally consists of irreversible rearrangements of the constituent volume elements 11 . This distinction between affine and non-affine deformation has been used to study shear transformation zones and plasticity in metallic glasses 11,16 ...