Controlling Depth of Field with Aperture

This article is very basic and is intended for novice photographers who don't have a good understanding of how aperture can change depth of field. It starts with definitions, has a series of examples, then shows how you can use the markings on your lens to determine depth of field.
Depth of Field is the in-focus range or distance of a picture. For example, if the depth of field is from 7 to 15 feet, then everything that is between 7 and 15 feet away from the camera lens will be "in focus." There is a technical definition of what "in focus" means, but we won't get into that. A small, narrow, or shallow depth of field means that only a small range of distance is in focus, while everything else is out of focus. The picture above shows a very narrow depth of field and was taken with a 1:2 macro lens. A 1:2 macro lens will create an image on the film or digital sensor that is half the actual size of the object. If you take a picture of a ruler at 1:2, one inch of the ruler will take up 0.5" of film (or sensor distance).
Aperture is the f-stop setting of your lens. The number is a ratio of the focal length to the size of the lens opening. At 50mm lens set at f/2 will result in a 25mm lens opening. A large number like f/22 refers to a small opening, while a small number like 1:1.7 refers to a large opening. A wide or large aperture refers to the size of opening width, not the f-stop number, so f/1.4 is a wide aperture, despite the small number. Similarly, a small aperture refers to a small opening, which corresponds to large numbers. f/16, f/22, and f/32 are all small aperture settings (for 35mm camera anyway).
The larger the aperture, the smaller the depth of field, and the smaller the aperture, the wider the depth of field.
The following series of pictures was taken with the camera on a tripod and the lens was focussed on the text of the closest knife. Only the aperture and shutter speed were changed (while keeping the exposure consistent). At f/1.7, very little of the frame is in focus while at f/22, almost the entire scene is in focus. While more of the scene will be in focus as you decrease the aperture, the sharpness of the image decreases at small apertures due to diffraction.
Most 35mm lenses will be sharpest around f/8, but try not to let the desire for sharpness get in the way of creativity. Since your lens doesn't close down until the picture is taken, you will always be viewing the scene through the largest aperture (like the first picture below). Some cameras have depth-of-field preview, which closes down the lens without taking a picture and will let you see what the depth of field actually looks like.









Most lenses have markings on them that will allow you to determine the depth of field simply by looking at the lens.
The picture below shows an SMC Pentax-A 1:1.7/50mm lens set at f/22 and
focussed on a distance of about 13 feet. The marks circled in
green show the depth of field for the lens' current setting: from infinity to
about 6 feet. This setting is called the hyper-focal
distance, because the depth of field just manages to get to infinity. If the lens was set at f/16, the depth of
field would be from 10 metres to 2 metres.

The image below shows an SMC Pentax 1:3.5/28mm lens set at f/22 and focussed
on a distance of about 4 feet. It is also a hyper-focal
setting, as everything from infinity to about 2 feet is in focus.

The image below shows MIR 47K 1:2.5/20mm lens set at f/22 and focussed on a
distance of about 2.3 feet. The depth of field is from infinity to about 1.3
feet. This is also a hyper-focal setting, but the lens doesn't have to be
set to f/22 to be at the hyper-focal distance; as long as the infinity
symbol lines up with the making of the aperture number, the lens is at a hyper-focal
distance. If the lens was set to f/11, the depth of field would be 4 feet to 1.6
feet.
