How does a noise-cancelling headphone work?
A noise-canceling headphone can actively monitor the background noise and generate an opposite waveform to negate the noise and prevent it from reaching your ear. Sound is transmitted as waveforms in the air and the measurement of the sound is the amplitude. A noise-canceling device can generate an inverted waveform to match a noise peak with a trough and vice versa. When combining the noise waveform and the inverted waveform their amplitude becomes zero and the noise feels like it is canceled.
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction: How does a noise-cancelling headphone work?
### Input: 
### Response: A noise-canceling headphone can actively monitor the background noise and generate an opposite waveform to negate the noise and prevent it from reaching your ear. Sound is transmitted as waveforms in the air and the measurement of the sound is the amplitude. A noise-canceling device can generate an inverted waveform to match a noise peak with a trough and vice versa. When combining the noise waveform and the inverted waveform their amplitude becomes zero and the noise feels like it is canceled.