The width of an image is being measured in a discrete 2 dimensional space.
The image is 3840 pixels across. This means there is a horizontal band of 3840 pixels (which are each 2 dimensional regions) that cross the space. We aren't using pixel as a unit of measurement -- we are actually counting things called pixels.
When we measure how tall it is, we measure 2160 pixels in a vertical band to the top of the image. Again, pixel isn't a unit of measurement, it is a thing we are counting.
If you take a grid of things that is 3840 wide and 2160 tall, you end up with 3840*2160 of them. This is counting.
We could also describe the image as 3840 pixel_widths wide and 2160 pixel_heights tall, and modify those distances. Then we'd get 3840*2160 (pixel_width * pixel_height) area. This is an area calculation.
These happen to have the same numerical value because pixel_width*pixel_height = pixel_area, and X pixels have an area of X pixel_area.
A difference between these calculations appears when you have non-square pixels and you rotate. Something 10 pixel_widths wide rotated 90 degrees may not be 10 pixel_heights tall. At the same time, the rotation should preserve area (up to rounding).
The ratio between width and height on a pixel is called its aspect ratio. CRTs often had an effective aspect ratio of 1.11 if I remember correctly.
Comments are not for extended discussion; this conversation has been moved to chat.
– D.W. – 2018-02-14T17:27:40.2731@JLRishe Please don't post answers as comments, especially when the point you're raising has already been covered by the existing answers. The question was protected precisely to prevent this kind of repetition. – David Richerby – 2018-02-19T17:01:27.907