A displacement device with a first part and a second part which are displaceable relative to one another in at least an X-direction and a Y-direction perpendicular thereto, wherein the first part comprises a carrier which extends substantially parallel to the X-direction and the Y-direction and on which a system of magnets is fastened in a pattern of rows extending parallel to the X-direction and columns extending parallel to the Y-direction, wherein an equal distance is present each time between the rows and between the columns, wherein in each row and in each column magnets of a first kind (N) with a magnetization direction perpendicular to the carrier and directed to the second part and magnets of a second kind (Z) with a magnetization direction perpendicular to the carrier and directed away from the second part are positioned in alternation, and wherein a magnet of a third kind (H) with a magnetization direction directed from a magnet of the second kind (Z) to the magnet of the first kind (N) is arranged between the magnets of the first (N) and the second kind (Z), while the second part is provided with a system of electric coils with at least one electric coil of a first kind (C1), with current conductors situated in a magnetic field of the system of magnets and enclosing an angle of substantially 45° with the X-direction, and with at least one electric coil of a second kind (C2), also with current conductors (10) situated in the magnetic field of the system of magnets and enclosing an angle of substantially 45° with the X-direction but directed perpendicular to the current conductors of the first electric coil (C1), characterized in that the displacement device is provided with a number of sensors sensitive to magnetic fields, which sensors supply a signal which is dependent on the local mutual positions of the magnets of the first part relative to the electric coils of the second part in a region where these two parts overlap, the first part and the second part being independently movable relative to each other.