Caveat: like anything I write about Lego, there is no guarantee that the Lego engineers actually reasoned in the way I outline here.
I'm going to derive the basic dimensions of Lego bricks by observation and reasoning, trying to think like the Lego engineers did when they designed the system. I will also define the difference between the design dimensions and the production dimensions.
Lego bricks are entirely metric. That means the design dimensions are round numbers when measured in the metric system.
I am going to show this by reasoning on simple structures made with the basic bricks of 2x4 knobs, using a standard 48x48 base plate.
At first glance there are two basic numbers.
Do we know those are correct values? Yes, because they hold over large distances. In principle we could measure the distance between knobs by measuring from an edge of one to the same edge of the next one, as shown by the two horizontal blue lines:
That is very difficult if we want a good value, it is much more accurate to measure between knobs that are far apart and then divide by the number of knobs.
I took a 48x48 knob base plate, put two bricks on it as in the image, and measured 296mm ±0.25mm (the metal strip meter is divided with 0.5mm marks) for 37 horizontal steps (this should be done at room temperature, as the expansion coefficient of the plastic and the strip meter are not likely to be the same).
That gives 8.00mm ±0.007mm or exactly 8mm to within better than one hundredth of a mm.
If you are tempted to measure over a distance wider than a base plate, you might think of putting several together, but in that case do not forget there is a gap necessary of 0.2mm (see below why) and so you must therefore link the plates by bricks so the distances between plates is rigourously kept:
For measuring the vertical pitch we can make a tower of, say, twenty bricks high, measure the height and divide by 20 to get a good value for the vertical pitch.
I measured 192.0mm ±0.25mm so that is 9.6mm ±0.013mm. Be sure to line up the meter correctly at one end and to look vertically down at the other end to avoid parallax errors (e.g. the angle of the photo might lead you to think I should have measured slightly less than 192mm).
Note these important aspects:
There is an underlying smaller pitch: 0.8mm. That goes 10 times in the horizontal pitch and 12 times in the vertical pitch.
The design dimensions of the classic brick with two rows of four knobs are then 16mmx32mmx9.6mm. It seems that making the brick only 8mm high did not look nice, it's too "flat", whereas making it 12mm high (one and a half times the pitch) looks too "thick".
But there is no doubt that the basic pitches have exact design values of 8mm and 9.6mm.
Expansion coefficient stainless steel: 17.3×10-6/K at 20C (9.9-17.3); Acrylonitrile butadiene styrene (ABS): 73.8×10-6/K so at least 4.3 times more.
Making the real bricks exact multiples of 8mm long has an unfortunate side effect: the faces of adjacent bricks touch. That is not a good idea unless you are never going to move them again. To avoid the faces rubbing against each other while building or dismantling, a small gap is introduced. I am much less adamant about the exact value of this gap than I am about the value of the basic pitches, but my measurements have consistently turned up the value of 0.1mm.
Leaving 0.1mm on each side then makes the basic 2x4 brick 32mm-0.1mm-0.1mm = 31.8mm long and 16mm-0.1mm-0.1mm = 15.8mm wide and 9.6mm high.
Carefully note that there is now a space, or play, of 0.2mm between adjacent bricks horizontally:
Note also carefully (and think about it hard if necessary!) that the actual dimensions of a brick do not allow them to be put horizontally in other places than exact multiples of 8mm!
The 31.8mm brick is definitely not a uniformly scaled down version of the "ideal" 32mm brick! It is really a 32mm brick from which 0.1mm has been shaved off on all vertical sides to ensure a reasonable gap.
There is no need for a gap in the vertical dimension, indeed it is not desirable at all.
When one thinks of building something, one usually starts with very simple and rough ideas. When the time comes to make the thing from physical stuff, one usually runs into a few minor problems: a bolt may be in a place where it is difficult to put a nut on, a piece of wood may be too thin for the job. These minor problems are easily solved, and if the contraption happens to be so useful that maybe it can be turned into a sellable product, then perhaps a complete re-think is necessary to make production and/or usage easy.
Toys do not escape this evolution. If you have to explain the building of a model house with classic Lego bricks to someone who has never seen a piece of Lego, you may talk about rectangular plastic blocks with knobs that fit tightly into holes at the bottom of bricks you put on top. You may also usefully mention that they are 32mm by 16mm by 9.6mm.
But as we saw, actual Lego bricks are much more sophisticated than this first approximation. There must be a slight gap between adjacent bricks or it would be very hard to put them in a line (and you would soon scratch the sides too); the knobs must be very slightly larger than the holes they fit in or they would not stick sufficiently well; the plastic must give a little but not too much, and so on.
We may therefore describe the Lego bricks in terms of their intended or design dimensions, which are different from their actual or production dimensions.
The design dimensions of the basic brick are 16mmx32mmx9.6mm but the actual bricks are produced as 15.8mmx31.8mmx9.6mm.
In all other pages I will mention brick sizes in the design dimensions and not the actual production dimensions. The slight differences always have to do with achieving sufficient play or sufficient friction, but never with positioning the bricks with respect to each other.
Positions of bricks are almost always constrained by having to fit to an imaginary grid with spacing of 8mm horizontally and 9.6mm vertically. To my knowledge that constraint can only be circumvented in two ways:
The grid constraint is a severe one for some constructions and it is at the origin of many ingenious applications of connectors. The difference between the 8mm horizontal pitch and the 9.6mm vertical pitch is also at times frustrating when building technical structures.