There are four main groups of macromolecules: carbohydrates, lipids, nucleic acids, and proteins. Carbohydrates are composed of carbon, hydrogen, and oxygen and are the main source of energy. Lipids are made mostly of carbon and hydrogen and are used to store energy. Nucleic acids contain hydrogen, oxygen, nitrogen, carbon, and phosphorus and store and transmit genetic information. Proteins are composed of nitrogen, carbon, hydrogen, and oxygen and perform important functions such as regulating reactions, forming tissues, and transporting substances.