ref
head + master.
headmaster (n.)
principal of a school or seminary, 1570s, from head (adj.) + master (n.).