By combining magnets into arrays, complex magnetic field patterns can be achieved even on the micron-size scale. In this context it is important to differentiate between homogeneous and inhomogeneous magnetic fields. In a homogeneous magne- tic field, the density of flux lines is constant over a distance x, there is no gradient in the flux density. In an inhomogeneous magnetic field however, there is a gradient in the density of flux lines over a distance x. Homogeneous fields are required for NMR spectroscopy and magnetohydro-dynamic pumping. To achieve this, magnets of rather large size with respect to the fluidic volume are often employed (Fig. 2(a)). Inhomogeneous fields with high magnetic field gradients are desired, when the aim is to trap particles or transport materials within a fluid volume (see eqn (1) below). To this end, tapered mag- nets (Fig. 2(b)) or even layered structures (Fig. 2(c)) can be used.