Dr. Daniel B. Lloyd, 82, a retired professor of mathematics at the old D.C. Teachers College and a former teacher in the D.C. public school system, died of pneumonia Sept. 5 at the Potomac Valley Nursing Center in Rockville.

After retiring from D.C. Teachers College in 1972, Dr. Lloyd devoted his time to genealogical studies. His book, "The Lloyds of Southern Maryland," won a first prize from the Maryland Historical Society. He also wrote books about the Middleton family, which is related to the Lloyds, and the Chapman family, of which his wife is a member.

Dr. Lloyd was born on a farm near Bowie. He grew up in Washington and graduated from the old Western High School. He earned a bachelor's degree at George Washington University, master's degrees at the University of Maryland and Columbia University, and a doctorate in mathematics at Catholic University.

He taught at Maryland, the University of Illinois and Syracuse University. In 1936, he returned here and joined the D.C. public school system. He taught mathematics at Eastern, Roosevelt and Coolidge high schools. He began his career at D.C. Teachers College in 1950.

Dr. Lloyd had been president of various Parent-Teacher Associations and was a past president of the Citizens Association of American University Park. He was a member of the Federal Schoolmen's Club, the National and Maryland genealogical societies and the National Presbyterian Church.

Survivors include his wife, the former Mazie Chapman, of Bethesda; two children, Bruce Middleton Lloyd of Mountain Lakes, N.J., and Miriam Lloyd Halsey of Needham, Mass.; two sisters, Annabelle Sontag and Harriet Lewis, both of Arlington, and two grandchildren.