Anti-theft tags contain a tiny mechanical oscillator that is activated by a magnetic field. The detectors at a shop’s doorway can detect the oscillation magnetically. The tag can be activated and deactivated by magnetizing or demagnetizing it, respectively.