**Functions of matrices** Diagonalisation of matrices can be used when calculating functions of matrices f(

**A**). If the matrix A is diagonal f(

**A**) can be calculated as f(

**A**) = f(A

_{ii}) for all values of i.

In general when we have a matrix A it is not diagonal. The proces of obtaining f(

**A**) is to diagonalise A to give the diagonal matrix B. We can compute f(

**B**) by computing f(B

_{ii}) for all the diagonal elements (all i)

To obtain the diagonal matrix

**B** of matrix

**A** you need to find the diagonalisation matrix

**U**:

**B**=

**U**^{†}AU How you can do this is explained in:

Transformation of operator in another basis set

http://www.oraxcel.com/cgi-bin/yabb2/YaBB.pl?num=1201207384 After computing the function of the diagonal elements of the matrix the function can be applied to the diagonal matrix elements f(B

_{ii}). We get a new matrix, say C where C

_{ii} = f(B

_{ii}) on the diagonal.

To give the answer for f(

**A**) we just need to reverse the diagonalisation. Suppose

**D** is the resulting matrix of f(

**A**). We use the following to obtain

**D**.

f(

**A**) =

**D** =

**UCU**^{†} Another way to write this is using f(

**B**) where

**B** is the diagonal of

**A**:

f(

**A**) =

**D** =

**U**f(

**B**)

**U**^{†}