On the basis of the modes of nutrition, bacteria are classified into two types:
Heterotrophic bacteria and autotrophic bacteria. Heterotrophic bacteria are those which do not synthesize their own food but depend on other organisms or on the dead organic matter for food. They lack photosynthetic pigments. They are most abundant in nature. They may be parasites, saprophytes or symbionts.
Autotrophic bacteria synthesize their own organic food from substances like carbon dioxide. They are of two types: Photoautotrophs and chemoautotrophs.
Photoautotrophic bacteria use solar energy for the synthesis of their own food. These bacteria have photosynthetic pigments.
Chemoautotrophs do not have photosynthetic pigments. They use chemical energy to reduce carbon dioxide to organic food.