Rules for Naming Hydrocarbons:-
Rule-I Selection of the longest carbon chain.
Rule-II Numbering the longest chain: Longest chain is numbered starting from a terminal carbon. Numbering is done is such a way that lowest possible number is given to the side chain or a functional group.
Rule-III Writing names of branched, saturated hydrocarbons, locants are written first in alphabetical order followed by name of parent chain.
Rule-IV Some common names are retained in IUPAC system for unsubstituted hydrocarbon only.
(Refer to Image 1)
−COOH group is given preference while numbering than −OH group. So,
(Refer to Image 2)
4−hydroxy−2−methyl−pentanoic acid.