The tendency of certain bacteria, especially E. coli and Salmonella, to move toward nutrients and other attractants and away from repellents and toxic chemicals. Such bacteria live in a liquid medium and propel themselves through it by means of threadlike appendages called flagellae. They apparently can determine differences in the concentration of chemicals in the medium as they move through it, thus exhibiting a memory in respect to their environment.