A magnetic sensor comprises magnetoresistive elements and permanent magnet
films, which are combined together to form GMR elements formed on a
quartz substrate having a square shape, wherein the permanent magnet
films are paired and connected to both ends of the magnetoresistive
elements, so that an X-axis magnetic sensor and a Y-axis magnetic sensor
are realized by adequately arranging the GMR elements relative to the
four sides of the quartz substrate. Herein, the magnetization direction
of the pinned layer of the magnetoresistive element forms a prescribed
angle of 45.degree. relative to the longitudinal direction of the
magnetoresistive element or relative to the magnetization direction of
the permanent magnet film. Thus, it is possible to reliably suppress
offset variations of bridge connections of the GMR elements even when an
intense magnetic field is applied; and it is therefore possible to
noticeably improve the resistant characteristics to an intense magnetic
field.