Patent attributes
First and second MR elements are provided with a plurality of element patterns each having a stacked structure. The stacked structure includes a free layer changing its magnetization direction depending on an external magnetic field, an intermediate layer generating no specific magnetization direction, and a pinned layer having magnetization pinned in a certain direction. The first and the second MR elements have a rotationally symmetrical relationship with each other around a central axis parallel to the directions of anisotropic magnetic fields of the free layer. In the initial condition, the resistance of the first MR element and the resistance of the second MR element are equal to each other. The resistances of the first and the second MR elements exhibit changes in opposite directions in accordance with a magnetic field to be detected. This provides a magnetic sensor permitting higher-precision detection of the magnetic field to be detected.