📘 CodingMarble Learn

Heterocyclic Compounds

A heterocyclic compound has a ring that contains at least one atom other than carbon, such as nitrogen, oxygen or sulfur. Pyridine is like benzene with one C–H replaced by N; furan, pyrrole and thiophene are 5-membered rings. Many vitamins, drugs, dyes, DNA bases and blood and plant pigments are heterocycles.

🎬 Step-by-step story

  1. Benzene is a flat ring of 6 carbon atoms, each holding one hydrogen.
  2. Swap one carbon for a nitrogen atom (blue). The ring is still flat and still has 6 atoms. This is pyridine.
  3. Rings can also have 5 atoms. Furan has an oxygen, pyrrole has N–H, and thiophene has a sulfur. These ring atoms that are not carbon are called hetero atoms.
  4. Look at the purple clouds: they are electrons shared around the ring. In pyridine, the nitrogen also has a lone pair pointing outward. That lone pair can take a hydrogen ion, so pyridine is a weak base.
  5. These rings are not just in textbooks. Pyridine is inside vitamin B3, pyrrole rings build haem in your blood, and thiophene rings are in some dyes and medicines.
  6. Free play: tap each ring, read its formula, and switch the electron cloud on and off.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

What exactly makes a ring 'hetero'?

One ring atom that is not carbon. In the 3D the blue, red or yellow atom is the hetero atom.

Does pyridine still have 6 atoms in the ring like benzene?

Yes. The ring size stays 6; only one C–H is replaced by N.

Why is pyridine basic but pyrrole is not?

In pyridine the lone pair points out, free to take H⁺. In pyrrole the lone pair is part of the shared cloud.

Why do five-membered rings still count as aromatic?

The hetero atom gives 2 electrons and the 4 carbons give 1 each, so the cloud has 6 electrons.

Where do heterocycles appear in real life?

In vitamin B3, haem in blood, chlorophyll, DNA bases and many medicines and dyes.

What is a heterocyclic compound?

A cyclic compound has its atoms in a ring. In a carbocyclic ring, all ring atoms are carbon (like benzene). In a heterocyclic ring, at least one ring atom is another element, called a hetero atom. The most common are nitrogen (N), oxygen (O) and sulfur (S).

Common simple ones: pyridine (C₅H₅N, 6-membered, one N), pyrrole (C₄H₅N, 5-membered, N–H), furan (C₄H₄O, 5-membered, one O), thiophene (C₄H₄S, 5-membered, one S).

Pyridine vs benzene

Pyridine looks like benzene with one C–H changed into N. Both are flat 6-membered rings with six π electrons shared round the ring, so both are aromatic and stable.

Five-membered rings: furan, pyrrole, thiophene

Here the hetero atom gives two electrons (a lone pair) to the shared cloud, and each of the four carbons gives one. Total six, so these rings are aromatic too. Because the lone pair is used in the ring, the N of pyrrole is not basic. Order of aromatic stability: thiophene > pyrrole > furan. These rings react with electrophiles faster than benzene does.

Heterocycles in drugs, dyes and bioactive substances

Over half of all known medicines contain at least one heterocycle, which is why chemists study them so much.

Try it

In the 3D, look at the pyridine ring and say aloud how many hydrogen atoms it has (five). Switch on the electron cloud and find the blue lone pair that is not inside the cloud. Then tap pyrrole and find the N–H. Predict: which of these two has a lone pair free to grab a hydrogen ion? Check against the pictures.

Key formulas and definitions

Worked examples

1. Count the carbon, hydrogen and nitrogen atoms in pyridine, and write its formula.

The ring has 5 carbons and 1 nitrogen. Each carbon holds one hydrogen, the nitrogen holds none. So 5 C, 5 H, 1 N: C₅H₅N.

2. Why is pyridine a weak base but benzene is not?

The N atom of pyridine has a lone pair in the ring plane that is not part of the π cloud, so it can accept H⁺. Benzene has no atom with a lone pair.

3. Count the π electrons in pyrrole and say whether it is aromatic.

Each of the 4 carbons gives 1 electron (4) and the nitrogen gives its lone pair (2). Total 6 π electrons in a flat ring, so pyrrole is aromatic.

4. Why does pyrrole not behave as a base the way pyridine does?

In pyrrole the nitrogen's lone pair is part of the shared 6-electron cloud. If it took H⁺ the ring would lose its aromatic stability, so pyrrole is not basic.

Common mistakes

Practice quiz

1. A heterocyclic ring contains:
2. Formula of pyridine:
3. Which is a five-membered ring with oxygen?
4. Pyridine is basic because:
5. Haem and chlorophyll are built from:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What are heterocyclic compounds in simple words?

They are ring-shaped molecules in which at least one atom of the ring is not carbon, for example nitrogen, oxygen or sulfur.

What is the difference between pyridine and benzene?

Benzene is C₆H₆, a ring of six carbons. Pyridine is C₅H₅N, with one carbon replaced by nitrogen. Pyridine is polar, mixes with water and is a weak base; benzene is none of these.

Why are heterocycles important?

They occur in vitamins, DNA bases, blood and plant pigments, and in a large share of medicines and dyes.

Learn first

Learn next

Related lessons

All Chemistry lessons