The actual physical size of your sensor matter as far as image quality goes too. Sensors come in a massive variety of sizes - cameraphone, APS-c, 1.5 crop, full frame, and of course, various film formats too. A 20MP sensor in a cameraphone will produce as large an image as a 20MP sensor from a DSLR, but the difference will be in the image quality. 20MP is still 20MP, and will produce the same size image, no matter what the camera is, or the sensor size. Now we'll find out what difference size makes. I've always been told size isn't important, but it turns out it is where sensors are concerned.
How sensors work, and the importance of Density
Here's a brief description of how picture sites on your sensor work - kept deliberately simple, as it’s really all you need to know. By all means start reading up on pixel pitch and so on, but trust me, this is all you actually need. The pixels are all lined up next to each other, and sensitive to light and colour. Essentially they record the amount and colour of light falling on them, then each pixel send it’s info off to be processed, and the processor inside the camera takes all the info and assembles it into a picture, then writes the file out onto the memory card.
Image sensors are usually set to work well in bright conditions. In order to work in lower light, they become more sensitive, and essentially this is done by turning the volume up on each site. Here's where sensor size starts to effect things. The density of the pixels on the sensor becomes very important. The closer they are to each other, the worse this “noise” gets as the increased sensitivity from the pixels ends up interfering with the signals from their neighbours.
The best way to desribe this is to think of a thousand people, all playing their stereos at home, all housed in an average suburban housing estate spread over a couple of square miles. You'd be able to hear your stereo very clearly, and maybe just make out the music from one of your neighbours. Now squeeze those same 1000 people into a block of flats, and even at the same volume, you'll be able to hear the music your neighbours are playing. If you all now turn your volume up (i.e. make the pixels more sensitive) it will becomes harder and harder to hear your music clearly.
An image we're familiar with by now - making the sensor more sensitive by turning up the ISO - increases the noise in the image.
As a practical example - I use a D4 and a D800 all the time - 16MP and 36 MP respectively. I always prefer the D4, despite it’s smaller resolution, if I’m shooting in low light, as the images look much cleaner. I should add that much of this noise can be removed and reduced via software, and as a rule, performance is increasing across the board, but physics is still physics - I wouldn’t want to use my 20MP Sony xperia in the dark ;)
Sensor size also affects depth of field. This was briefly covered before when we talked about exposure. Depth of field is best thought of as the area of an image either side of the point you focused on which is also in sharp focus. The actual precise science behind this can get quite confusing, and won’t actually help your day-to-day understanding of photography, so for now, let’s say that the larger the sensor, the less depth of field you’ll have. I promise you, we'll be covering it in more detail later