Born in Hungary into a Jewish family, Halmos arrived in the U.S. at 13 years of age. He obtained his B.A. from the University of Illinois, majoring in mathematics, but fulfilling the requirements for both a math and philosophy degree. He took only three years to obtain the degree, and was only 19 when he graduated. He then began a Ph.D. in philosophy, still at the Champaign–Urbana campus; but, after failing his masters' oral exams, he shifted to mathematics, graduating in 1938. Joseph L. Doob supervised his dissertation, titled Invariants of Certain Stochastic Transformations: The Mathematical Theory of Gambling Systems.
In a series of papers reprinted in his 1962 Algebraic Logic, Halmos devised polyadic algebras, an algebraic version of first-order logic differing from the better known cylindric algebras of Alfred Tarski and his students. An elementary version of polyadic algebra is described in monadic Boolean algebra. In addition to his original contributions to mathematics, Halmos was an unusually clear and engaging expositor of university mathematics. He won the Lester R. Ford Award in 1971 and again in 1977. Halmos chaired the American Mathematical Society committee that wrote the AMS style guide for academic mathematics, published in 1973. In 1983, he received the AMS's Leroy P. Steele Prize for exposition. In the American Scientist 56: 375–389, Halmos argued that mathematics is a creative art, and that mathematicians should be seen as artists, not number crunchers. He discussed the division of the field into mathology and mathophysics, further arguing that mathematicians and painters think and work in related ways. Halmos's 1985 "automathography" I Want to Be a Mathematician is an account of what it was like to be an academic mathematician in 20th century America. He called the book "automathography" rather than "autobiography", because its focus is almost entirely on his life as a mathematician, not his personal life. The book contains the following quote on Halmos' view of what doing mathematics means: In these memoirs, Halmos claims to have invented the "iff" notation for the words "if and only if" and to have been the first to use the "tombstone" notation to signify the end of a proof, and this is generally agreed to be the case. The tombstone symbol ∎ is sometimes called a halmos. In 2005, Halmos and his wife Virginia funded the Euler Book Prize, an annual award given by the Mathematical Association of America for a book that is likely to improve the view of mathematics among the public. The first prize was given in 2007, the 300th anniversary of Leonhard Euler's birth, to John Derbyshire for his book about Bernhard Riemann and the Riemann hypothesis: Prime Obsession.