Most bacteria are decomposers that consume organic materials and convert them into substances that other plants and organisms can readily absorb. Many of these live on the soil's surface to a depth of about 3 inches where they break down vegetation and other organic materials.
Another group of bacteria, called mutualists, partner with plants to perform different functions, such as nitrogen-fixing bacteria. These organisms convert the nitrogen in the air into a form the plants can use and are usually located near a plant's roots.
Other types of bacteria feed off the organic substances given off by plant roots and do most of their work in an area close to the roots called the rhizosphere. These bacteria sometimes form a film around plant roots. Bacterial concentrations diminish significantly beyond a depth of roughly 6 inches, as there is little vegetative matter for them to feed on.