Nominal numbers or categorical numbers are numeric codes, meaning numerals used for labelling or identification only. The values of the numerals are irrelevant, and they do not indicate quantity, rank, or any other measurement.
The term "nominal number" is quite recent and of limited use. It appears to have originated as a usage in school textbooks derived from the statistical term "nominal data", defined as data indicating "...merely statements of qualitative category of membership." This usage comes from the sense of as "name".
Mathematically, nominal numbering is a one-to-one and onto function from a set of objects being named to a set of numerals, which may change (typically growing) over time: it is a function because each object is assigned a single numeral, it is one-to-one because different objects are assigned different numerals, and it is onto because every numeral in the set at a given time has associated with it a single named object.
"Nominal number" can be broadly defined as "any numeral used for identification, however it was assigned", or narrowly as "a numeral with no information other than identification".
For the purposes of naming, the term "number" is often used loosely to refer to any string (sequence of symbols), which may not consist entirely of digits—it is often alphanumeric. For instance, National Insurance numbers, some driver's license numbers, and some serial numbers contain letters.
"Nominal" refers to the use of numbers: any nominal number can be used by its numerical value as an integer—added to another, multiplied, compared in magnitude, and so forth—but for nominal numbers these operations are not in general meaningful. For example, the ZIP code 11111 is less than the ZIP code 12345, but that does not mean that 11111 was issued before 12345 or that the region denoted by 11111 is further south than 12345, though it might be. Similarly, one can add or subtract ZIP codes, but this is meaningless: 12345 − 11111 does not have any meaning as a ZIP code.