A method of X-ray analysis comprising: making X-ray fluorescence measurements to determine the elemental composition of a sample ; making an X-ray diffraction measurement in transmission by directing X-rays from an X-ray source at the energy E onto a sample at an incident angle ψ 1 to the surface of the sample and measuring a measured intensity I d (θ fl ) of the diffracted X-rays at the energy E with an X-ray detector at an exit angle ψ 2 corresponding to an X-ray diffraction peak of a predetermined component; and characterised by making a correction measurement of X-rays by measuring the transmitted intensity of X-rays at an energy E transmitted directly through the sample without deviation; calculating a matrix corrected X-ray intensity using the measured X-ray intensity in the X-ray diffraction measurement, the correction measurement and the mass attenuation coefficient of the sample calculated from the elemental composition and the mass attenuation coefficients of the elements, wherein calculating the mass attenuation coefficient μ(E) of the sample from the sum for all sample components μ E = ∑ i = 1 i = nel w i μ i E where w i is the fraction of a sample component, and μ i is the mass attenuation coefficient of the respective sample components, and wherein the matrix corrected measurement intensity I dc is calculated from I dc = I d θ fl M fl with the matrix correction factor M fl calculated by: M fl = e − μ ⋅ ρ ⋅ d ⋅ cos ecψ 2 − e − μ ⋅ ρ ⋅ d ⋅ cos ecψ 1 μ ⋅ cos ecψ 1 − cos ecψ 2 using the product μρd calculated from the correction measurement and the mass attenuation coefficient μ of the sample calculated from the elemental composition determined from the X-ray fluorescence measurements. making X-ray fluorescence measurements to determine the elemental composition of a sample ; making an X-ray diffraction measurement in transmission by directing X-rays from an X-ray source at the energy E onto a sample at an incident angle ψ 1 to the surface of the sample and measuring a measured intensity I d (θ fl ) of the diffracted X-rays at the energy E with an X-ray detector at an exit angle ψ 2 corresponding to an X-ray diffraction peak of a predetermined component; and characterised by making a correction measurement of X-rays by measuring the transmitted intensity of X-rays at an energy E transmitted directly through the sample without deviation; calculating a matrix corrected X-ray intensity using the measured X-ray intensity in the X-ray diffraction measurement, the correction measurement and the mass attenuation coefficient of the sample calculated from the elemental composition and the mass attenuation coefficients of the elements, wherein calculating the mass attenuation coefficient μ(E) of the sample from the sum for all sample components μ E = ∑ i = 1 i = nel w i μ i E where w i is the fraction of a sample component, and μ i is the mass attenuation coefficient of the respective sample components, and wherein the matrix corrected measurement intensity I dc is calculated from I dc = I d θ fl M fl with the matrix correction factor M fl calculated by: M fl = e − μ ⋅ ρ ⋅ d ⋅ cos ecψ 2 − e − μ ⋅ ρ ⋅ d ⋅ cos ecψ 1 μ ⋅ cos ecψ 1 − cos ecψ 2 using the product μρd calculated from the correction measurement and the mass attenuation coefficient μ of the sample calculated from the elemental composition determined from the X-ray fluorescence measurements. <EOS>