How active noise-cancelling headphones work, and why they can't cancel everything.
Start here β this is the source that inspired this exploration.
Active noise-cancelling headphones listen to the incoming sound and play back an inverted copy of it, timed so the two waves cancel at your eardrum. Model both waves as sine functions and add them: get the phase right and they cancel almost completely; get it slightly wrong and they don't. This is also why noise cancelling works far better on a low engine drone than on a crowd's chatter β wavelength matters. You can test this directly with two speakers and a phone microphone, mapping out where in a room two sound waves add up and where they cancel.