The highly acidic environment in the stomach lumen causes proteins from food to lose their characteristic folded structure (or denature ). This exposes the protein's peptide bonds . The gastric chief cells of the stomach secrete enzymes for protein breakdown (inactive pepsinogen , and in infancy rennin ). Hydrochloric acid activates pepsinogen into the enzyme pepsin , which then helps digestion by breaking the bonds linking amino acids, a process known as proteolysis . In addition, many microorganisms have their growth inhibited by such an acidic environment, which is helpful to prevent infection .
Magnesium reacts with hydrochloric acid according to the equation: Mg( s ) + 2 HCl( aq ) --> MgCl 2 ( aq ) + H 2 ( g ) This demonstration can be used to illustrate the characteristic reaction of metals with acid, a single replacement reaction, or to demonstrate the generation of hydrogen gas. The flammability of hydrogen gas can be demonstrated by carefully holding a match or fireplace lighter up to the popping hydrogen bubbles. An audible crackling sound is heard as the hydrogen burns.