You will constantly encounter resolution, dpi, file size in digital photography; knowing their meaning is as elementary as ”please“ and ”thank you“ when learning a new language.
Pixel | Digital photos represent images in a grid of dots, called pixels. It is a made-up word, formed from picture element.
Resolution | The resolution of a picture is the total number of pixels, either as total number or width×height; applied to the small example picture, 30 boxes wide and 20 high: the resolution is 30×20 = 600 pixels.
Megapixel, abbreviated MP, is the number of pixels in millions. ”Kilopixel“ would be the pixel number in thousands analogous to kilograms, but noone uses it, ”mega“ for millions is more practical, leads to handy numbers.
Example: 24 MP = 24 million pixels is the resolution of a digital camera that produces images with 6000×4000 pixels, i.e. 6000 pixels wide and 4000 pixels high.
dpi | dpi is a measure of how large individual pixels are reproduced - so it can only ever be determined together with the display size of a photo in print or on a screen. It stands for dots per inch = pixels per inch = dots per 2.54 cm.
Whether the printer can resolve so finely for output is another question. The example calculation shows that the photo has more than enough resolution to be output with a usual print resolution of 300 dpi.
A bit is a 0 or 1 – the smallest unit of digital data. It can only have these two values. This is the difference to the analogue world: Analogue signals or information can change continuously and take any intermediate values, digital ones only change in steps. The steps may be small, but nothing goes in between.
A byte is a group of 8 bits. It can represent numbers from 0 to 255, i.e. 256 different values. A bit of mathematics about the binary system, which you don't really need here, would show that 8 bits can take on 28 values, so you can work out the 256=28 without much counting.
A megabyte (MB) = about 1 million bytes is the usual unit for the size of image files, since it leads to practical numbers in the order of magnitude of the small multiplication table, similar to megapixels.
The fact that one MB is approximately one million bytes is due to the binary number system of zeros and ones. Powers of two play a central role there, and after 256, 512 and 1024, or about 1000, are next. Strictly speaking, 1024 bytes are a kilobyte (KB) and 1024×1024=1,048,576 bytes are eno megabyte (MB). Hence the abbreviation KB with a capital letter – other units based on the exact thousand are given a lower case k such as the kilogram (kg) = 1000 grams.
Here is just one important piece of the puzzle from a large topic, the technical colour reproduction in photography - on monitors, paper, in image files:
The prevailing standard in digital photography is to represent colours
Each pixel then has three bytes, with one byte per colour. This results in 256×256×256=16.78 million different colour tones.
This is the basis of the JPG files and monitor displays found everywhere. It's far from the whole story, but I'll limit myself to it since this is really meant to be a short article on basics.
The mixing of all colours from red, green, blue works because the human eye has three different sensory cells that react predominantly to red, green, blue, as scientists have found out as early as in the 19th century.