What Are Hydrocarbons? Carbon and Hydrogen Compounds Explained
By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.
Hydrocarbons are compounds made only from carbon and hydrogen atoms. Their structures can be simple or complex, but the ability of carbon atoms to bond with one another allows hydrocarbons to form chains, branches, and rings with many different properties.
Carbon's four bonds
Carbon can form four covalent bonds, which gives it great flexibility in building molecular structures. A carbon atom can bond to hydrogen and to other carbon atoms, making long chains or closed rings. Even compounds with the same numbers of carbon and hydrogen atoms can have different arrangements, creating isomers with different structures.
When learning about hydrocarbons, a useful first division is between saturated and unsaturated compounds. Alkanes are saturated hydrocarbons because their carbon atoms are connected by single bonds. Alkenes contain at least one carbon-carbon double bond and are unsaturated. That double bond changes how the molecules react, so alkenes often take part in reactions that alkanes do not under the same conditions.
As hydrocarbon molecules get larger, their physical properties change. Small hydrocarbons can be gases at room conditions, while larger ones may be liquids or solids. Boiling points generally rise as molecular size increases because larger molecules experience stronger intermolecular attractions. This helps explain why mixtures such as crude oil can be separated into fractions with different boiling ranges.
Combustion and why structure matters
Another important part of hydrocarbons is combustion. When a hydrocarbon burns completely in plentiful oxygen, its carbon atoms form carbon dioxide and its hydrogen atoms form water. The reaction releases energy, which is why many hydrocarbons are used as fuels. Complete combustion is an idealised case, however, and real flames do not always receive enough oxygen everywhere.
With limited oxygen, incomplete combustion can produce carbon monoxide or solid carbon along with water and other products. Carbon monoxide is toxic because it interferes with oxygen transport in the body. Soot particles can also contribute to air pollution. Burning fossil hydrocarbons releases carbon dioxide that had been stored underground, adding to the amount of this greenhouse gas in the atmosphere.
Hydrocarbons are also starting materials for many useful chemicals and materials. Chemists can break large molecules into smaller ones, add atoms to double bonds, or use small unsaturated molecules to build polymers. The important habit is to connect molecular structure with behaviour. A single bond, double bond, chain length, or branch can change what reactions are likely and what physical properties you observe. Naming hydrocarbons becomes easier when you look for patterns instead of memorising isolated words. The beginning of a name often tells you how many carbon atoms are in the main chain, while the ending can signal the type of carbon-carbon bonding. Structural formulas are especially useful because two molecules can share a molecular formula but connect their atoms differently. Drawing the bonds lets you see branches, double bonds, and likely reaction sites more clearly. This is why structural formulas matter so much in organic chemistry. They show not only which atoms are present, but how the carbon framework is arranged and where reactions are most likely to occur.
Triple bonds, rings and aromatic compounds
Alkanes and alkenes are only part of the hydrocarbon family. Alkynes contain at least one carbon-carbon triple bond. The simplest, ethyne, is better known as acetylene, and it burns with oxygen at a very high temperature, which is why it is used in welding and cutting torches. Carbon chains can also close into rings. Cyclohexane, for example, has six carbon atoms joined in a ring by single bonds, so it behaves much like an alkane even though its shape is different.
Benzene is a special ring of six carbon atoms. Its bonding electrons are spread evenly around the whole ring rather than fixed in alternating single and double bonds, which makes the molecule unusually stable. As a result, benzene and related aromatic compounds tend to swap a hydrogen atom for another group rather than adding atoms across a double bond as alkenes do. A classic test also helps separate families: orange bromine water loses its colour when shaken with an alkene, but not with an alkane.
Why branching changes a hydrocarbon
Butane and methylpropane share the same formula, C4H10, yet they behave differently. Butane is an unbranched chain of four carbon atoms and boils at around minus one degree Celsius. Methylpropane, also called isobutane, has three carbons in a row with the fourth attached to the middle one, and it boils at around minus twelve degrees. The branched molecule is more compact, so neighbouring molecules touch over a smaller surface and the forces holding the liquid together are weaker. Less energy is needed to pull them apart, so the boiling point is lower.
Branching matters in engines as well. In a petrol engine, the fuel and air mixture should burn smoothly after the spark. Some fuels instead ignite too early under compression, causing a damaging effect called knocking. Long straight chains such as heptane knock easily, while heavily branched molecules resist it. The octane rating on a petrol pump is based on this comparison: a branched molecule commonly called isooctane is given a score of 100 and heptane a score of 0, and a fuel is rated by which mixture of the two it behaves like.
Hydrocarbons made by living things
It is easy to think of hydrocarbons only as fossil fuels, but living things make many of them. Plants produce a large family called terpenes, built from units of five carbon atoms. Limonene, which gives orange peel its smell, is a hydrocarbon, and so is beta-carotene, the orange pigment in carrots. Natural rubber is a long polymer made from isoprene units, and many trees release isoprene gas into the air on warm days. The waxy coating that makes cabbage leaves and apple skins shed water contains long-chain alkanes, which repel water for the same reason oil does.
Animals use hydrocarbons too. An insect's outer surface is coated with a thin film of them that limits water loss, and in many ants and bees the exact mixture works as a chemical identity card, helping colony members tell nestmates from intruders. Methane, the simplest hydrocarbon, is released by microbes living in waterlogged soils, rice paddies and the stomachs of cattle. Hydrocarbons even exist on other worlds. Saturn's moon Titan, far colder than Earth, has lakes and seas of liquid methane and ethane on its surface, a chemistry that would be gaseous here.
Putting numbers on burning fuel
Balancing a combustion equation shows why burning a fuel makes more carbon dioxide than the weight of the fuel itself. Methane, the main part of natural gas, has the formula CH4. Each molecule reacts with two oxygen molecules to give one molecule of carbon dioxide and two of water. Using relative masses, 16 grams of methane becomes 44 grams of carbon dioxide, about two and three quarter times as much, and the extra mass is oxygen taken from the air. For octane, a typical petrol molecule, two molecules need twenty-five oxygen molecules and produce sixteen carbon dioxide and eighteen water molecules.
Run the same arithmetic for petrol and each kilogram burned releases a little over three kilograms of carbon dioxide, so a litre of petrol, weighing roughly three quarters of a kilogram, produces about 2.3 kilograms. The equations also show why methane is described as a lower-carbon fossil fuel. A larger share of its energy comes from forming water rather than carbon dioxide, so it releases considerably less carbon dioxide than coal for the same amount of heat. They also show why flames need plenty of air: one volume of methane needs two volumes of oxygen, which means nearly ten volumes of air.
The takeaway
Hydrocarbons are compounds containing only carbon and hydrogen. Alkanes have only single carbon-carbon bonds, while alkenes include double bonds and are more reactive in several common reactions. Hydrocarbon size and structure affect boiling point and behaviour, while combustion explains both their usefulness as fuels and some of their environmental consequences.