The two main processes for the survival of living organisms is the photosynthesis and cellular respiration. These processes are served different functions to the organism but they are inter-related to each other.
The cellular respiration produces the by-products in the form of carbon dioxide and metabolic water which gets utilized during the photosynthesis. The water is utilized during the light-dependent reaction where water is broken down releasing oxygen utilized during respiration.
The carbon dioxide is utilized during the light-independent reaction in the synthesis of a glucose molecule.
The term "lipid" does not specify a particular chemical structure. Whereas one can write a general formula for an amino acid, nucleic acid, or protein, lipids are much more chemically diverse. Compounds are categorized as lipids based on their greater solubility in organic solvents than in water.