|Engineer and physicist Jacob Burroughs invents a time machine which lets
him travel to what we might consider "alternate universes". The underlying
mathematics involves the notion that there are in fact 6 dimensions (three
spatial and three temporal, for symmetry) and hence (?)
666 universes. Moreover, travel between universes
can be achieved by application of linear operators which include rotation
of these dimensions. Not only can Burroughs travel, he must travel
to alternate universes to escape those who now wish to kill him. For no
particular reason, these alternate universes turn out to be made up of
those that we know through our fiction in this universe, including Oz,
Lilliput, Camelot, and many characters from earlier Heinlein novels.
The book refers also to Cantor's approach to set theory, but doesn't get it
quite right. In fact, most people would agree that there isn't much that
this book got quite right.
I really wouldn't consider mathematics important to this story at all; they're only present in the way "science" is present in Star Trek - as a convenient and misapplied label for a deus ex machina plot device, in this case, travel through literary stories the author thinks sounds like fun.
If you're a teenager (or an uncritical adult looking for "popcorn reading"), it's not a bad read. But DON'T expect any kind of learned discussion of science or math; Heinlein was known in the 30s and 40s for providing some pretty solid and interesting (for the time) engineering speculation in his fiction, but his pure science is... not so good.
Look to Larry Niven's classic SF stories if you want more thoughtful play with science and math - Niven is famous for actually doing the math to figure out that a large structure (Ringworld) would require a greater tensile strength than ordinary matter can provide. (He's almost equally famous for going back and writing a sequel to fix the problem when a bunch of MIT students did more calculations and determined that the Ringworld's orbit would be unstable.)
I'll get arguments here, but I think this book is the most autobiographical of his novels. Of course, by the time he wrote it he had a lot to look back upon.
Note: In 2020 an alternative version of this novel was published for the first time based on Heinlein's notes for an original draft. The other version is similar in many ways, including in its nonsensical use of mathematics.