A magnetic sensor comprising: a first magnetic detection element group and a second magnetic detection element group each of which including a plurality of magnetoresistive effect elements each in which a fixed magnetic layer and a free magnetic layer are laminated with a non-magnetic material layer interposed therebetween; and a first control unit and a second control unit configured to respectively process detection signals detected from a magnetic field by the magnetoresistive effect elements of the first magnetic detection element group and the second magnetic detection element group, wherein the fixed magnetic layer is of a self-pinned type in which a first magnetic layer and a second magnetic layer are laminated with a non-magnetic intermediate layer interposed therebetween and magnetization directions (D1, D2, D3, and D4) of the first magnetic layer and the second magnetic layer are fixed to be antiparallel to each other, and pinned magnetization directions of at least two magnetoresistive effect elements in the first magnetic detection element group and the second magnetic detection element group are different from each other, and the plurality of magnetoresistive effect elements of the first magnetic detection element group and the plurality of magnetoresistive effect elements of the second magnetic detection element group are arranged so that the magnetization directions (D1, D2, D3, and D4) thereof are symmetrical, wherein the first magnetic detection element group and the second magnetic detection element group are formed on a single element substrate, and characterised in that the plurality of magnetoresistive effect elements of the first magnetic detection element group and the plurality of magnetoresistive effect elements of the second magnetic detection element group are divided by a first virtual line K1 parallel to the Y-axis direction into combinations each of which includes four different magnetization directions and are arranged so that the magnetization directions (D1, D2, D3, and D4) thereof have point symmetry about a reference point on the element substrate, wherein the first magnetic detection element group and the second magnetic detection element group are configured to be disposed so that the magnetization directions have line symmetry about a second virtual line K2 that is parallel to the X-axis direction and the point of symmetry is the point of intersection between the first virtual line K1 and the second virtual line K2. a first magnetic detection element group and a second magnetic detection element group each of which including a plurality of magnetoresistive effect elements each in which a fixed magnetic layer and a free magnetic layer are laminated with a non-magnetic material layer interposed therebetween; and a first control unit and a second control unit configured to respectively process detection signals detected from a magnetic field by the magnetoresistive effect elements of the first magnetic detection element group and the second magnetic detection element group, wherein the fixed magnetic layer is of a self-pinned type in which a first magnetic layer and a second magnetic layer are laminated with a non-magnetic intermediate layer interposed therebetween and magnetization directions (D1, D2, D3, and D4) of the first magnetic layer and the second magnetic layer are fixed to be antiparallel to each other, and pinned magnetization directions of at least two magnetoresistive effect elements in the first magnetic detection element group and the second magnetic detection element group are different from each other, and the plurality of magnetoresistive effect elements of the first magnetic detection element group and the plurality of magnetoresistive effect elements of the second magnetic detection element group are arranged so that the magnetization directions (D1, D2, D3, and D4) thereof are symmetrical, wherein the first magnetic detection element group and the second magnetic detection element group are formed on a single element substrate, and characterised in that the plurality of magnetoresistive effect elements of the first magnetic detection element group and the plurality of magnetoresistive effect elements of the second magnetic detection element group are divided by a first virtual line K1 parallel to the Y-axis direction into combinations each of which includes four different magnetization directions and are arranged so that the magnetization directions (D1, D2, D3, and D4) thereof have point symmetry about a reference point on the element substrate, wherein the first magnetic detection element group and the second magnetic detection element group are configured to be disposed so that the magnetization directions have line symmetry about a second virtual line K2 that is parallel to the X-axis direction and the point of symmetry is the point of intersection between the first virtual line K1 and the second virtual line K2.