Metallurgy is a domain of materials science and engineering that studies the physical and chemical behavior of metallic elements, their inter-metallic compounds, and their mixtures, which are called alloys. Metallurgy is used to separate metals from their ore. Metallurgy is also the technology of metals: the way in which science is applied to the production of metals, and the engineering of metal components for usage in products for consumers and manufacturers. The production of metals involves the processing of ores to extract the metal they contain, and the mixture of metals, sometimes with other elements, to produce alloys. Metallurgy is distinguished from the craft of metalworking, although metalworking relies on metallurgy, as medicine relies on medical science, for technical advancement. The science of metallurgy is subdivided into chemical metallurgy and physical metallurgy.