Amphoteric surfactants contain both anionic and cationic groups, which allow them to behave like both acids and bases. This dual nature makes them highly adaptable, enabling them to function effectively in various pH environments. Common examples include betaines and amine oxides, often used in formulations for shampoos, conditioners, and mild skin cleansers.