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.Metallurgy derives from the Ancient Greek μεταλλουργός, metallourgós, 'worker in metal', from μέταλλον, métallon, 'mine, metal' + ἔργον, érgon, 'work'.The earliest recorded metal employed by humans appears to be gold, which can be found free or 'native'. Small amounts of natural gold have been found in Spanish caves used during the late Paleolithic period, c. 40,000 BC.Silver, copper, tin and meteoric iron can also be found in native form, allowing a limited amount of metalworking in early cultures. Egyptian weapons made from meteoric iron in about 3000 BC were highly prized as 'daggers from heaven'.'The earliest lead (Pb) finds in the ancient Near East are a 6th millennium BC bangle from Yarim Tepe in northern Iraq and a slightly later conical lead piece from Halaf period Arpachiyah, near Mosul. As native lead is extremely rare, such artifacts raise the possibility that lead smelting may have begun even before copper smelting.'Extractive metallurgy is the practice of removing valuable metals from an ore and refining the extracted raw metals into a purer form. In order to convert a metal oxide or sulphide to a purer metal, the ore must be reduced physically, chemically, or electrolytically.Common engineering metals include aluminium, chromium, copper, iron, magnesium, nickel, titanium and zinc. These are most often used as alloys. Much effort has been placed on understanding the iron-carbon alloy system, which includes steels and cast irons. Plain carbon steels (those that contain essentially only carbon as an alloying element) are used in low-cost, high-strength applications where weight and corrosion are not a problem. Cast irons, including ductile iron, are also part of the iron-carbon system.In production engineering, metallurgy is concerned with the production of metallic components for use in consumer or engineering products. This involves the production of alloys, the shaping, the heat treatment and the surface treatment of the product. Determining the hardness of the metal using the Rockwell, Vickers, and Brinell hardness scales is a commonly used practice that helps better understand the metal's elasticity and plasticity for different applications and production processes. The task of the metallurgist is to achieve balance between material properties such as cost, weight, strength, toughness, hardness, corrosion, fatigue resistance, and performance in temperature extremes. To achieve this goal, the operating environment must be carefully considered. In a saltwater environment, ferrous metals and some aluminium alloys corrode quickly. Metals exposed to cold or cryogenic conditions may endure a ductile to brittle transition and lose their toughness, becoming more brittle and prone to cracking. Metals under continual cyclic loading can suffer from metal fatigue. Metals under constant stress at elevated temperatures can creep.Metallurgists study the microscopic and macroscopic properties using metallography, a technique invented by Henry Clifton Sorby. In metallography, an alloy of interest is ground flat and polished to a mirror finish. The sample can then be etched to reveal the microstructure and macrostructure of the metal. The sample is then examined in an optical or electron microscope, and the image contrast provides details on the composition, mechanical properties, and processing history.