A potentiometer includes a magnetoresistive element made of ferromagnetic material. A device applies a magnetic field to the magnetoresistive element. An absolute value of the magnetic field applied to the magnetoresistive element is equal to or greater than a saturation magnetic field with respect to the ferromagnetic magnetoresistive element. The magnetic field applying device is movable relative to the magnetoresistive element.