Bar magnets are narrow, rectangular pieces of ferromagnetic material or composite that generate a magnetic field. They are permanent magnets, meaning they do not require constant electric current in order to retain their magnetism, and they have a smooth and uniform cross section and surface.