<p>A position detector comprising a magnetic flux detection means having at least one set of two Hall sensors arranged on a substrate, and a rectangular parallelepiped magnet arranged movably in a predetermined direction in a plane parallel with the substrate. Two Hall sensors in each set are arranged on the substrate such that the line connecting the centers of magnetosensitive portion of two Hall sensors in each set intersects the moving direction of the rectangular parallelepiped magnet perpendicularly. When the rectangular parallelepiped magnet is projected to an arbitrary plane parallel with the substrate, its quadrangle has a long side and a short side and the long side has a predetermined inclination angle against the line connecting the centers of the magnetosensitive portion of two Hall sensors in each set. The rectangular parallelepiped magnet has one N pole and one S pole magnetized perpendicularly to the substrate on which the Hall sensor is arranged and the magnetosensitive direction of the Hall sensor is perpendicular to the direction of the substrate.</p>