Vinegar is chemically acetic acid and its chemical formula is CH3COOH. Baking soda, on the other hand is sodium bicarbonate, which is a mild base. Its chemical formula is NaHCO3. Hence, when baking soda is added to vinegar, neutralisation reaction takes place and sodium acetate is formed along with water and carbon dioxide. Following is the chemical equation for the reaction
CH3COOH + NaHCO3 → CH3COONa + H2O + CO2