i. Butter generally has saturated carbon chains while cooking oil generally has unsaturated carbon chains.
ii. Unsaturated hydrocarbons undergo hydrogenation (i.e.,addition of H2) in presence of a catalyst such as nickel or palladium.
iii. Thus, cooking oil can be hydrogenated to form fats (vanaspati ghee) while butter cannot be hydrogenated.

Note: The presence of unsaturation (in cooking oil) can be detected using bromine water test.