Where Science Fiction is the writing of stories derived from some form of extrapolation from the laws and theory of science, there is a subgenre of books which take well-established settings and worlds and take a documentarian, analytical view of how that setting fits into, illustrates, or contrasts with the "real world".
There are many reasons for this. It'd be nice to say that a lot are written because the author is using the known milieu and expanding the understanding of why the stories speak so strongly to the reader, for great stories do not exist in a vacuum. We are hopefully led to a deeper appreciation of both the stories and the world around us.
However, there is more than ample evidence to make the argument that a lot of it is either merchandising, trying to milk a franchise, or a Fan Wank gone horribly and publicly wrong.
- How William Shatner Changed the World
- Star Trek has various Technical Manuals for this reason.
- The Physics of Star Trek
- The Science of Superheroes It differs from most of the others in this category in that it is Science texbook first, superhero fan material second.
- The Science of Harry Potter
- The Science of His Dark Materials
- The Biology of B-Movie Monsters
- Averted in The Science of Discworld series, where the chapters alternate between "story" and "science", and illuminate each other. In the story chapters, the wizards of Unseen University study a "Roundworld" they created that lacks magic and impossibly runs without narrative causality - just scientific laws. The science chapters explain what's happening in the story - how scientists work, the formation of Earth, and so forth, serious explanations of the real science that the wizards have encountered. The writers mention this trope in the introduction, and say that they are not doing it. A more accurate name for the series would be "The Science of Roundworld" (i.e., our world), but you know how it is...
- Physics of the Impossible by Michio Kaku, also the television series "Sci-fi Science: Physics of the Impossible''
- What's Science Ever Done for Us? looks at The Simpsons through a scientific lens.
- The Physics Of Superheroes by Dr. James Kakalios, who has also given physics advice to comic writers. The book is notorious in the fan community for proving that it was the whiplash from Spider-Man's web line that killed Gwen Stacy.
- The "Because Science" video series uses actual science to answer questions about various works of fiction.
Note that while a lot of the books are in fact science-oriented, this is not the only topic. Thus we also have:
- The Tao of Pooh and the companion The Te of Piglet
- Winnie-the-Pooh on Management and its follow-ups Winnie the Pooh on Problem Solving and Winnie the Pooh on Success.
- The Religions of Star Trek
- The Gospel According to Peanuts and The Parables of Peanuts
- in The Enemy Papers (expanded Enemy Mine book by Longyear) novels are supplemented with excerpt of The Talman (Drac "bible") and Drac for Travelers (sort of phrase-book).
- Open Court's Popular Culture and Philosophy® series: including Star Wars, Transformers, superheroes, and their book of the undead.
- Harry Potter and History and Star Wars and History.
- Philosophy and Science Fiction is an introductory philosophy textbook using over a dozen stories from Science Fiction.
- I'm Working On That, yet another book about Star Trek inspiring science. The title is taken from Stephen Hawking's comment on a tour of Star Trek sets, referring to the warp core.