Photosynthesis and respiration can be stated as complementary process to each other as the product of one process is used in the other process.
Plant capture energy from the sun and the following chemical reaction takes place –
CO2 + H2O + light energy = Sugars + O2
Product sugar (glucose) and oxygen is released into the atmosphere.
Now in respiration, the carbohydrate and oxygen is used to produce carbon dioxide, water and energy by organisms other than the producers (plants) . The chemical reaction involved is shown below:
Carbohydrate (Sugar) + O2 = CO2 + H2O + energy
The carbon dioxide, water and energy released in respiration is then used by the green plants to produce carbohydrates (glucose/sugar) and oxygen.