An imperative sentence tells or asks someone to do something. Commands, instructions, requests, and invitations can all take this form. In Leave your boots by the door, leave gives the instruction.

How to recognize it
Look for a base-form verb directing someone to act. The subject is usually the understood listener, you.
Examples explained
How to form an imperative
The main verb takes its base form. The person being addressed is usually the understood subject you. An imperative can include an explicit subject for emphasis, as in You hold the ladder, and I’ll climb.
Affirmative. Take a seat, please.
Negative. Don’t touch the wet paint. The usual pattern is do not or don’t followed by the base form. It also works with be, as in Don’t be late.
Imperatives in use
Have another slice is an invitation. Turn left at the bridge is a direction. Both are imperatives. Could you turn left at the bridge? can make the same request in question form. See directives for more ways to ask someone to act.
Common mix-up
A request need not be imperative in form. Could you help? is a question; Please help. is an imperative.
Quick check
Is “Have another slice” an imperative even though it is friendly?
Reveal the answer and explanation
Yes. It uses the base verb have with understood you. Imperatives can invite as well as command.