Mitochondria have an inner and outer membrane that form compartments. The inner membrane is folded into cristae which increases surface area and contains ATP synthase enzymes and electron carriers. The electron transport chain uses energy from electron flow along protein complexes to pump protons from the matrix to the intermembrane space, building a proton gradient. ATP synthase uses this proton gradient to phosphorylate ADP into ATP. The matrix contains enzymes for the link reaction and Krebs cycle that generate NADH used in the electron transport chain.