Magnet is a common and important item, which is widely used in daily life and industrial production. In daily life, magnets are often used to fix items, such as magnetic door seals and suction cups on refrigerator doors, which can ensure the freshness and safety of food. In addition, magnets are also used as decorations on furniture ornaments and photo holders on photo walls, bringing beauty and convenience to life. In industrial production, magnets are more widely used. Magnets are widely used in motors and generators, using magnetic force to achieve energy conversion and mechanical motion. In addition, magnets are also used in sensors and detection equipment to obtain information and monitor environmental changes by sensing changes in the magnetic field. For example, a compass is a sensor that uses magnets to help people orient themselves.