Selma Dreller Kerr, 51, a free-lance writer and former Alexandria resident, died of cancer Monday in a San Jose, Calif., hospital. She lived in Saratoga, Calif.

She was the wife of former Navy Capt. A. A. Kerr, legal counsel to four secretaries of the Navy, who left military service 10 years ago to join General Electric Co.

At that time, they left Alexandria and moved to Ormond Beach, Fla. They had lived in Saratoga for about three years.

Mrs. kerr was born in Boston while her father, the late Navy Rear Adm. Louis Dreller, was on duty there. She graduated cum laude from Swarthmore College.

She was with her family at Pearl Harbor when the Japanese attacked there in 1941. She was married at Pearl Harbor.

Mrs. Kerr and her husband came to the Washington area about 1952. In the 1960s they had a tour of duty in Japan.

Mrs. Kerr, who was a free-lance writer, had lectured at one time at the University of Hawaii and later at Georgetown Unversity.

In addition to her husband, she is survived by a son, Alex, a Rhodes scholar at Oxford University; a daughter, Laurie Kerr, a postgraduate student at Cornell University; her mother, Edith Dreller, of Washington, and a sister, Doris Sosin, of Sherman Oaks, Calif.