Sarah Jane first appears in the Third Doctor serial The Time Warrior (1973), where she has managed to infiltrate a top secret research facility by posing as her aunt, Lavinia Smith, a famous virologist. Sneaking into the TARDIS while the Doctor is preparing to follow the trail of a kidnapped scientist through time, she becomes embroiled in the subsequent adventure in the Middle Ages.
Sarah Jane then finds herself working with the Third Doctor and UNIT (United Nations Intelligence Taskforce, now UNified Intelligence Taskforce) on a number of occasions. She is present when he regenerates into the Fourth Doctor at the end of Planet of the Spiders (1974), and continues to accompany him on his journeys through time and space. During this time, she encounters Daleks (and is the first companion to meet their creator Davros), Cybermen, antimatter creatures on the most distant planet in the universe, android mummies in 1911 England, ancient evils in 15th century Italy and other dangers. To date, Sarah Jane is the only companion to have faced the Daleks, Davros, Cybermen, Sontarans, Ice Warriors, and The Master (in The Five Doctors).
As a companion she is confident and inquisitive, and possesses a sharp mind as well as a sharp tongue. She is also a feminist — in her first appearance she is infuriated when the Doctor asks her to make coffee, and she often verbally spars with fellow companion Harry Sullivan, who has an old-fashioned and unintentionally patronising attitude towards her. However, this does not get in the way of forming a close friendship with him. In The Monster of Peladon (1974), the Doctor advises Sarah Jane to share concepts of Women's Lib with Queen Thalira, whose power is limited on her planet because of her sex. In later episodes, Sarah Jane's views become less vocalised, but she never gives the impression that she is less than capable. In spite of the dangerous and frightening situations she often finds herself in, she loves adventure and risk, and in spite of her outward complaints, is always thrilled to go off in search of more adventure. She shares a rapport with the Third and Fourth Doctors, and is consistently one of the Doctor's most popular companions among fans. However, when interviewed by the Daily Mirror in 2006, Sladen was somewhat critical of the characterisation of Sarah Jane in the 1970s, saying "Sarah Jane used to be a bit of a cardboard cut-out. Each week it used to be, 'Yes Doctor, no Doctor', and you had to flesh your character out in your mind — because if you didn't, no one else would." She spoke more favourably of the characterisation in the later series.
Sarah Jane is returned to Earth at the end of The Hand of Fear (1976) when the Doctor is summoned to his home planet, Gallifrey, to which he was forbidden to take humans at that point. The Doctor attempts to materialise the TARDIS near her flat in South Croydon, but Sarah Jane realises to her exasperation that he has left her in an unknown town. Thirty years later, when she encounters the Tenth Doctor in "School Reunion" (2006), Sarah Jane reveals that he had in fact abandoned her in Aberdeen, Scotland.In 1981, Sarah Jane was the central character in a pilot episode for a proposed spin-off series, K-9 and Company. In the episode, Sarah Jane receives the robot dog K-9 as a Christmas present from the Doctor. However, the proposed series did not materialise.
Sarah Jane returned to Doctor Who in 1983 for the special episode The Five Doctors, in which she is transported to Gallifrey by President Borusa of the High Council Of Time Lords as part of Rassilon's Game Of Death, and is reunited with the Third Doctor, as well as meeting the First, Second and Fifth Doctors.
When Doctor Who was revived in the 2000s, Sarah Jane is reunited with the Doctor, now in his tenth incarnation, in the second season. She first reappears in the episode "School Reunion". There it is revealed that after she was returned to Earth, she gave up waiting for the Doctor to return and concluded that he had died. However, she later goes on to say that she had a feeling he was on the alien spaceship above London in "The Christmas Invasion". At the time of "School Reunion"', Sarah Jane is still single, and suggests to the Doctor that she found it difficult to hold down a lasting relationship with any man following her experiences with him. At the episode's conclusion, he leaves her a new K-9 model, to replace the destroyed K-9 Mark III he sent her as a gift in K-9 & Company.
The popularity of Sarah Jane led to the development of a spin-off following her special guest appearance in "School Reunion". The Sarah Jane Adventures, starring Sladen as Sarah Jane, is produced by BBC Wales for CBBC. It began as a 60-minute special, "Invasion of the Bane", written by Russell T Davies and Gareth Roberts shown on 1 January 2007 with a weekly series of ten episodes beginning on 24 September.
In the time between "School Reunion" and "Invasion of the Bane" (at least a year and a half), K-9 has left Sarah Jane to close off a black hole but occasionally passes close enough to contact her. Although K-9 appeared in the special and in a scene in one episode, he will not appear as a recurring character: the rights to the character of K-9 are owned by writer Bob Baker, who is developing a separate Australian TV show entitled K-9, an independent production with no other ties to Doctor Who.
Sarah Jane drives an emerald green Nissan Figaro and investigates alien interactions with Earth aided by a sentient supercomputer named Mr Smith. A watch that scans for alien life and a lipstick-shaped sonic screwdriver were, according to the show's website, gifts from the Doctor, hidden inside K-9 Mark IV when it was left for her at the end of the events shown in "School Reunion". Her low-key methods of investigation have helped protect the Earth from alien attack, which contrast to the more abrasive and militaristic approaches of UNIT and the Torchwood Institute, who, according to Sarah Jane, tend to go in "all guns blazing". Her investigations are covert and remain unknown to her neighbours in Bannerman Road, Ealing which has encouraged her reputation for being formidable and reclusive.
In "Invasion of the Bane", she adopted a son, Luke Smith, and befriended neighbour Maria Jackson during her investigation of the Bubble Shock! manufacturing plant, remarking that since meeting them she is no longer content to live alone. When asked why she never married, she replies that there was only one man for her, to whom no one could ever compare.
During the course of the first series she learns how to be a mother to Luke and starts to become more "mumsy" as she puts it. She and Maria share a close friendship to the point where Maria is the person Sarah Jane "trusts the most". Along with Luke and his friend Clyde Langer they defeat various threats to Earth such as the Bane, the Slitheen, the Gorgon and General Kudlak.
In Whatever Happened to Sarah Jane? we meet thirteen year old Sarah Jane, played by Jessica Ashworth, in 1964. In that year, Sarah Jane witnessed the death of her friend Andrea Yates who fell from a pier they were both playing upon and whom Sarah Jane was unable to rescue. It was this event that gave Sarah Jane a thirst for justice, and a strong desire to fight against loss of life.
Sarah Jane crosses back over to Doctor Who in the two-part fourth series finale "The Stolen Earth"/"Journey's End", along with Luke, Mr. Smith, and K-9. Here she encounters Davros again, who still recognizes her. She plays a major role in the episodes, temporarily rejoining the Doctor as a companion. Once she helps summon him with the subwave network and Mr. Smith, she heads out to meet up with him but is stopped by two Daleks who go to kill her. Before they can however, Mickey Smith and Jackie Tyler teleport in and kill them. With Jackie and Mickey she is taken prisoner but manages to escape into a side room in the Crucible before she can be killed by the Reality Bomb. She, Jackie, Mickey and Jack Harkness try to threaten Davros (who recognised her from Genesis of the Daleks and was surprised) into stopping the Reality Bomb with a Warp Star she owned, but are captured once again. She witnesses the disarming of the Reality Bomb, the destruction of all the Daleks and the presumed death of Davros. During the towing of Earth home she pilots the TARDIS herself alongside the Doctor, Mickey Smith, Rose Tyler, Martha Jones and Jack Harkness but after it lands runs home to Luke. She is also able to shorten the process of transferring the TARDIS base code numerals to Mr. Smith by summoning K-9 to do it.
The second series of The Sarah Jane Adventures reveals new backstory about Sarah Jane's family. Sarah Jane had always believed her parents had simply abandoned her but, as a result of travelling back in time to 1951, as part of a plan to remove her from her timeline by the Trickster, it was revealed to her that she was unintentionally, responsible for the events that led to her parents, Eddie Smith and Barbara Wilson Smith, choosing to die in a car accident, orphaning Sarah Jane and leaving her to be raised by her Aunt Lavinia. As a girl in her Aunt Lavinia's house, Sarah Jane was frightened by a clown doll.
She has a brief romantic relationship with barrister Peter Dalton and an aborted wedding ceremony in the third series episode of The Sarah Jane Adventures, The Wedding of Sarah Jane Smith. The Trickster once again lures someone by preventing their would-be death, in order to change Sarah Jane's life. In this case, he spares Dalton from a household accident and inserts him into Sarah Jane's life; in the end, Dalton rejects the Trickster and accepts his own death, leaving Sarah Jane a quasi-widow at the altar. Owing to the Trickster's temporal phase shift, she is perceived by the guests - aside from Luke, Rani, Clyde, K-9 and the Doctor - to have been abandoned by Dalton. In the same serial, Clyde mentions that Lavina left her fortune to Sarah Jane, thereby explaining the latter's independence, four-story antique house, and apparent lack of concern over what stories publishers want her to investigate and write.
The dying Tenth Doctor bids her a silent farewell along with Luke near the conclusion of The End of Time.
In Pyramids of Mars, broadcast 1976, she states (more than once) that she was "from 1980", which implies that her adventures with the Doctor took place in the near future with respect to the time of broadcast. This has been of some significance in what has become known as the UNIT dating controversy - a debate as to in which time period the stories depicting the Third and Fourth Doctor as UNIT's scientific adviser were set.
"A Girl's Best Friend", the sole episode of K-9 and Company, is set 18–25 December 1981 (airing three days later), and Sarah Jane's adventures with the Doctor and UNIT are part of her memory. Moreover, she receives K-9 Mark III from the Doctor in that episode, it having waited in a crate for her since 1978, and retains it until "School Reunion" in 2006, never having had it during her tenure with the Doctor.
In The Sarah Jane Adventures, the character has been depicted as being born in the spring of 1951 (she was shown as a baby in August 1951 in The Temptation of Sarah Jane Smith and as 13 in 1964 in Whatever Happened to Sarah Jane?. Secrets of the Stars reveals her birthsign is Taurus, placing her birthday in April or May). In the Third Doctor, and the character's second, story Invasion of the Dinosaurs, broadcast 1974, the character stated she was 23, implying that her adventures with the Doctor took place contemporaneously with the time of broadcast.
The Tenth Doctor tells Donna Noble in "The Sontaran Stratagem" that he worked for UNIT "in the Seventies...or was it the Eighties?", a direct reference to (and avoidance of dealing with) the controversy.