[[caption-width-right:344:The Fourth Doctor meets a ghost from his future and realises his time is short before he hangs up the scarf and switches to celery.]]
->''"Never guess. Unless you have to. There's enough uncertainty in the universe as it is."''
-->-- '''The Doctor'''

The one with the cardboard cutout Master. [[Literature/HumptyDumpty And Four]] [[DeathByFallingOver had a big fall.]]

The universe nearly ends and Creator/TomBaker leaves ''Doctor Who'' after an amazing seven years and forty-one ([[Recap/DoctorWhoS17E6Shada or forty-two]]) episodes. We're not sure which is more important at this stage.

The Doctor and Adric make a pit stop in 1981 Britain, so that the Doctor can materialize right on top of a real police box and make hyper-precise multi-dimensional measurements of it, which he needs to take to the mathematics nerds of Logopolis so they can fix the chameleon circuit. ([[{{ItMakesSenseInContext}} Just nod along, OK?]]) The Master, anticipating this, materializes his spare TARDIS (which [[Recap/DoctorWhoS14E3TheDeadlyAssassin he nicked from Goth that one time]]) around that exact same police box moments before. Which means that the Doctor's TARDIS now contains the Master's TARDIS containing a real police box. (Still following us?) Time and space get a bit wonky, so the Doctor and Adric investigate the string of [=TARDISes=] in the console room -- all identical except for being [[EvilIsNotWellLit progressively less well-lit]].

Meanwhile, a plucky young Aussie named Tegan Jovanka is off to her first day of work as a flight attendant, when TheAllegedCar breaks down on the way to Heathrow. Good thing there's a handy police box nearby, so she can call for help. But she hadn't planned on getting ''lost inside''. She completely fails to be impressed by the fact that it's obviously an alien spaceship, and instead decides to go yell at the captain of the thing. Meanwhile, her aunt, who was driving her to the airport, has been murdered by the Master for no real reason.

The sonorous ''bong'' of the TARDIS's cloister bell (its OhCrap signal) makes itself heard, so the Doctor and Adric eventually find their way through the nesting [=TARDISes=] back to the outside world. The Doctor suspects that the multiple [=TARDISes=] thing is yet another devious trick of the Master, and dematerializes at once, bound for Logopolis. Tegan, by now extremely confused, finds her way back to the control room and demands to know what the hell is going on and to be put back in 1981 ''right now'', please -- rather angrily, true, but then again "Sorry I'm late, I accidentally stepped into a spacetimeship that looked exactly like a police box and ended up traveling the universe in the company of an alien with an enormous scarf and a swotty maths geek from another dimension" is, as excuses go, pretty lousy. Especially for one's first day on the job.

And while all that is happening, a white figure quietly watches. The Doctor goes to have a word with it eventually, and comes back in an extremely gloomy mood, telling Adric to prepare for the worst.

The TARDIS soon materializes on the dusty, cave-pocked planet of Logopolis, home of the maths monks. It is, we learn, an enormous analogue of a computer. A task is broken down into a series of calculations; each monk performs a single calculation and passes the result on to the next monk over. Operations are overseen by the Monitor (get it?) in a sort of large workroom. After reuniting with Nyssa, who is deposited on the planet by the mysterious white Watcher, the TARDIS crew finds the Monitor. He explains that the universe is actually well past its sell-by date, and is kept from flying apart into chaos only by the power of their mighty minds, as they use their "block transfer computations" to keep the universe together.

