Method for producing a magnetic linear scale having the steps: a) determining a total length of the linear scale; b) producing a binary number sequence comprising "0" binary numbers and "1" binary numbers based on a binary pseudo random code comprising random numbers; c) establishing a desired division width in accordance with the total length of the linear scale and the number of binary numbers of the binary number sequence; d) producing an absolute track of the linear scale by means of magnetising the binary number sequence by a north pole or south pole being magnetised for each "0" binary number and a south pole or north pole being magnetised for each "1" binary number, wherein each north pole or south pole and each south pole or north pole has the desired division width, wherein the maximum length of the "0" binary number chains and the maximum length of the "1" binary number chains is five in each case; e) defining a measurement spacing from the linear scale and measuring the magnetisation of the absolute track with a sensor, wherein the sensor has the measurement spacing from the linear scale and measures measurement division widths of the north poles and the south poles of the absolute track; f) superimposing the absolute track of a remagnetisation in such a manner that the measurement division widths of the absolute track are within a tolerance value with respect to the desired division width, optionally repeated several times with step e; g) producing an incremental track of the linear scale by means of magnetising a "0-1" binary number pattern directly beside the absolute track by a north pole or south pole being magnetised for each "0" binary number and a south pole or north pole being magnetised for each "1" binary number, wherein each north pole and each south pole has the desired division width, h) measuring the magnetisation of the incremental track with the sensor, wherein the sensor has the measurement spacing from the linear scale and measures measurement division widths of the north poles and the south poles of the incremental track; i) superimposing the incremental track of a remagnetisation in such a manner that the measurement division widths of the incremental track are within a tolerance value with respect to the desired division width, optionally repeated several times with step h. a) determining a total length of the linear scale; b) producing a binary number sequence comprising "0" binary numbers and "1" binary numbers based on a binary pseudo random code comprising random numbers; c) establishing a desired division width in accordance with the total length of the linear scale and the number of binary numbers of the binary number sequence; d) producing an absolute track of the linear scale by means of magnetising the binary number sequence by a north pole or south pole being magnetised for each "0" binary number and a south pole or north pole being magnetised for each "1" binary number, wherein each north pole or south pole and each south pole or north pole has the desired division width, wherein the maximum length of the "0" binary number chains and the maximum length of the "1" binary number chains is five in each case; e) defining a measurement spacing from the linear scale and measuring the magnetisation of the absolute track with a sensor, wherein the sensor has the measurement spacing from the linear scale and measures measurement division widths of the north poles and the south poles of the absolute track; f) superimposing the absolute track of a remagnetisation in such a manner that the measurement division widths of the absolute track are within a tolerance value with respect to the desired division width, optionally repeated several times with step e; g) producing an incremental track of the linear scale by means of magnetising a "0-1" binary number pattern directly beside the absolute track by a north pole or south pole being magnetised for each "0" binary number and a south pole or north pole being magnetised for each "1" binary number, wherein each north pole and each south pole has the desired division width, h) measuring the magnetisation of the incremental track with the sensor, wherein the sensor has the measurement spacing from the linear scale and measures measurement division widths of the north poles and the south poles of the incremental track; i) superimposing the incremental track of a remagnetisation in such a manner that the measurement division widths of the incremental track are within a tolerance value with respect to the desired division width, optionally repeated several times with step h.