Chemical investigation began when the peoples of the prehistoric and ancient world exploited lucky accidents and undertook down-to-earth research and development efforts to improve their lives. Their discoveries resulted in useful methods for dyeing fabrics, for preparing fibers and leather, for fermenting foodstuffs and beverages, and for producing soap, cosmetics, glass, and glazed pottery.

Alchemy, the forerunner of chemistry, attempted to provide a theoretical framework for understanding matter. Instead of basing their theories on empirical research, the early alchemists used many methods of obtaining knowledge that we would not consider scientific. Some believed there was a relationship between spiritual elevation and the goal of transmuting base metals to gold, and therefore they consulted ancient myths and religious texts for insights. Others also sought enlightenment from numerology and astrology. Many alchemists were influenced by philosophical traditions that arose from contemplation of nature. For example, a Greek tradition begun by Empedocles and elaborated by Aristotle held that all matter consists of four basic elements: earth, water, air, and fire.

Chinese alchemists in the seventh century discovered the first chemical explosive, gunpowder, which changed the nature of warfare. Jabir ibn Hayyan, working in eighth century Persia, pioneered techniques that we would consider laboratory experimentation, although his focus on the qualitative rather than the quantitative aspects of matter was an important difference from modern research methods. He and his followers discovered many important chemicals, such as sulfuric and nitric acids. Alchemists also perfected some techniques that chemists still use, such as distillation.

However, alchemy reached a dead end and acquired a reputation for fraud. Its vocabulary became a code intended to baffle the uninitiated rather than spread knowledge. It was also hampered by the failure to develop a systematic terminology for identifying and describing new compounds or for describing experiments in ways that allowed them to be reproduced.

The transition to modern chemistry began in the 17th century. Sir Francis Bacon's The Proficience and Advancement of Learning (1605) described what we now know as the scientific method, and Robert Boyle applied this method to studying chemical reactions. Although Boyle pursued some of the same goals as the alchemists, in The Sceptical Chymist (1661) he rejected reliance on previous authorities, even Bacon. His experiments advanced understanding of the chemistry of combustion and respiration.

The climax of 18th century chemistry was the work of Antoine Lavoisier. His law of conservation of mass, articulated in 1789, stated that within a closed system, matter cannot gain or lose mass. This means that even though an experiment may produce a reaction that breaks down or assembles chemical components, the total mass of the components does not change. This principle allowed chemistry to become a quantitative science like physics.

The early 19th century was a time of great interest in electricity, which was accompanied by discoveries of electrochemical phenomena by Alessandro Volta (developer of the first electric battery) and Michael Faraday. Also in this century, chemists broke down the perceived barrier between inorganic and organic compounds, beginning with the accidental synthesis of urea by Friedrich Wöhler in 1828.

The atomic theory dates back to ancient Greece, but it was around 1805 that John Dalton, based on his experiments with gases, articulated the important ingredients of the modern theory. It took a whole century for direct experimental evidence to demonstrate the validity of Dalton's theory, although many chemists described phenomena that were consistent with these principles. Some noticed numerical relationships between the atomic weights of elements. In the 1860s, Dmitri Mendeleev discovered that elements with similar properties have similar atomic weights or differ in weight by a fixed number. He arranged the known elements in what we now call the periodic table and used this arrangement to predict elements that had not yet been discovered.

In the early 20th century, the discovery of subatomic particles and the development of quantum theory helped explain chemical phenomena but also set aside the subatomic realm as the province of physics. Chemistry's focus on the comparatively large realm of atoms and molecules still suffered from the problem that these particles were too small to examine microscopically.

The development of X-ray crystallography, however, allowed chemists to map the atomic and molecular structures of many substances. The crowning achievement of this field of research was the discovery of DNA's double helix by James Watson and Francis Crick in 1953. Molecular biology took another leap forward with the development of the polymerase chain reaction, by Kary Mullis in 1983. This process created thousands or millions of copies of a piece of DNA, leading to technologies that permitted gene sequencing, genetic fingerprinting, and the diagnosis of hereditary diseases.