Of course, it's time for the Master to show up and start mucking about with things. He starts small, with such pranks as shrinking the TARDIS (with the Doctor inside) and throwing a [[SpannerInTheWorks spanner into the endless work of Logopolis]]. Unfortunately, Logopolis can't be restarted once it's stopped, resulting in a rather ''large'' problem for those who still want to, you know, ''exist''. The Master hadn't really counted on accidentally deleting much of the universe, and while Tegan and Nyssa are both horrified at even having to be near him (Nyssa, of course, especially because he nicked her father's body), the Doctor reluctantly agrees to try and help the Master fix the spreading entropy.

The Doctor tells Adric, Nyssa, and Tegan to enter the TARDIS, which he has arranged for the Watcher to pilot out of time and space so they will be safe. Tegan, however, still thinks the Doctor is the best bet for getting home and decides to disobey his order and follows him and the Master as they go to speak to the Monitor. The Monitor reveals to the two that there is a backup plan that might be able to save everything. The people had been completing a program that could automatize its operation, but before the Monitor can boot up the program, him and the computer equipment is swallowed by the entropy field. For a moment all seems lost, but the Doctor, however, realizes that they still have a chance; Logopolis' computer equipment was an exact copy of the Pharos Project, a giant radio telescope on Earth. The Doctor, the Master, and Tegan then escape from the disintegrating Logopolis in the Master's TARDIS, setting a course for Earth.

Adric and Nyssa, meanwhile, can only watch helplessly, as the encroaching entropy wipes out a potion of the universe. Much to Nyssa's despair it includes Traken.

Landing inside Pharos Project, the Master and the Doctor eventually manage in cooperation to install the backup system and restore balance to the universe. But true to form, the Master decides to double-cross the Doctor; he uses the radio telescope broadcast to a message to all intelligent life in the universe: they must submit to him or else he will knock out the backup system and unleash the entropy field upon everything again.

After a chat with the Watcher inside the deepest parts of the TARDIS, Adric is able to follow the Doctor, and the ducklings cause enough of a distraction to allow the Doctor to muck up the Master's plans. Fortunately, this leaves the larger part of the universe intact. Unfortunately, the Master and the Doctor break out into a fight on top of the Pharos Tower. The Doctor sees visions of his worst enemies attempting to kill him. Clashing on the gantry, the two Time Lords wrestle to the floor. The Master gets up first and bolts to the controls of the telescope. He tilts the radar dish until the gantry completely flips over. Grabbing a cable and desperately trying to hang on to it, the Doctor sees several visions of his various enemies taunting him. Gradually, his strength begins to fail him, and finally his grasp slips, causing him to fall. The cowardly Master runs away sniggering in his TARDIS after this cheap act of murder.

Dying, the Doctor has several soothing flashes back to his previous companions in that incarnation. The next thing he knows, he's surrounded by the trio of current companions who are quite worried about him, snapping him out of the daze. The Fourth Doctor simply gives them a serene glance and tells the group with an assuring smile, "It's the end... but the moment has been prepared for."

The Watcher approaches and merges into his dead body, and turns out to have been a time/space-transcending echo of his next incarnation all along. The Doctor [[TheNthDoctor regenerates]] into a young blonde gentleman, who greets everyone with a smile. The [[Creator/PeterDavison Fifth Doctor]] starts his first day almost drowning in the sheer amount of coat and scarf he's wearing, not to mention chased by some very angry security guards.

* AMillionIsAStatistic: The story involves the destruction of one quarter of the entire universe; by even the most conservative estimates that's a single-episode death toll expressible only in standard notation. And not only does nobody seem to care (including one character whose home ''intergalactic supercluster'' was destroyed [[note]] He also killed her Dad [[/note]]), the villain responsible gets the full DracoInLeatherPants treatment despite being responsible for one of the most horrifying massacres in the series. (Though in all fairness, [[MikeNelsonDestroyerOfWorlds it was an accident this time]].)
* ArtisticLicensePhysics: Though the description of how the heat death of the universe would work is basically correct, the way it's depicted bears no resemblance whatsoever to the actual theory, and in fact is more similar to the "Big Rip" theory.
** According to the expanded verse story (The Invasion of E-Space), CVE is (in that verse) the rarest of space-time events and almost undetectable, entities containing layers of highly charged quantum particles suspended in pockets of super-vacuums. They occupied the space between realities (possibly the void) and were so violent in their physics that when they formed they punched a hole between universes, pushing space aside to insinuate themselves into reality, releasing massive waves of energy in the process. (And since heat death means no more energy, the way they do so brings forth new energies to both universes.)
* BlackmailIsSuchAnUglyWord: As the Master announces his threat to destroy the universe unless its people submits to him:
-->'''The Doctor''' ''(outraged)'' Blackmail!\\
'''The Master:''' No, Doctor, I'm merely reporting the state of affairs.
* CallBack:
** It's revealed that the CVE the TARDIS fell through earlier in the season was actually one of many created by Logopolis to let the entropy drain away and prevent the universe from collapsing.
** The Watcher's role in events may be a CallBack to Cho Je from "[[Recap/DoctorWhoS11E5PlanetOfTheSpiders Planet of the Spiders]]", thus [[BookEnds linking the Fourth Doctor's origin-story to his finale]].
** [[Recap/DoctorWhoS12E1Robot The Doctor reaffirms that he hates farewells]].
** [[Recap/DoctorWhoS8E1TerrorOfTheAutons The Doctor and the Master confront each other on a radio telescope]].
* ClimbingClimax: The Fourth Doctor is defeated while trying to overpower the Master inside a radio telescope.
* ContinuityCavalcade: Before the Fourth Doctor regenerates, he sees images of his enemies and former companions, all shown by clips from previous stories - [[Recap/DoctorWhoS14E3TheDeadlyAssassin the Master]], a Dalek, [[Recap/DoctorWhoS12E5RevengeOfTheCybermen the Cyber-Leader]], [[Recap/DoctorWhoS16E2ThePiratePlanet the Captain]], Davros, a Sontaran, [[Recap/DoctorWhoS13E1TerrorOfTheZygons a Zygon]], [[Recap/DoctorWhoS16E6TheArmageddonFactor the Black Guardian]], Sarah Jane Smith, Harry Sullivan, the Brigadier, Leela, K9 and Romana.
* ContinuityNod:
** The school uniform which Romana wore in "[[Recap/DoctorWhoS17E2CityOfDeath City of Death]]" can be seen in her room.
** [[Recap/DoctorWhoS18E5WarriorsGate The Doctor and Adric discuss Romana's recent departure]].
** [[Recap/DoctorWhoS1E1AnUnearthlyChild The Doctor mentions Totter's Yard]].
** [[Recap/DoctorWhoS9E5TheTimeMonster The Doctor and the Master's TARDISes become intertwined]].
* CosmicKeystone: The titular planet is itself a universal keystone. The people are bringing energy into the universe as a way to fight off entropy. When the Master decides to stop activity there for a little while (admittedly, not really understanding what they were doing) large chunks of reality get destroyed before the problem can be fixed. Even then, there's no ResetButton.
* DeathByOriginStory: Tegan's Aunt Vanessa is murdered by the Master, plus Nyssa's home planet is wiped out.
* DidntSeeThatComing: Oops. The Master didn't actually ''intend'' to destroy so much of the universe... including Nyssa's homeworld.
* [[DroppedABridgeOnHim Dropped Him Off A Radio Tower]]: What causes the Doctor's regeneration.
* EarlyInstallmentWeirdness: Creator/Peter Davison appears with his natural brown hair, which was quickly changed to blonde to better contrast his appearance with Creator/TomBaker's. Luckily, his role here is so brief that it's barely noticeable.
* EndOfAnEra: Creator/TomBaker's seven year run comes to an end.
* EnemyMine: The Doctor and the Master must work together to save all of existence.
* EstablishingCharacterMoment: When Tegan gets lost inside the TARDIS, instead of being astonished by it, she goes and looks for someone to yell at.
* EyesAlwaysShut: The Watcher has some rather weird statue-like features.
* EvilHand: Nyssa's bracelet.
* FaceDeathWithDignity: The Fourth Doctor is fully prepared for his death and accepts it with a smile.
* FamousLastWords: "It's the end... but the moment has been prepared for..."
* FemmeFatalons: The Watcher sports pointy claws for some reason.
* FinaleCredits: Since Part 4 is Creator/TomBaker's swan song, his face is visible during the ClosingCredits for only the briefest of moments.
* FutureMeScaresMe: The Fourth Doctor is visibly disturbed by the Watcher's presence (which means impending regeneration) hence the quote.
* GoodWithNumbers: Logopolis is this trope in ''city form''.
* GoOutWithASmile: We get one last glimpse of Creator/TomBaker's big toothy smile before the regeneration.
* GrandFinale: For Creator/TomBaker's era as The Doctor.
* FloatingAdviceReminder: Happens twice in Part 4. The first time, while hanging on the Pharos Project's power cable, the Doctor is taunted by visions of [[Recap/DoctorWhoS14E3TheDeadlyAssassin the (decayed) Master]], a [[Recap/DoctorWhoS17E1DestinyOfTheDaleks Dalek]], the [[Recap/DoctorWhoS16E2ThePiratePlanet Pirate Captain]], the [[Recap/DoctorWhoS12E5RevengeOfTheCybermen Cyberleader]], [[Recap/DoctorWhoS12E4GenesisOfTheDaleks Davros]], a [[Recap/DoctorWhoS15E6TheInvasionOfTime Sontaran]], a [[Recap/DoctorWhoS13E1TerrorOfTheZygons Zygon]], and the [[Recap/DoctorWhoS16E6TheArmageddonFactor Black Guardian]]. Then after falling, the Doctor sees visions of his past companions from Sarah Jane to Romana II.
* HappyEndingOverride: In the previous story, the Doctor successfully saved the planet Traken. In this story, it is destroyed by the entropy field.
* HeroicSacrifice: The Doctor. Actually a realistic one, as his death isn't a direct cause of saving the day, but because he pulls off an incredibly risky stunt that he doesn't recover from.
* KillEmAll: Every single member of the eponymous planet and the ''Doctor'' die (he gets better, of course). Plus, approximately a quarter of '''the universe''' gets destroyed. ''By accident.'' Special points for this explicitly including all of the surviving characters from the previous story, except Nyssa. The only survivors are the companions (Nyssa's entire family dies in this story and Tegan's only on-screen family member gets murdered) and the Master. And, well, the Fifth Doctor is created at the end of this story.
* {{Leitmotif}}: [[http://www.youtube.com/watch?v=ciXACtP92zg Ominous theme always plays whenever the Watcher appears]]
* ManInWhite: Even the Watcher's face is white.
* TheMaster
* MikeNelsonDestroyerOfWorlds: The Master inadvertently manages to unleash great destruction upon about '''a ''quarter'' of the Universe''', simply because he didn't fully understand the danger of interfering with Logopolis' operations. It is without a doubt the greatest atrocity he has ever committed on the show, if not the single greatest atrocity ''ever'' depicted on the show, and he basically did it by pure accident.
* MyBrainIsBig: The inhabitants of Logopolis.
* MysteriousWatcher: The Watcher.
* NightmareFace: His face is somehow unformed and rather clay-looking.
* NoNameGiven: The Watcher is just "the friend of the Doctor". "The Watcher" is a nickname given by Adric.
* OffscreenTeleportation: How exactly the Watcher is following the Doctor and transported Nyssa from Traken to Logopolis is never revealed.
* OffTheShelfFX: The TARDIS Chameleon Circuit control panel is obviously an old carpet sweeper turned upside-down.
* OhCrap: The Master, when he realises the Doctor is going to disconnect the cable at the radio telescope.
* PlanetOfHats: Their hat is genius, universe-maintaining mathematicians.
* RealityWarping: The Logopolitans are seemingly capable of arbitrary reality warping by meditating on the equations that physically describe the universe, or objects within it.
* ShootTheShaggyDog: A significant proportion of the ''entire universe'' is destroyed by entropy. Although insignificant on the scale of such an unbelievably cataclysmic event, the region destroyed includes the Traken Union, thereby almost immediately rendering all the events, people and struggles in ''[[Recap/DoctorWhoS18E6TheKeeperOfTraken The Keeper of Traken]]'' (the previous connected story) dramatically null, void and pointless. (The fact that this is only obvious when you [[FridgeLogic stop and consider it]] suggests that this was a side-effect rather than dramatic intent on the part of the writers).
* ShownTheirWork: Writer Christopher H. Bidmead seems to have done more reading up on computers than on entropy. The monks of Logopolis work and communicate in hexadecimal (base 16), just like real computers. At one point, the Doctor mentions "bubble memory"--which is real, and was the subject of a lot of research in 1981.
* SpannerInTheWorks: The Master doesn't actually ''plan'' on wiping out part of the universe or destroying Logopolis. See also: GoneHorriblyRight.
* TheStarsAreGoingOut: the entropy spreads and consumes part of the universe.
* StupidEvil: The Master not only ''accidentally'' kills octillions of people, he draws attention to himself by randomly killing a policeman and Tegan's aunt.
* TheWatcher: Played straight with The Watcher, who watched the Doctor and his companions throughout the serial, and was revealed to be a manifestation of the Fourth Doctor, which Foreshadows his regeneration into the Fifth Doctor.
* ThemeSongReveal: The Watcher's ominous theme during his appearances. This is before the audience is let in on what he really is (although the Doctor obviously knows but isn't telling). However, in the final scene of the story, when the Watcher's true nature is revealed to everyone, the full course of the piece plays out with the last three notes being the first three notes of the ''Doctor Who'' theme song.
* UnwittingPawn: The Master coerces the Doctor into an alliance. If the whole universe disintegrates, there will never be a galaxy to rule, right? Not so fast: The Master plans to bargain the healing technobabble for the unquestioned allegiance of the universe's inhabitants.
-->'''Doctor:''' Blackmail.\\
'''Master:''' No, Doctor, I'm [[DistinctionWithoutADifference merely reporting the state of affairs.]]
* TheVoiceless: Other characters refer to the Watcher speaking but even when he's having a dialogue scene with someone it's always shot from a distance and inaudible.
* WetwareCPU
* WhamEpisode: Creator/TomBaker was the most popular Doctor the classic series ever had, so his departure after seven seasons into the (then) youngest Doctor actor ever was a Wham.
* XanatosSpeedChess: The Master's magnificent comeback from ''accidentally'' destroying about a quarter of the universe to holding the rest to ransom
* YoureInsane: Before their final confrontation, as The Master reveals his endgame, the Doctor utters with dread:
-->'''Doctor''': You're ''mad''...you're ''utterly mad!''