A magnetic sensor includes a magnetoresistance element having a peak of a
thermal fluctuation strength of magnetization under a magnetic field
having a certain frequency, a frequency filter connected to the
magnetoresistance element and having its transmittance decreased or
increased in substantially the frequency of the magnetic field to output
a signal corresponding substantially to the peak of the thermal
fluctuation strength of magnetization, and a detector connected to the
frequency filter to detect the magnetic field based on the signal of the
frequency filter.