Shadows change length due to the constant change in the angle of the sun’s rays. Light falling on an opaque object casts a shadow in the opposite direction to the source of light.
When the angle of the sun’s rays or any other source of light is shallow, the shadow tends to be longer. As the sun climbs higher, the angle of the sun’s rays becomes steeper and, consequently, shadows become smaller. When the sun is exactly overhead, sunlight falls vertically downwards, and the shadow is shortest. Similarly, even if an artificial source of light is exactly overhead, the shadow is beneath the object and shortest.
At sunrise and sunset, shadows are long but very faint, as light is not intense.