The phrase "by the book" is an English idiom, or saying, that means to do something in the correct or proper manner. It refers to completing a task according to the rules or without cutting any corners to save time. It is thought that this saying originally referred to the Christian Bible, though its current meaning simply refers to any written or implied set of rules governing the activity a person is performing.
Idioms such as this are sayings that when taken literally have no meaning or do not make sense. They are one of the hardest parts of learning a new language because their literal translations do not show the actual meaning of the phrase. Instead, an idiom is a phrase that over time has earned a popular meaning outside of its literal meaning. It is understood by a group of people to hold that specific meaning, and those unfamiliar with the phrase may have trouble understanding it even when the phrase is used in context.
Though similar phrases may date back to times before the Bible, it is commonly believed that the current use of the phrase referred to the Christian Bible. The Bible is considered the ultimate rulebook by those of the Christian faith. People were often made to swear on the Bible in court that they were telling the truth, and it is thought that the original version of the phrase "by the book" referred more to telling the truth in court rather than playing by the rules.
Over time, the phrase "by the book" began to show up in literature and other publications. William Shakespeare wrote "You kiss by the book" in his famous play Romeo and Juliet. The phrase also appears in Edgar Allen Poe's work Murders in Rue Morgue. These uses are similar to the common use of the phrase and may have played a role in developing its popularity over time.
Similar in meaning to this phrase is the idiom "by the numbers." This phrase means to perform an action in a precise and exact order. The two phrases both reflect an action that is according to the rules and follows orders as closely as possible. "By the book," however, is a more general phrase that reflects a person who is law-abiding while "by the numbers" refers to performing a specific action as closely to the instructions as possible.