Step 1: Understanding the Concept:
To name a carboxylic acid by the IUPAC system, pick the longest carbon chain that contains the \( \mathrm{-COOH} \) carbon. That carbon is always C-1.
The ending -e of the parent alkane is replaced by -oic acid. If there are two \( \mathrm{-COOH} \) groups at the two ends of a chain, the ending becomes -dioic acid.
Other groups on the chain are written as prefixes in alphabetical order, with their locants.
Step 2: Name (a) Lactic acid:
The structure of lactic acid is \( \mathrm{CH_3-CH(OH)-COOH} \).
The chain has 3 carbons, so the parent is propane and the acid is propanoic acid.
The \( \mathrm{-OH} \) group sits on C-2, the carbon next to the carboxyl carbon, so it is written as 2-hydroxy.
So lactic acid is 2-hydroxypropanoic acid.
Step 3: Name (b) Tartaric acid:
The structure of tartaric acid is \( \mathrm{HOOC-CH(OH)-CH(OH)-COOH} \).
The chain has 4 carbons with a \( \mathrm{-COOH} \) group at each end, so the parent is butanedioic acid.
Numbering from either end, the two \( \mathrm{-OH} \) groups fall on C-2 and C-3.
So tartaric acid is 2,3-dihydroxybutanedioic acid.
Final Answer:
Lactic acid is 2-hydroxypropanoic acid and tartaric acid is 2,3-dihydroxybutanedioic acid.
\[ \boxed{\text{(a) 2-Hydroxypropanoic acid, (b) 2,3-Dihydroxybutanedioic acid}} \]