In the mathematical field of geometric group theory, a length function is a function that assigns a number to each element of a group.