The Grand Matriarch was the ruler of the Panjistri. She was originally named Lilith, but over time came to refer to herself almost exclusively by her title.
When Lilith was a little girl, she encountered the Second Doctor, who was looking for his friend Polly. Lilith told him where she had gone. In return he repaired her doll and played his recorder for her. Unknown to him at the time, the weakened Timewyrm, who had gone back into the Doctor's personal timeline and was hiding inside him, transferred itself to Lilith.
Lilith became the leader of the Panjistri who were selected to leave their homeworld in their spacecraft, Kandasi, and embark on a mission to prevent the end of the universe. After five thousand years (the Timewyrm having greatly extended the Grand Matriarch's lifespan), the God Machine was nearly complete when the Seventh Doctor and Ace arrived on Kirith. Recognising the Time Lord, the Grand Matriarch and her Companion Fetch watched them. When the Homunculus was killed, she decided to have Ace made part of the God Machine. The Grand Matriarch, now fully possessed by the Timewyrm, captured Ace and began preparing her mind for the process, but was confronted by the Doctor, who recognised her. However, Raphael, having merged with the God Machine, banished the Timewyrm from her, causing her to rapidly age and die. (PROSE: Timewyrm: Apocalypse)