Mystery fiction is a loosely-defined term. It is often used as a synonym for detective fiction or crime fiction—in other words a novel or short story in which a detective (either professional or amateur) investigates and solves a crime mystery. Sometimes mystery books are nonfiction.