Technically, it's interrogative. It's a question, and therefore a more polite way of telling someone to do something. You could also just say Take your hat off, but it would sound rude and condescending.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Anonymous the expression "would you mind..." is it an imperative?The expression " would you mind..." has nothing to do with imperative mood, and it always takes a gerund. Never infinitive. Would you mind getting some milk for me on your way back?