We review the recent use of functions of matrices in the analysis of graphs and networks, with special focus on centrality and communicability measures and diffusion processes. Both undirected and directed networks are considered, as well as dynamic (temporal) networks. Computational issues are also addressed.