In recent times, academics tend to be valued, judged and honoured by their research achievements and the number and quality of papers they have had published in learned journals. Great teachers have not been appreciated, as they once were.

Norman Routledge was a great teacher, first at the Royal Aircraft Establishment at Farnborough – where he was a friend and colleague of Alan Turing – and the National Physical Laboratory at Teddington, then as a young Fellow in Mathematics at King's College, Cambridge, and as a "beak" at Eton, where he was to become an extremely successful tutor and housemaster. Finally, he was a teacher of music to the Salvation Army Community in Bermondsey.

Routledge was born in Letchworth, one of the two sons and three daughters of a nurse and a father who had worked his way up from office boy to director of a builders' merchant company. Routledge had a story (confirmed to me by the Duke of Buccleuch's archivist) that in 1494 Simon Routledge and his son Matthew raided the Buccleuchs' castle at Rankilburn, caused 1,000 marks' worth of damage, stole 80 stone of cheese and took five horses, 40 cattle and 40 sheep. They cleared the place out; the Scots put the Routledges on the blacklist, and later took revenge by despatching them to Liddesdale, from where they ended up in the working class of north London.

Going up to King's in 1946, the 18-year-old Routledge, who might have been daunted by ex-servicemen in their twenties, was taken under the wing of two superb supervisors, Albert Edward Ingham FRS (Fellow of King's 1930-65) and Kendall Dixon, expert in the field of mathematical analysis.

In 1949, Routledge gained First Class Honours with Distinction in the Maths Two Tripos, which led to a PhD in symbolic logic and a Fellowship of King's in 1951. At the same time, he worked at RAF Farnborough and the National Physical Laboratory to fulfil his national service.

Wonderfully irreverent and hugely knowledgable, he entranced those of us who were fortunate enough to be his undergraduate friends. He was the antithesis of the dry mathematician, this bow-tied and cheerful dynamo. He stayed with me for a week of the 1955 Edinburgh Festival; he sparkled in talking to performers with whom he was determined to engage in conversation.

Out of the blue in 1959, when he was director of studies in mathematics at King's, a letter arrived which was to alter the course of his life. It came from Sir Robert Birley, one of the great headmasters of Eton. Could Routledge suggest any bright maths undergraduate who on completing their degree might be interested in teaching at Eton? To Birley's astonishment, he suggested himself. When we heard this, his friends gulped. How would flamboyant Norman get on? Possible disaster, we thought.

But Sir Peter Swinnerton-Dyer FRS put it to me: "By becoming a Fellow of King's, Routledge achieved a level of distinction. But even superb mathematicians can encounter a brick wall. Unless you are an FRS at a young age, it is better to do something else than soldier on in the stratosphere of the Cambridge Maths Faculty. By going to a school, Norman Routledge made the right choice and the best use of his talents."

Sir Eric Anderson, his headmaster from 1980-89, told me, "From day one, Norman was brilliant at conveying the excitement of mathematics to brilliant – and indeed not so clever – boys." Among his specialist pupils was Timothy Gowers FRS, now Rouse Ball Professor of Mathematics at Cambridge, and Fields Medallist. He told me: "It was an extraordinary privilege to have been taught by him. The way he taught was as far away from the requirements of a test as it is possible to imagine, yet when the exam came all the material was covered."

James Knox, then a young architectural enthusiast at Eton and now managing director of The Art Newspaper, recalled to me: "I was in Norman's room when he answered a phone call to hear that Norman Shaw's masterpiece, then Scotland Yard (later MPs' offices), had been saved from demolition." He vividly remembers "going on a trawl of the Wren churches and Dickensian warehouses, when Routledge would say, 'Boys, just smell the spices, tea and coffee that once pervaded the buildings'."

Boys like to have larger-than-life adults around them, and Routledge was certainly that. In 1973 he took over from the Spanish master Peter Hazell, and spent the next 14 years as housemaster in Cotton Hall. He installed striking William Morris wallpaper – he was a stalwart of the Victorian Society – in his sitting room, and purple-painted corridors in the boys' quarters. It was well known as a happy House, where an international mixture of boys – preferably musicians – was to be found.

Routledge would produce House plays, such as The Merry Wives of Windsor, involving every boy in the House, even those of the most dire ham-actor tendency. On one occasion he played an angel in silver wings, delicately plucking his harp.

One of his pupils, the present Earl of Wemyss, thanked Routledge for broadening the minds of generations of Etonians. "He had an amazing slide collection of baroque churches. He was lots of fun – but always totally in charge, and would crack down hard if any of us went over the score."

In retirement Routledge went to live in Bermondsey, where he became open about his homosexuality. His sister, Christine Armstrong, told me, "It was a relief to Norman." He became involved in support for sufferers from HIV/Aids, and played his harp often at the funerals of members of the gay community.

Norman Routledge, mathematician and teacher: born London 7 March 1928; teacher, Eton 1960-89; president, Bermondsey Oasis Club 1995-2013; died London 27 April 2013.