Let us consider a set of parallel lattice planes of a crystal seperated by a distance d apart, i.e. AB = d. Suppose a narrow beam of X-rays of wavelength (lamda) be incident upon these planes at an angle (theta) as shown in figure. The beam will be reflected in all directions by the atoms of various atomic planes. Because the refractive index of the matter of the crystal is very nearly equal to unity, there is practically no bending of the rays entering or leaving the crystal.

Consider a ray PA reflected at atom A in the direction AR from plane KL and another ray QB reflected at another atom B from plane MN in the direction BS. Now from the atom A, draw two perpendiculars AC and AD on the incident ray QB and reflected ray BS respectively. The path difference between these two rays is (CB+BD). The two reflected rays will be in phase or out of phase, will depend upon this path difference. When the path difference (CB+BD) is an integral multiple of the wavelength (lamda), then the

two reflected rays will reinforce each other and produce an intense spot. Thus the condition of reinforcement is CB + BD = n (lamda)

From figure,
angle PAT = angle QTK = theta
But angle PAC = 900
So, angle TAC = 90 - theta
Now angle TAB = 900
So, as angle TAC = 90 - theta, angle CAB = theta

Now in right angled triangle ACB,
sin (angle CAB) = sin (theta) = CB / AB = CB / d
So, CB = d sin (theta).

Similarly, it can be shown that BD = d sin (theta)

So, CB + BD = 2d sin (theta) = n (lamda)
where n = 1, 2, 3 ......... etc., for first order, second order, third order ...... etc., maxima respectively. This relation is known as Bragg's law.

X-ray diffraction technique can be used to analyze different types of crystal structures using Bragg's X-ray spectrometer.