Organic chemistry is the study of carbon-based compounds. Historically, organic compounds were thought to only come from living organisms, but it was discovered they could be synthesized in the lab from inorganic precursors. The structure of organic molecules is based on how carbon atoms bond together, often forming chains, rings, and complex structures. Organic compounds have a variety of applications including in drugs, plastics, food, and living organisms themselves which are mostly composed of organic matter.