Gunpowder is an extremely simple substance. Indeed, it is not even a compound, being merely a mixture of potassium nitrate, common charcoal, and sulphur. Any blend of roughly equal proportions of sulphur and charcoal with from 40% to 75% of potassium nitrate --saltpeter-- will flash with considerable noise and may thus qualify to be called "gunpowder". Precisely when the substance was invented remains obscure. Indeed, in view of the fact that the ingredients had been known and in common use from earliest times, it is surprising that gunpowder was not invented much sooner than was actually the case. Incendiary and pyrotechnic mixtures with military applications had been around since ancient times. Many of these seem to have been based on petroleum products such as naptha, which can occasionally be found naturally in tar sands and seeps. The most famous of these was "Greek Fire". A Byzantine secret weapon developed in the Seventh Century and used with great effect for many centuries thereafter, the precise formula for Greek fire has since been lost to history, but it is believed to have been made of naptha and quicklime. Some of these mixtures appear to have included saltpeter among their principal ingredients. Unfortunately, the evidence for these is poor.
Saltpeter had several applications in magic, theater, and alchemy. The most interesting of these is that it is useful in creating attractive pale purple flames and billowing smoke when tossed into a fire, which greatly impresses the audience. It was also included in the medieval pharmacopoeia for, among other things, it was allegedly useful for kidney trouble when compounded with powdered white pine and ostrich egg shell. It has been suggested that the occasional report of a wizard destroyed by demons in a burst of thunder, lightening, and brimstone, might actually refer to the accidental discovery of gunpowder by some unfortunate alchemist looking for a more impressive act or a physician seeking a new medicine, who, of course, failed to survive his historic discovery.
Claims that gunpowder was invented in China rest on variable interpretations of certain passages in ancient manuscripts. Firecrackers of some sort are thought to have been in use as early as the 6th Century, but these can be made without gunpowder. Nevertheless, it is clear that by the early 11th Century various propellent mixtures containing saltpeter, sulphur, and charcoal. Chinese concoctions also contained a variety of other ingedients, including various petrochemicals and such improbable things as garlic and honey. These were noted in the "Wu Ching Tsung Yao," an encyclopaedia composed by one Tseng Kung-Liang (nowadays Zeng Gung- lyang) in about 1044, as being useful in making a slow match for flamethrowing devices which operated on the siphon principal, and for making fireworks and rockets. Now, in gunpowder, the rapid burning of the charcoal in free oxygen releases additional oxygen from the saltpeter which rapidly oxidizes the sulphur, thereby creating the voluminous expansion of gases which provides the propellent power for which the substance is known. Thus, the extraneous ingredients in these Chinese "protogunpowders" contributed little or nothing to the efficiency of the explosion. Moreover, as the proportion of saltpeter is rather low in all early Chinese formulae, these mixtures were far more likely to go off with a "whoosh" than a "bang", the more so as we have no way of telling the degree of purity of any of the ingredients. Obviously, impurities would tend to dampen the explosive effects. Nevertheless, such a substance would be useful in propelling rockets and, if properly confined, could be used as an explosive, though with effects more pyrotechnic than physical. Within a century of the composition of Tseng's work, such mixtures packed in bamboo segments were proving useful in battle, particularly in the defense of fortified places, where they could be hurled down on the besiegers. One interesting develoment was something called the "fire lance", which appears to have been a pyrotechnic mixture packed into a bamboo tube which was sealed at one end and used as a flame projector, much like the familiar roman candle. Knowledge of such mixtures appears to have reached Europe sometime in the 13th Century, possibly brought by the Mongols, who were busily invading Central Europe in the period 1240-1242, or even earlier, by some footloose merchant, or perhaps it was introduced by the Moors via Spain. However, it is just as likely that such mixtures evolved there independently. The precise answer is unclear. What is clear, however, is that it is in Europe where the real development of gunpowder took place.
The earliest formula clearly identifiable as gunpowder is one produced by the English alchemist and monk Roger Bacon (1214?-1292?). Bacon appears to have had some knowledge of the potential of saltpeter, sulphur, and charcoal as early as 1247, when he makes passing mention of it in an essay on the wonders of science. But it was not until 1267 that he specified a formula, in a letter to Pope Clement IV (reigned 1265-1268). This formula called for 41.2% saltpeter, 29.4% charcoal, and 29.4% sulphur, a mixture which will flash fairly convincingly and produce a loud noise, though it would have been a little weak as a propellant, due to its low saltpeter content, thus making it short on oxidizer. This did not, however, detract from the impressive pyrotechnical display. Over the next few decades experiments with the new substance appear to have been conducted with some frequency and several formulae exist, all of which are considerable improvements on Bacon's. By 1275 St. Albertus Magnus (1206?-1280), a German scholastic philosopher and theologian who dabbled in alchemy and helped lay the foundations of the modern experimental method, produced a formula which called for 66.6% potassium nitrate, plus 16.7% each of sulphur and charcoal. This is unquestionably gunpowder, for it will go off with a "bang", though not quite the "bang" one would get from the optimal formula, which is 74.64% pure saltpeter, 11.85% pure sulphur, and 13.51% charcoal. Ideally the charcoal should be young willow, limewood, alder, or maple, burnt so that it is reduced to 60% pure carbon, 38% carbohydrates, and 2% ash. Useful applications for the new substance soon followed. In 1300 someone writing under the name "Marcus Graecus" described the construction of incendiary rockets using Albertus' formula. These probably worked nicely, but rockets were essentially a dead-end in the history of gunpowder. During this same period a far more important development took place, the invention of the gun.