The present invention has an object to provide a nuclear magnetic resonance imaging apparatus or the like that avoids a region with zero sensitivity of an optical magnetometer and allows imaging by strong magnetic resonance when a common magnetic field is used as a bias field of an optical magnetometer and as a magnetostatic field to be applied to a sample. When a direction of a magnetostatic field application unit applying a magnetostatic field to a sample is a z direction, alkali metal cells of a plurality of scalar magnetometers are arranged so as not to overlap a region to be imaged in a z direction, and so as not to intersect the region to be imaged in an in-plane direction perpendicular to the z direction.