John Todd, the Caltech mathematician who was a pioneer in the development of numerical analysis for computers and played a key role in the development of some of the first large computers, has died. He was 96.

Todd died Thursday at his home in Pasadena, the university announced without specifying the cause.

His theoretical work helped shape the foundation for today's computer science field, but much of his work was focused on more practical applications. For years, he taught courses at Caltech in numerical analysis and numerical algebra, which play a key role in scientific computing.

His career was shaped by World War II, when he joined the British Admiralty in London. Initially assigned to a group attempting to find ways to prevent German mines from being triggered by the inherent magnetism of warships, he soon found that his theoretical knowledge was of little use in a department that relied more on experimental approaches.

But Todd noticed that the skills of many physicists and other scientists in the department were being wasted performing calculations for routine mathematical problems.

"I persuaded my bosses that this was not right, and that I would like to arrange that all of the computations of the Admiralty were centralized and done by mathematicians who could do them, and let the physicists get on with really applied mathematics," he said.

After the war, he was part of a British group that attempted to create a national mathematics laboratory, but the effort was stymied by politics. Out of frustration, Todd and his wife, Olga Taussky-Todd -- a noted mathematician in her own right -- moved to the United States and joined a similar effort by the National Bureau of Standards, now the National Institute of Standards and Technology.

They helped establish the National Applied Mathematics Laboratories at UCLA and worked on the development of high-speed computer programming. The lab was later moved to Washington, where the government was building one of the first large computers. Todd was chief of the computation laboratory and later headed the numerical analysis section.

When the lab moved from downtown Washington to the suburb of Gaithersburg, Md., in 1956, the Todds accepted an invitation to Caltech, where they remained for the rest of their careers. Taussky-Todd was the first woman to receive a formal Caltech teaching position and, in 1971, the first to receive a full professorship. She died in 1995.

Todd was born in Ireland in 1911, the son of two elementary school teachers, and raised in Belfast. He displayed an early aptitude for mathematics and escaped courses in French, Latin and Greek when he persuaded school officials that he was destined to be an engineer.

He graduated from Queen's University in Belfast in 1931, then enrolled at the University of Cambridge, where the noted mathematician J.E. Littlewood was his mentor. Littlewood did not approve of doctoral degrees, which were then coming into vogue. Littlewood did not have a doctorate, and neither did his mentor.

"It's only to get a job. I will write a postcard [of recommendation] for you," Todd quoted him as saying. Besides, he added, if you were not studying for a degree, you did not pay taxes on your income at the school.

As a consequence, Todd never received a higher degree, becoming one of the very few professors at Caltech without one.

One of Todd's notable achievements was saving the Mathematical Research Institute at Oberwolfach in Germany at the end of World War II. The Admiralty had received information that a group of mathematicians was being held prisoners of war in a hunting lodge originally built by a wealthy American in the Black Forest.

After wandering through Germany for a month, Todd and a colleague, G.E.H. Reuter, reached the site in July 1945 and found that it was, indeed, occupied by a group of mathematicians -- one of them a British citizen -- who were performing mathematical calculations for the Germans.

The University of Freiburg had moved its books and other records there, along with mathematicians "who were in trouble in various ways," Todd said.

When the rescuers arrived, Todd placed a notice on the door "that this place is the property of the British Navy," he said.

A commotion ensued over the weekend when a group of Moroccan soldiers on a foraging mission arrived at the door planning to seize the facility.

Todd put on his elaborate uniform and his gun, and sent them away, telling them that he had already seized the lodge.

"They would have burned all the books if I had let them in," he said.

"It was like a Gilbert and Sullivan opera," he later said, but "this was probably the best thing I ever did for mathematics."

After he returned to London with his uniform pockets full of mathematical books written in Germany during the war, Todd went to Paris because the French controlled the German zone where the institute was located. He persuaded French officials to leave the facility in peace, and it has since become a noted institute.

Caltech is planning a memorial service in the fall.

thomas.maugh@latimes.com