Like all organisms, prokaryotes must build complex molecules from simple molecules. Like most organisms, prokaryotes require carbon and energy to create the molecules of life—carbohydrates, proteins, lipids, and nucleic acids. Prokaryotes obtain carbon and energy from a variety of sources, and can be autotrophic, or heterotrophic.  All bacteria also need nitrogen, sulfur, phosphorus, inorganic salts, and micronutrients.

Some prokaryotes are autotrophs, or produce their own food by photosynthesis, or chemosynthesis.  Prokaryotes that get their energy from light, or by photosynthesis.  Some good examples of photosynthetic bacteria are cyanobacteria, green sulfur bacteria and purple sulfur bacteria The cyanobacteria, or blue-green algae also contains chlorophyll, a pigment found in plants that allows for photosynthesis. The sulfur bacteria use hydrogen sulfide as a source of hydrogen, instead of water like most other photosynthetic organisms, including cyanobacteria.

This is an example of a cyanobacteria called a Notsoc.  It gets food through photosynthesis.

 Other prokaryotes get their energy from inorganic compounds such as hydrogen sulfide, ammonia, and iron, and use carbon dioxide for their carbon source.  This is known as chemosynthesis.  Some examples of these are the soil bacteria Nitrobacter and Nitrosomonas.

Some other prokaryotes are heterotrophs, which means get their food from some other source.  One group of these prokaryotes is the photoheterotrophs.  These typically use carbon and fatty acid for their energy source, but some can actually photosynthesize small amounts of energy, but they can’t use carbon dioxide for their source of carbon.  This is what the blue-green algae are.

Some bacteria get their energy from breaking down complex organic compounds in the environment, such as dead or decaying matter.  These bacteria are known as saprophytes, or are sometimes called decomposers.  These are the creatures that break down dead matter into things that can be reused.

Still other bacteria are parasites, meaning they live off other living things.  The organism involved is known as the ‘host’ organism.  Some examples of parisites are Rickettsia and Chlamydia, which are parisites in eukaryotic cells.

Some bacteria require oxygen to survive, such as the bacillus are called aerobes.  Those that don’t need oxygen to survive are called anaerobes.  Some anaerobes such as the clostridium cannot survive with oxygen.