Magnets used in motors