A very accurate 8X8 matrix approach to dynamical theory of X-ray diffraction in which fewer approximations are made than in the classic vonLaue approach, is described here. The method is related to the very general matrix method of Kokushima and Yamakito, and is particularly suited to numerical solution with a computer. It can be used to solve problems in ideal, undistorted crystals with high precision even at near grazing incidence without special consideration of refraction or external reflection. It is also easy to apply to problems where periodicity of oblique Bragg planes varies in the direction normal to the surface. Such strain may be induced, for example, by variation of composition with depth. Certain problems wherein simultaneous diffraction by two sets of Bragg planes occurs can also be treated by this approach.