This paper introduces the recent progress in two-dimensional X-ray diffraction as well as its applications in microstructure and residual stress analysis. Based on the matrix transformation between diffraction space, detector space and sample space, the unit vector of the diffraction vector can be expressed in the sample space corresponding to all the geometric parameters and Bragg conditions. The same transformation matrix can be used for texture and stress analysis. The fundamental equations for both stress measurement and texture measurement are developed with the matrix transformation defined for the two-dimensional diffraction. Stress measurement using twodimensional detector is based on a direct relationship between the stress tensor and the diffraction cone distortion. The two-dimensional detector collects texture data and background values simultaneously for multiple poles and multiple directions.