1. What the Number on a Book's Spine Means
The label on a library book's spine usually begins with a classification number. It is a code for what the book is about, not for who wrote it or when the library bought it. A library using the Dewey system gives each book a number meant to help keep it near other books on the same subject [3].
That is why neighbors on the shelf feel related. The shelf is not sorted by alphabet or by date. It is sorted by topic, so a book's neighbors are the books closest to it in subject.
The number is not the whole label, though. Libraries often add more lines below it, such as letters from the author's name, to put books with the same topic number in a second order. The details of the letters and other marks after the topic number differ from library to library. First, how does a number manage to describe a topic at all?
2. How Splitting Everything Into Tens Makes a Thousand Numbers
The word "decimal" is a clue to how the system works. The system splits all knowledge into ten big groups, then splits each group into ten smaller ones, then splits those again [3]. The Japanese NDC works the same way: a three-digit number whose first digit names the broadest group, with 0 reserved for general works such as encyclopedias [5].
Here is a way to picture it. Imagine a chest with ten drawers, and each drawer holds ten smaller drawers. Three digits can be combined in 1,000 ways (000 through 999). The first digit tells you the big drawer, the second the medium one, the third the small one. The shelves are not divided into drawers like this. The drawers are just a way to picture how the numbers are organized. When a topic needs more detail, a decimal point and more digits can be added after the third digit [5].
So a number works like an address that gets more precise as it gets longer. Who first thought of building one?
3. Melvil Dewey Wanted Books Placed by Subject, Not by Arrival
The Dewey Decimal Classification was conceived by the American librarian Melvil Dewey in 1873 and first published in 1876 [1]. Wikipedia's article describes the first edition as a 44-page pamphlet [3].
The key idea, that same article says, was to place each book near other books on the same subject ("relative location"). It describes the older way as giving a book a fixed spot in order of arrival, with a new book going to the end of the line. That is easy, but books on one subject end up scattered across the building. Dewey's system instead placed each book relative to the other books on its subject, so adding a new one means slipping it in near its relatives [3].
This explanation comes from a general encyclopedia rather than from Dewey's own text, so treat the details as a summary and not as his exact words. The part that is certain is the dates and the creator, which the publisher OCLC states directly [1]. What happened when this idea reached Japan, and what about libraries that chose another system?
4. Japan's NDC and Other Systems Solve the Same Problem Differently
Japan's version was first published in 1929 by Mori Kiyoshi, and the Japan Library Association has maintained it since 1948 [5]. The 10th edition appeared in December 2014, 19 years after the 9th [4]. The official article from Japan's National Diet Library (the country's national library) calls the NDC a standard that is widely used in Japanese libraries [4].
Wikipedia says the NDC's number notation is similar to Dewey's, while the order of its ten main classes was inspired by a different American system, Cutter's Expansive Classification [5]. That detail rests on Wikipedia alone, so it is better read as "reportedly" than as settled fact.
Dewey is not the only choice, even in the United States. The Library of Congress Classification was developed in the late 1800s and early 1900s for the Library of Congress's own collection. It uses twenty-one classes labeled with single letters, and many large academic libraries in the United States use it [2]. If a university library shows a call number that starts with letters, such as "N" for art (the Library of Congress's own example), that is probably this system. A call number that is mostly digits may be Dewey, but only the library's own guide can tell you for sure.
Japan's National Diet Library even keeps a system for its own shelves, called the NDLC, which mixes letters with whole numbers and is not decimal. At the same time, it publishes guidelines for applying the NDC [6]. So different libraries can follow different rules. That leads to a bigger question: does one book always get one number?
5. Why the Same Book Can Get Different Numbers in Different Libraries
Many books cover more than one subject, such as a book on the history of ships. A cataloger must decide which subject is the main one. The article about the NDC's 10th edition says its instructions changed to point toward giving a single item more than one classification number when it covers several subjects [4]. Earlier practice was centered on one number so the book could stand in one place on a shelf.
That means "one book, one number" is a general habit, not a law of nature. Two libraries can use different editions of a system, different systems, or different judgments about which topic is most important. Smaller details, such as how the rest of the label is written or whether children's books get colored stickers, also depend on the library.
So a classification number is a topic label chosen under one library's rules, not a permanent address built into the book. That makes it something you can test yourself.
6. How to Check the Pattern at Your Own Library
At your school or local library
Pick a book you like and write down the number on its spine. Then look at the three nearest books on either side and glance at their titles and contents pages. Are they close in subject? Try a second shelf in a different section to see if the pattern holds.
If you can visit two libraries
If both a school library and a public library have the same book, compare the labels. Is the number the same? If not, ask a librarian why, and mention that libraries can follow different editions or rules. If you can only get to one library, pick two books on a similar topic from different shelves and compare how close their numbers are.
Put each book back where you found it, and keep your voice down. To read more, try the Library of Congress page on its classification system [2], which explains how its letter classes work.