Hydrocarbons are an important class of compounds because they are readily available in large quantities and serve as a raw material for the synthesis of other classes of organic compounds. Natural gas which occurs in nature in large quantities is a mixture of hydrocarbons. Its main compound is methane. Petroleum is another major source of aliphatic hydrocarbons while coal is a source of aromatic hydrocarbons. Both petroleum and coal contain a complex mixture of hydrocarbons. Suitable methods are employed to obtain the desired hydrocarbon. Moreover, hydrocarbons can also be prepared in the laboratory when needed in small quantities by suitable chemical reactions.
Hydrocarbons are of many different types and their properties and structure differ from one class of hydrocarbon to another. For example alkanes, alkenes and alkynes differ in their chemical properties. Alkanes are quite unreactive. They undergo mainly substitution reactions under drastic conditions only. On the other hand, alkenes and alkynes are quite reactive and mainly undergo addition reactions. Alkanes, alkenes and alkynes show a definite trend in their physical properties within their group (homologous series).