Which one of the following statements is correct? Is it possible to please help me with the English rule on this one?
- The stranger knocked on the door.
- The stranger knocked at the door.
Both are correct and, absent additional context, are very close in meaning. They do not, however, mean exactly the same thing.
He knocked on the door gives a slight emphasis to the physical act of knocking by focusing on the object subjected to the knocking.
He knocked at the door gives a slight emphasis to the social act of waiting for an invitation to enter the premises by focusing on where the act occurred.
For example, it would sound very odd to say He knocked at the door and then immediately kicked it open.
They are both correct and basically mean the same thing, but, from a more technical perspective, there is a small, I'd even say tiny, difference between them:
The stranger was knocking on the door itself.
The stranger was (possibly) knocking on something else while he was standing next to the door.
In the second sentence, at specifically expresses the location where the knocking took place. It happened near the door where the stranger was standing. It could have been the door, but it might just as well have been something else that the stranger was knocking on. This is in principle similar to how we use the preposition at when talking about places as locations. For instance:
I'll meet you at Bob's.
The location is Bob's place (the house or apartment where he lives). That's the place where the act of meeting you will take place.
Take a look at these examples:
He knocked on the door in hopes that someone would open it.
He got so scared that he could barely move when he heard a loud knock at the door.
In the second sentence, we don't care about the fact that the knock was on the door. For all intents and purposes, it might have been something else other than the door. We're more concerned about the location where it happened—where the sound of knocking came from.
If you hit a door, window, etc., especially several times, to attract someone's attention, you can use the preposition on or at after the verb/noun "knock". There's no difference in meaning. For examples:
He knocked on/at the door.
I heard a knock on/at the door.