An X-ray imaging apparatus includes: an X-ray source including an electron source and a target, the target having a plurality of projections, each having an emitting surface a diffraction grating configured to diffract X rays emitted from the X-ray source and a detector configured to detect the X rays diffracted by the diffraction grating. Electron beams output from the electron source are incident on the emitting surfaces so that X rays are emitted from the emitting surfaces and are output to the diffraction grating. The X rays emitted from the emitting surfaces are diffracted by the diffraction grating so as to form a plurality of interference patterns. The projections are arranged such that bright portions of the interference patterns overlap each other and such that dark portions thereof overlap each other. Distances from the emitting surfaces to the diffraction grating are equal to each other.