I grew up in a coal-mining village about 30 miles north of Edinburgh. My parents didn't own a car and our trips to Scotland's capital city were few and far between. When it turned out that I was academic, Edinburgh University became my natural first choice. It was only a 45-minute train ride from home, so I could visit my parents at the weekend. I was the first member of my family to go to university, and fairly gauche, but I did love books and was looking forward to studying English literature. The course provided a steep learning curve and I just made it into the MA stream by the skin of my teeth, but I was getting to know and love the city, its history and (of course) its literary past. Intimations of Sir Walter Scott, Robert Louis Stevenson, and Robert Burns seemed to lie around every corner, but the author I became obsessed with was Muriel Spark. I ended up studying her novels for three years, intending to complete a PhD thesis—but actually starting my own writing career instead. (I told myself it's what she would have wanted.)Her best known work is The Prime of Miss Jean Brodie, and it's a novel I still turn to all of thirty years later, finding fresh pleasures in its artfulness, its blending of comedy and tragedy, and the complexity of characterization. Spark started life as a poet and it shows in her economy. This short novel contains multitudes, meaning it repays re-reading. Miss Brodie herself is both hero and villain, engaging and horrifying in turn, and we watch in fascination as her clique of chosen schoolgirls react to her in very different ways. Spark is excellent in her depiction of these girls' lives as they grow towards womanhood. She also brilliantly depicts the world of the ’30s, with Fascism on the rise in Europe. The shadows of wars past and future hang heavy over the story.And then there's Edinburgh, a beguiling setting for the action. For decades afterwards (the book first appeared in 1961), it was as if Spark had captured the city so well that other authors shied away from the place. One reason, perhaps, that I decided to focus on Edinburgh in my own work, showing a society that had changed enormously—in some ways—since Spark's depiction. The Prime of Miss Jean Brodie took me on a journey through the central trope of Scottish literature—the notion of the divided self. Miss Brodie is descended from a real-life Edinburgh character, William Brodie, who was gentleman by day and villain by night. He was almost certainly an influence on Robert Louis Stevenson's Doctor Jekyll. Another influence on that work may have been James Hogg's Memoirs and Confessions of a Justified Sinner, one of the first serial killer narratives. In that book, a religious zealot meets a charismatic stranger who convinces him that he is one of God's chosen people, so can do whatever he wants while earthbound, up to and including murder. The stranger may be a devil or a figment of the anti-hero's fevered imagination.Jean Brodie is no devil, but she does lead some of her schoolgirl charges into errors of judgment, with fatal and life-changing results. All of this is contained in a story just over a hundred pages long, so short in fact that it was originally serialized in a couple of issues of The New Yorker. I took my first edition with me to a reading Muriel Spark gave in Edinburgh the year before she died. After her talk, she duly signed the book for me. It was our only meeting. I was a well-known author myself by then, my PhD days far behind me. But I was able to tell her of the impact she had made on my life. All of her novels are worth reading, but one stands tallest among them: The Prime of Miss Jean Brodie.Ian Rankin is an internationally bestselling novelist and the recipient of an Edgar Award, a Gold Dagger for fiction, a Diamond Dagger for career excellence, and the Chandler-Fulbright Award. His most recent novel is Rather Be the Devil. He lives in Edinburgh, Scotland, with his wife.