Acetic acid is under the family
of carboxylic acids which has a carboxyl group –COOH bond attached to the alkyl
group. Alkyl group can be methyl (CH3-), ethyl (CH3CH2-) and so on. The term
acetic also means methyl. So combining the two gives CH3COOH or HCH3CO2. The H
before the C in HCH3CO2 means that it is the H attached to the O in the carboxyl
group –COOH. You cannot write it as C2H4O2 because it would represent a
different compound.