Acid generally softens vegetables by breaking down cell walls, but it can also firm them depending on the concentration and cooking time. The effect depends on the specific vegetable and cooking method.
Acids, such as vinegar, lemon juice, or tomatoes, interact with the pectin and cellulose in vegetable cell walls. Pectin is a structural polysaccharide that helps hold plant cells together. When vegetables are cooked in an acidic environment, the acid hydrolyzes the pectin, breaking it down and causing the vegetable to soften. This is why adding tomatoes to a long-simmered stew will cause the vegetables to become more tender.
However, acid can also have a firming effect on some vegetables, particularly those with high chlorophyll content, like green beans or broccoli. In this case, the acid reacts with the chlorophyll, converting it to pheophytin, which is a dull olive-green color and also strengthens the cell walls, resulting in a firmer texture. This firming effect is more pronounced when the vegetables are cooked for a shorter period in a highly acidic environment. The acid essentially 'sets' the outer layers of the vegetable.
The concentration of the acid and the cooking time are crucial factors. A small amount of acid added late in the cooking process might only slightly soften the vegetables, while a large amount of acid added early on could significantly alter the texture.
If you want to prevent vegetables from becoming too soft when cooking with acidic ingredients, add the acid later in the cooking process or use a smaller amount. For example, when making tomato sauce with vegetables, sauté the vegetables first and add the tomatoes towards the end to maintain a slightly firmer texture.