Originally Posted by
McQ
The two* main factors controlling depth of field are aperture and subject magnification. Aperture is pretty straightforward: larger apertures (smaller f/number's) decrease depth of field. Magnification is where it gets more complicated, because it's actually comprised of two parameters at once: subject distance AND focal length. However, the net result is that higher magnification decreased depth of field for a given aperture.
Yes, focal length does not affect depth of field, but only if the magnification is kept constant. If you stay at the same distance from your subject, using a longer focal length will decrease the depth of field (because this increases subject magnification). This is where sensor size comes into play. At the same subject distance, a larger sensor necessitates that you use a longer focal length in order to produce the same composition. However, this causes the depth of field to decrease, so you also have to use a smaller aperture in order to produce a similar-looking image (both in terms of DoF and composition).
I think a big source of confusion is with the meaning of the word "magnification"; this isn't how big the subject appears in the image, but how much they have been enlarged in absolute terms (on your sensor itself). A larger sensor needs to magnify a subject more in order for the light from this subject to fill the sensor area.
*of course, one's definition of the circle of confusion also affects DoF, but for relative comparisons this value is fixed and standard, so it's irrelevant for the above discussion. Focal length also comes into play a little, but only for extremes of magnification.