An encoder comprising: a scale plate arranged movably in a predetermined operational direction (α); a plurality of light relay portions which are formed along the operational direction (α) in the scale plate and each of which is comprised of a one-dimensional array of some of light propagation portions and light nonpropagation portions arranged in a direction perpendicular to the operational direction (α); a light source device for projecting light toward the light relay portions; a light detecting device which is arranged to receive the light projected by the light source device, through any of the light relay portions, which has a light receiving region comprised of a two-dimensional array of pixels arranged in the operational direction (α) and in the direction perpendicular to the operational direction (α), and which outputs light intensity profile data indicating a one-dimensional profile of intensity of incident light in each of the operational direction (α) and the direction perpendicular to the operational direction (α); wherein each of the light relay portions has a pattern of the one-dimensional array of some of the light propagation portions and light nonpropagation portions different from those of the other light relay portions; wherein reference light propagation portions are formed in the scale plate and on respective first lines passing the corresponding light relay portions along the direction perpendicular to the operational direction (α), the encoder further comprising a processing unit configured to identify the light relay portion having relayed the light from the light source device to the light detecting device, with respect to a position of the reference light propagation portion, based on the light intensity profile data in the direction perpendicular to the operational direction (α), thereafter to calculate a position of the light relay portion relative to a reference position in the light receiving region, based on the light intensity profile data in the operational direction (α), and to find an operation absolute value of the scale plate from the position of the light relay portion. a scale plate arranged movably in a predetermined operational direction (α); a plurality of light relay portions which are formed along the operational direction (α) in the scale plate and each of which is comprised of a one-dimensional array of some of light propagation portions and light nonpropagation portions arranged in a direction perpendicular to the operational direction (α); a light source device for projecting light toward the light relay portions; a light detecting device which is arranged to receive the light projected by the light source device, through any of the light relay portions, which has a light receiving region comprised of a two-dimensional array of pixels arranged in the operational direction (α) and in the direction perpendicular to the operational direction (α), and which outputs light intensity profile data indicating a one-dimensional profile of intensity of incident light in each of the operational direction (α) and the direction perpendicular to the operational direction (α); wherein each of the light relay portions has a pattern of the one-dimensional array of some of the light propagation portions and light nonpropagation portions different from those of the other light relay portions; wherein reference light propagation portions are formed in the scale plate and on respective first lines passing the corresponding light relay portions along the direction perpendicular to the operational direction (α), the encoder further comprising a processing unit configured to identify the light relay portion having relayed the light from the light source device to the light detecting device, with respect to a position of the reference light propagation portion, based on the light intensity profile data in the direction perpendicular to the operational direction (α), thereafter to calculate a position of the light relay portion relative to a reference position in the light receiving region, based on the light intensity profile data in the operational direction (α), and to find an operation absolute value of the scale plate from the position of the light relay portion.