Light leaves every point of the object in many directions, but the small opening admits only a narrow bundle. Rays from the top and bottom cross at the opening, so an inverted image appears on the opposite wall.
A smaller opening produces a sharper but dimmer image; a larger one admits more light but mixes neighbouring points together. Ibn al-Haytham described this principle in detail around 1021. No lens is required.






