Bacteria are ubiquitous and play a critical role in many contexts. Their environment is nearly always dynamic due to the prevalence of fluid flow: creeping flow in soil, highly sheared flow in bodily conduits, and turbulent flow in rivers, streams, lakes, and oceans, as well as anthropogenic habitats such as bioreactors, heat exchangers and water supply systems. The presence of flow not only affects how bacteria are transported and dispersed at the macroscale, but also their ability to interact with their local habitat through motility and chemotaxis (the ability to sense and follow chemical gradients), in particular their foraging. Despite the ubiquitous interaction between motility, foraging and flow, almost all studies of bacterial motility have been confined to still fluids. At the small scales of a bacterium, any natural flow field (e.g. turbulence) is experienced as a linear velocity profile, or 'simple shear'. Therefore, understanding the interaction between a simple shear flow and motility is a critical step towards gaining insight on how the ambient flow favors or hinders microorganisms in their quest for food. In this thesis, I address this important gap by studying the effect of shear on bacteria, using a combination of microfluidic experiments and mathematical modeling. In chapter 2, a method is presented to create microscale vortices using a microfluidic setup specifically designed to investigate the response of swimming microorganisms. Stable, small-scale vortices were generated in the side-cavity of a microchannel by the shear stress in the main flow. The generation of a vortex was found to depend on the cavity's geometry, in particular its depth, aspect ratio, and opening width. Using video-microscopy, the position and orientation of individual microorganisms swimming in vortices of various intensities were tracked. We applied this setup to the marine bacterium Pseudoalteromonas haloplanktis. Under weak flows (shear rates < 0.1 s 1), P. haloplanktis exhibited a random swimming pattern. As the shear rate increased, P. haloplanktis became more aligned with the flow. In order to study the detailed hydrodynamic interaction between shear and bacteria, we developed a mathematical model employing resistive force theory. In general, the modeling of a bacterium requires consideration of two factors: the rotating flagellar bundle and the cell body to which the flagella are attached. To make the problem analytically tractable, we study the hydrodynamics around the head and the flagellum separately. In chapter 3, we present a combined theoretical and experimental investigation of the fluid mechanics of a helix exposed to a shear flow. In addition to classic Jeffery orbits, resistive force theory predicts a drift of the helix across streamlines, perpendicular to the shear plane. The direction of the drift is determined by the direction of the shear and the chirality of the helix. We verify this prediction experimentally using microfluidics, by exposing Leptospira biflexa flaB mutant, a non-motile strain of helix-shaped bacteria, to a plane parabolic flow. As the shear in the top and bottom halves of the microchannel has opposite sign, we predict and observe the bacteria in these two regions to drift in opposite directions. The magnitude of the drift is in good quantitative agreement with theory. We show that this setup can be used to separate microscale chiral objects. In chapter 4, a theoretical and experimental investigation of a swimming bacterium in a shear flow is presented. The presence of the cell body results in a novel phenomenon: chiral forces induce not only a lateral drift, but also a reorienting torque on swimming bacteria. For typical flagellated bacteria, the magnitude of this drift velocity is much smaller (-0.7 gm s-1) than typical swimming speeds of bacteria (-50 [mu]m s-1). However, with the addition of a head, the chirality-dependent forces that lead to a lateral drift also lead to a reorienting torque. The model based on resistive force theory predicts that the drift velocity of swimming bacteria is in the same order of magnitude as the swimming speed. Experimental observations of the motile bacteria Bacillus subtilis exposed to shear flows show good agreement with the theoretical prediction. This process is a purely passive hydrodynamic effect, as demonstrated by further experiments showing that bacteria do not behaviorally (i.e. actively) respond to shear. This newly discovered hydrodynamic reorientation can significantly affect any process that involves changes of swimming direction, so that bacterial 'steering' in a flow cannot be understood unless the effects of chiral reorientation are quantified. Because swimming and reorientation are central to the chemotaxis used by many bacteria for foraging, we expect this coupling of motility and flow to play an important role in the ecology of many bacterial species.