Text this: Diagonalization matrix and its application in distribution theory