What is the function of a magnet in an audio speaker? — EB
An audio speaker generates sound by moving a surface back and forth through the air. Each time the surface moves toward you, it compresses the air in front of it and each time the surface moves away from you, it rarefies that air. By doing this repetitively, the speaker forms patterns of compressions and rarefactions in the air that propagate forward as sound.
The magnet is part of the system that makes the surface move. Attached to the surface itself is a cylindrical coil of wire and this coil fits into a cylindrical channel cut into the speaker’s permanent magnet. That magnet is carefully designed so that its magnetic field lines radiate outward from the inside of the channel to the outside of the channel and thus pass through the cylindrical coil the way bicycle spokes pass through the rim of the wheel.
When an electric current is present in the wire, the moving electric charges circulate around this cylinder and cut across the magnetic field lines. But whenever a charge moves across a magnetic field line, it experiences a force known as the Lorenz force. In this case, the charges are pushed either into or out of the channel slot, depending on which way they are circulating around the coil. The charges drag the coil and surface with them, so that as current flows back and forth through the coil, the coil and surface pop in and out of the magnet channel. This motion produces sound.