The global biodiversity crisis is one of humanity's most urgent problems, but even quantifying biological diversity is a difficult mathematical and conceptual challenge. This book brings new mathematical rigour to the ongoing debate. It was born of research in category theory, is given strength by information theory, and is fed by the ancient field of functional equations. It applies the power of the axiomatic method to a biological problem of pressing concern, but it also presents new theorems that stand up as mathematics in their own right, independently of any application. The question 'what is diversity?' has surprising mathematical depth, and this book covers a wide breadth of mathematics, from functional equations to geometric measure theory, from probability theory to number theory. Despite this range, the mathematical prerequisites are few: the main narrative thread of this book requires no more than an undergraduate course in analysis.