They are chemically opposite, since one (photosynthesis) implies an anabolic metabolism. It produces sugar, from atmospheric CO2. While respiration is a catabolic process, it takes this sugar and oxidizes until it creates CO2, ¡the very essential ingredient photosynthsis needs! So, to sum up, while photosynthesis creates sugar, respiration consumes it. This has a deeper physiological meaning, because both process happen at the same time, they could be view as a worldwide ecosystemical gas atmospheric regulation. Some organisms produce sugar and release Oxygen (photosynthesis products), while others consume sugar and release CO2 (non photosynthetic organisms). Note that plants, are also capable of repiration (that is, C02 release) but this occurs at lesser extent than in animals.