Barium is a heavy, reactive alkaline-earth metal. The metal itself oxidizes rapidly in air and is almost never used directly in metallic form; its economic value rests almost entirely on its compounds. Its largest industrial use comes from barite (barium sulfate): in oil and gas drilling, barite powder is mixed into drilling mud in proportion, and its high density holds down the high pressure downhole and prevents blowouts—this is the most consumed weighting material in worldwide oil and gas exploration drilling. In chemicals, barium carbonate goes to the glass and enamel industries: adding it to glass raises the refractive index and lowers dispersion, making it an important raw material for television funnels, cathode-ray tubes, and optical glass, and it is also used to remove sulfate impurities from brine. In fireworks and signal flares, barium salts are the classic green flame colorant, because the characteristic emission of barium falls right in the green band. Its best-known medical application is the barium meal: after the patient drinks a suspension of barium sulfate, X-ray contrast imaging is performed; because barium sulfate is insoluble in water, not absorbed by the body, and strongly blocks X-rays, the outline of the digestive tract shows clearly on the image. It was the standard screening method for gastrointestinal disease before gastroscopes became widespread and is still widely used today. Metallic barium itself serves as a getter in vacuum electronic devices, absorbing residual gases and maintaining the vacuum inside electron tubes and cathode-ray tubes.
Barium sulfate (BaSO4), namely barite, is barium's main ore and the most consumed barium compound in industry: drilling-mud weighting accounts for the bulk of it, the medical barium meal is its aqueous suspension, and it is also used as an extender pigment and white filler in paints, plastics, and paper; its chemistry is extremely stable. Barium carbonate (BaCO3, witherite) is an intermediate raw material for producing other barium salts and barium-based chemicals, used in optical glass, CRT glass, and enamels, and also for sulfate removal in water treatment and in ceramic glazes. Barium chloride (BaCl2) is a soluble, toxic barium salt used mainly in heat-treatment salt baths, boiler water treatment for sulfate removal, and as a chemical reagent, and is also the starting point for preparing other barium compounds. Barium nitrate (Ba(NO3)2) is a core ingredient of fireworks, signal flares, and green pyrotechnic compositions; on heating it decomposes to release oxygen and produces barium's characteristic green flame, and it is also used as an oxidizer in military explosives and as a precipitant in rare-earth purification.