Graph theory is my favourite topic in mathematics and computing science and in this blog post I’ll introduce *an algebra of graphs* that I’ve been working on for a while. The algebra has become my go-to tool for manipulating graphs and I hope you will find it useful too.

The roots of this work can be traced back to my CONCUR’09 conference submission that was rightly rejected. I subsequently published a few application-specific papers gradually improving my understanding of the algebra. The most comprehensive description can be found in ACM TECS (a preprint is available here). Here I’ll give a general introduction to the simplest version of the algebra of graphs and show how it can be implemented in Haskell.

**Update:** This series of blog posts was published as a functional pearl at the Haskell Symposium 2017.