Stainless steel is composed of iron, carbon and chromium. Modern stainless steel may also contain other elements, such as nickel, niobium, molybdenum and titanium. The elements of nickel, molybdenum, niobium and chromium enhance the corrosion resistance of stainless steel.
In 1913, English metallurgist Harry Brearly, who was working on a project to improve rifle barrels, discovered that adding chromium to low carbon steel gives it stain resistance. The addition of a minimum of 12 percent chromium to the steel is what makes it resist rust, or stain "less" compared to other types of steel.
The chromium in the steel combines with the oxygen in the atmosphere to form a thin, invisible layer of chrome-containing oxide, which is called passive film. As the sizes of chromium atoms and their oxides are similar, they pack tightly together on the surface of the metal, forming a stable layer only a few atoms thick.
Austenitic, ferritic and martensitic are the three main types of stainless steel. Austenitic stainless steels have an austenitic crystalline structure, which is a face-centered cubic crystal structure. Ferritic stainless steels have reduced corrosion resistance, due to their lower chromium and nickel content. However, ferritic steels generally have better engineering properties than austenitic grades and are typically more affordable. Martensitic stainless steels are not as corrosion-resistant as austenitic and ferritic steels, but they are extremely strong and can be hardened by heat treatment.