Photosynthesis is a chemical process that converts carbon dioxide
Carbon dioxide
Carbon dioxide is a naturally occurring chemical compound composed of two oxygen atoms covalently bonded to a single carbon atom...

 into organic compound
Organic compound
An organic compound is any member of a large class of gaseous, liquid, or solid chemical compounds whose molecules contain carbon. For historical reasons discussed below, a few types of carbon-containing compounds such as carbides, carbonates, simple oxides of carbon, and cyanides, as well as the...

s, especially sugar
Sugar is a class of edible crystalline carbohydrates, mainly sucrose, lactose, and fructose, characterized by a sweet flavor.Sucrose in its refined form primarily comes from sugar cane and sugar beet...

s, using the energy from sunlight. Photosynthesis occurs in plant
Plants are living organisms belonging to the kingdom Plantae. Precise definitions of the kingdom vary, but as the term is used here, plants include familiar organisms such as trees, flowers, herbs, bushes, grasses, vines, ferns, mosses, and green algae. The group is also called green plants or...

s, algae
Algae are a large and diverse group of simple, typically autotrophic organisms, ranging from unicellular to multicellular forms, such as the giant kelps that grow to 65 meters in length. They are photosynthetic like plants, and "simple" because their tissues are not organized into the many...

, and many species of bacteria
Bacteria are a large domain of prokaryotic microorganisms. Typically a few micrometres in length, bacteria have a wide range of shapes, ranging from spheres to rods and spirals...

, but not in archaea
The Archaea are a group of single-celled microorganisms. A single individual or species from this domain is called an archaeon...

. Photosynthetic organisms are called photoautotrophs, since they can create their own food. In plants, algae, and cyanobacteria, photosynthesis uses carbon dioxide and water
Water is a chemical substance with the chemical formula H2O. A water molecule contains one oxygen and two hydrogen atoms connected by covalent bonds. Water is a liquid at ambient conditions, but it often co-exists on Earth with its solid state, ice, and gaseous state . Water also exists in a...

, releasing oxygen
Oxygen is the element with atomic number 8 and represented by the symbol O. Its name derives from the Greek roots ὀξύς and -γενής , because at the time of naming, it was mistakenly thought that all acids required oxygen in their composition...

 as a waste product.