Imidazole
Imidazole is a heterocyclic aromatic organic compound. It is further classified as an alkaloid.  Imidazole refers to the parent compound C3H4N2, whereas imidazoles are a class of heterocycles with similar ring structure but varying substituents.  This ring system is present in important biological building blocks such as histidine, and the related hormone histamine. Imidazole can act as a base and as a weak acid. Imidazole exists in two tautomeric forms with the hydrogen atom moving between the two nitrogens.  Many drugs contain an imidazole ring, such as antifungal drugs and nitroimidazole.

# Discovery
Imidazole was first synthesized by H. Debus in 1858, but various imidazole derivatives had been discovered as early as the 1840s.  His synthesis, as shown below, used glyoxal and formaldehyde in ammonia to form imidazole.  This synthesis, while producing relatively low yields, is still used for creating C-substituted imidazoles.
In one microwave modification the reactants are benzil, formaldehyde and ammonia in glacial acetic acid forming 2,4,5-triphenylimidazole (Lophine).

# Preparation
Imidazole can be synthesized by numerous methods besides the Debus method. Many of these syntheses can also be applied to different substituted imidazoles and imidazole derivatives simply by varying the functional groups on the reactants. In literature, these methods are commonly categorized by which and how many bonds form to make the imidazole rings. For example, the Debus method forms the (1,2), (3,4), and (1,5) bonds in imidazole, using each reactant as a fragment of the ring, and thus this method would be a three-bond-forming synthesis. A small sampling of these methods is presented below.
The (1,5) or (3,4) bond can be formed by the reaction of an immediate and an -aminoaldehyde or -aminoacetal, resulting in the cyclization of an amidine to imidazole. The example below applies to imidazole when R=R1=Hydrogen.
The (1,2) and (2,3) bonds can be formed by treating a 1,2-diaminoalkane, at high temperatures, with an alcohol, aldehyde, or carboxylic acid. A dehydrogenating agent, such as platinum with alumina, must be present in the reaction for the imidazole to form. The example below applies to imidazole when R=Hydrogen.
The (1,2) and (3,4) bonds can also be formed from N-substituted -aminoketones and formamide and heat. The product will be a 1,4-disubstituted imidazole, but here since R=R1=Hydrogen, imidazole itself is the product. The yield of this reaction is moderate, but it seems to be the most effective method of making the 1,4 substitution.
This is a general method which is able to give good yields for substituted imidazoles. The starting materials are substituted glyoxal, aldehyde, amine, and ammonia or an ammonium salt.
Imidazole can be synthesized by the photolysis of 1-vinyltetrazole. This reaction will only give substantial yields if the 1-vinyltetrazole is made efficiently from an organotin compound such as  2-tributylstannyltetrazole. The reaction, shown below, produces imidazole when R=R1=R2=Hydrogen.
Imidazole can also be formed in a vapor phase reaction. The reaction occurs with formamide, ethylenediamine, and hydrogen over platinum on alumina, and it must take place between 340 and 480 C. This forms a very pure imidazole product.

# Structure and properties
Imidazole is a 5-membered planar ring, which is soluble in water and polar solvents.  The compound has an aromatic sextet, which consists of one  electron from the =N- atom and one from each carbon atom, and two from the NH nitrogen.  Some resonance structures of imidazole are shown below.
Imidazole is a base and an excellent nucleophile.  It reacts at the NH nitrogen, attacking alkylating and acylating compounds.  It is not particularly susceptible to electrophilic attacks at the carbon atoms, and most of these reactions are substitutions that keep the aromaticity intact.  One can see from the resonance structure that the carbon-2 is the carbon most likely to have a nucleophile attack it, but in general nucleophilic substitutions are difficult with imidazole.

# Biological significance and applications
Imidazole is incorporated into many important biological molecules.  The most obvious is the amino acid histidine, which has an imidazole side chain. Histidine is present in many proteins and enzymes and plays a vital part in the structure and binding functions of hemoglobin. Histidine can be decarboxylated to histamine, which is also a common biological compound. It is a component of the toxin that causes urticaria, which is basically an allergic reaction.  The structures of both histidine and histamine are:
One of the applications of imidazole is in the purification of His-tagged proteins in immobilised metal affinity chromatography(IMAC). Imidazole is used to elute tagged proteins bound to Ni ions attached to the surface of beads in the chromatography column. An excess of imidazole is passed through the column, which displaces the His-tag from nickel co-ordination, freeing the His-tagged proteins.
Imidazole has become an important part of many pharmaceuticals.  Synthetic imidazoles are present in many fungicides and antifungal, antiprotozoal, and antihypertensive medications.  Imidazole is part of the theophylline molecule, found in tea leaves and coffee beans, which stimulates the central nervous system.  It is present in the anticancer medication mercaptopurine, which combats leukemia by interfering with DNA activities.

# Industrial applications
Imidazole has been used extensively as a corrosion inhibitor on certain transition metals, such as copper. Preventing copper corrosion is important, especially in aqueous systems, where the conductivity of the copper decreases due to corrosion.
Many compounds of industrial and technological importance contain imidazole.  The thermostable polybenzimidazole PBI contains imidazole fused to a benzene ring and linked to a benzene, and acts as a fire retardant.  Imidazole can also be found in various compounds which are used for photography and electronics.

# Salts of imidazole
Salts of imidazole where the imidazole ring is in the cation are known as imidazolium salts (for example, imidazolium chloride). These salts are formed from the protonation or substitution at nitrogen of imidazole. These salts have been used as ionic liquids and precursors to stable carbenes.
Salts where a deprotanated imidazole is an anion are also possible; these salts are known as imidazolide salts (for example, sodium imidazolide).

# Related heterocycles
- Benzimidazole, an analog with a fused benzene ring.
- Dihydroimidazole or benzimidazoline, an analog where 4,5-double bond is saturated.
- Pyrrole, an analog with only one nitrogen atom in position 1.
- Oxazole, an analog with the nitrogen atom in position 1 replaced by oxygen.
- Thiazole, an analog with the nitrogen atom in position 1 replaced by sulfur.
- Pyrazole, an analog with two adjacent nitrogen atoms.