K9 was not originally intended to be a companion, but producer Graham Williams liked the concept so much that the decision was made to retain him as a regular character, in order to appeal to the younger members of the audience. The original name for the character was "FIDO" — apparently from "Phenomenal [sic] Indication Data Observation" unit — but it was eventually named K9.
When the Tenth Doctor created K9 Mark IV to replace K9 Mark III, he added a shiny metallic blue paint job and other improvements, including an omniflexible hyperlink facility. (TV: School Reunion) Later, though, K9 reverted to his old dark green colour. (TV: Invasion of the Bane) In battling Mr Smith (and following the battle) K9 displayed a teleport facility and a laser weapon similar to the previous K9s'. (TV: The Lost Boy)
With his great intelligence, he had a tendency to bore people with facts and did not stop immediately when asked, as he did to Leela on Pluto. When being told that he would have to stay behind in the TARDIS, K9 often argued, giving the Doctor reasons why he should go such as "he would be a good dog." K9 always wanted to assist the Doctor. He had great intelligence and skill at chess, claiming to be able to beat the Doctor in six moves (although this may only have been because he was programmed with all chess games since 1886). (TV: The Sun Makers, The Androids of Tara) K9 had an aggression mode. (TV: State of Decay)
This K9 exhibited the ability to sense and warn others of danger. He was also more mobile than his predecessor, despite his problems with the swamps of Delta III, able to lift himself up on small support rods so that he could climb stairs (PROSE: The Shadow of Weng-Chiang, TV: The Power of Kroll, The Armageddon Factor) The Doctor often used a glib remark to disarm those who were surprised by K9's appearance, such as "They're all the rage in Trenton, New Jersey." (TV: The Stones of Blood)
When Romana eventually returned to her own universe, she brought K9 Mark II with her (presumably having repaired it) and eventually became Lady President of Gallifrey. K9 Mark II is first seen on Gallifrey in the Virgin New Adventures novel Lungbarrow by Marc Platt, alongside K9 Mark I, which had remained with Leela. Both K9 Mark I and Mark II appear, voiced by Leeson, in the Big Finish Productions audio adventure Zagreus and the Gallifrey audio series. Leela's K9 (Mark I) was destroyed at the conclusion of the second Gallifrey series and only Mark II appears in the third series.
K9 returned when Ship used the black hole as fuel. Though Sarah Jane, Luke, Rani and Clyde were happy to have K9 back, Mr Smith was not. (TV: The Mad Woman in the Attic) K9 spent a lot of his time in Sarah Jane's attic at 13 Bannerman Road, Ealing, but left to defeat Travast Polong. He attended Sarah Jane's abortive wedding to Peter Dalton, where he helped the Tenth Doctor, Luke, Rani and Clyde defeat the Trickster. (TV: The Wedding of Sarah Jane Smith) After helping defeat the Slitheen family, Clyde brought K9 to Park Vale Comprehensive School to help him with his test. He helped defeat the Rakweed before returning home. (TV: The Gift) K9 went to the University of Oxford with Luke, but restored Mr White's original programming through a mobile phone.(TV: Goodbye, Sarah Jane Smith)
K9 Mark IV was a recreation and enhancement of the Mark III created by the Tenth Doctor as a second present for Sarah Jane. (TV: School Reunion) This model continued in service to his mistress, Luke Smith, Clyde Langer, and Rani Chandra and was known by Maria Jackson and Kelsey Hooper. He was left fixing a black hole in Sweden for many years, but after returning to Earth, was used sparingly, until he went to university with Luke Smith. (TV: The Nightmare Man)
During training at Master Dog Training, a K9 officer will better understand his or her dog, and the police dog will flawlessly perform its duties. During work and practice, the handler will be able to improve his or her dog’s performance, rather than ruin it by doing something incorrectly. For a K9 Police officer, we will solve any behavior problems that the dog might be displaying, and will teach the handler how to correct these problems during work. During the K9 police test, we will be teaching how to properly pass it through all the different disciplines.
K9 Mark III first appeared in "A Girl's Best Friend", the 1981 pilot for a series, K-9 and Company, which never materialized beyond the first episode. In this, the character is presented to the Doctor's former companion Sarah Jane Smith (Elisabeth Sladen); together, the two embark on what a number of adventures. Only the first of these is depicted on-screen; several are shown in comic book and audio play adaptations, and others are alluded to by the television series. Mark III made a brief appearance alongside Sarah Jane in the Doctor Who 20th anniversary ninety-minute special The Five Doctors (1983), before appearing properly and for the final time in the revived series' episode "School Reunion" in 2006. By the time of that story, Mark III has fallen into disrepair and eventually sacrifices himself to stop a plot by the alien Krillitane and defeat their leader, Lucas Finch (Anthony Head). In the episode's conclusion, the Doctor presents Sarah Jane with a new K9 to encourage her to continue investigating alien activity; the Doctor "rebuilt" him after the Mark III's sacrifice, implying that he had the same mind and memories as his predecessor while still being a "brand new model".