The strength of an acid depends on the stability of its conjugate anion. A stable anion is a weak base, while its corresponding acid is strong.
Several factors influence the stability of the anions.
Consider two anions containing atoms from the same column. The bigger atom spreads the negative charge over a larger space volume, which makes its anion more stable, and the corresponding acid stronger.
When anions containing atoms in the same row are compared, the electronegativity of the atom carrying the charge dominates the anion’s stability.
The more electronegative atom stabilizes the negative charge to give a stable base and hence, a strong acid.
If anions with the negative charge on the same atom are compared, their stability depends on the resonating structures.
For example, the ethoxide ion has no resonance structure, but the methanesulfonate ion has three in which the charge is delocalized over three atoms.
As such, methanesulfonic acid — with a resonance-stabilized conjugate base — is a stronger acid than ethanol.
An electronegative substituent, when placed adjacent to the negatively charged region, withdraws electron density from that region via induction, thereby stabilizing the negative charge on the anion.
As the point of substitution moves farther away from the negative region, the stability of the anion decreases. Therefore, 4-chlorobutanoic acid is weaker than 2-chlorobutanoic acid.
Now suppose alkynes, alkenes, and alkanes are compared. Their protons’ relative acidity depends on the hybridization of the carbon atom that carries the negative charge in their corresponding conjugate bases.
Electrons in an sp-hybridized carbon are much closer to the nucleus than the electrons in an sp2 or sp3 hybridized carbon atom.
Therefore, the charge on an sp carbon is the most stable, making the alkyne anion more stable than an alkene anion, which is more stable than an alkane anion.
Conclusively, alkynes are the strongest acids in a given series, alkanes are the weakest acids, and alkenes are in-between.