A diffraction grating element including a diffraction grating area which
includes: a first area that is one of two areas into which the
diffraction grating area is divided by a first straight line, and is
divided, by a second straight line perpendicular to the first straight
line, into a first sub-area having a first diffraction grating pattern
and a second sub-area having a second diffraction grating pattern, the
first and second diffraction grating patterns having different
diffraction angles; and a second area that is the other of the two areas
into which the diffraction grating area is divided by the first straight
line, and is divided into three or more divisional areas that align in a
direction perpendicular to the second straight line, the first and second
diffraction grating patterns being alternately assigned to each of the
divisional areas.