<p>A linear motor capable of solving such a problem in conventional linear motors that the accuracy of positioning a movable element is not sufficient. This linear motor comprises a primary member (2) on which permanent magnets are disposed along the forward moving direction and a secondary member on which armatures are disposed along the forward moving direction. The primary member (2) and the secondary member are moved relative to each other. A projection (21) is formed on each of the front and rear surfaces of the primary member (2) along the forward moving direction. A relative position detection means for detecting the positions of the primary member and the secondary member relative to each other is provided on the projection (21). In this linear motor, the rigidly of the primary member is increased and a scale is accurately read, and whereby the movable element can be accurately positioned.</p>