Express puzzlement or perplexity, think hard, as in They scratched their heads over this vexing question, but no one knew the answer. Although literally scratching one's head may simply betoken the fact that it itches, it also may indicate mental mystification or bewilderment. The term's figurative use dates from the first half of the 1900s.
The American Heritage® Idioms Dictionary Copyright © 2002, 2001, 1995 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company.