In organic chemistry, a hydrocarbon is an organic compound consisting entirely of hydrogen and carbon. With relation to chemical terminology, aromatic hydrocarbons or arenes, alkanes, alkenes and alkyne-based compounds composed entirely of carbon or hydrogen are referred to as "pure" hydrocarbons, whereas other hydrocarbons with bonded compounds or impurities of sulphur or nitrogen, are referred to as "impure", and remain somewhat erroneously referred to as hydrocarbons.
Hydrocarbons are referred to as consisting of a "backbone" or "skeleton" composed entirely of carbon and hydrogen and other bonded compounds, and lack a functional group that generally facilitates combustion.
The majority of hydrocarbons found naturally occur in crude oil, where decomposed organic matter provides an abundance of carbon and hydrogen which, when bonded, can catenate to form seemingly limitless chains.
Because of differences in molecular structure, the empirical formula remains different between hydrocarbons; in linear, or "straight-run" alkanes, alkenes and alkynes, the amount of bonded hydrogen lessens in alkenes and alkynes due to the "self-bonding" or catenation of carbon preventing entire saturation of the hydrocarbon by the formation of double or triple bonds.
This inherent ability of hydrocarbons to bond to themselves is referred to as catenation, and allows hydrocarbon to form more complex molecules, such as cyclohexane, and in rarer cases, arenes such as benzene. This ability comes from the fact that bond character between carbon atoms is entirely non-polar, in that the distribution of electrons between the two elements is somewhat even due to the same electronegativity values of the elements and does not result in the formation of an electrophile.
Generally, with catenation comes the loss of the total amount of bonded hydrocarbons and an increase in the amount of energy required for bond cleavage due to strain exerted upon the molecule; in molecules such as cyclohexane, this is referred to as ring strain, and occurs due to the "destabilized" spatial electron configuration of the atom.
In simple chemistry, as per valence bond theory, the carbon atom must follow the "4-hydrogen rule", which states that the maximum number of atoms available to bond with carbon is equal to the number of electrons that are attracted into the outer shell of carbon. In terms of shells, carbon consists of an incomplete outer shell, which comprises 4 electrons, and thus has 4 electrons available for covalent or dative bonding.
Gasoline, fuel oil, and other petroleum products are referred to as "hydrocarbons," although they usually also contain additives from other chemical groups.