Electrons and H+ ions are donated to the electron transport chain (located in the inner mitochondrial membrane) from NADH and FADH2 (generated during glycolysis, the Krebbs cycle and the Link reaction). These electrons and protons flow between the complexes in the electron transport chain and generate energy needed to pump H+ ions from the mitochondrial matrix, through the inner mitochondrial membrane, into the intermembrane space. This creates a concentration gradient and a pH gradient. In order to flow down this gradient, H+ ions flow through ATP synthase enzymes embedded in the inner mitochondrial membrane. This action allows ADP and Pi to react to from ATP.