Glycolysis occurs in the cytoplasm, glucose goes in and then 2 ATP come out. Then, the Krebs cycle occurs, which happens in the matrix. Pyruvate goes in and then 2 ATP along with 6 Co2 come out. Lastly, the electron transport chain occurs, which happens in the cristae. Oxygen goes in and water and 32 ATP get released.