A function that determines which category, or bucket, to put an element in. A hash function is needed when implementing a hash table.