William James Murphy, 75, a retired Prince George's County teacher and administrator and a former high school basketball official, died Friday at Doctor's Hospital of Prince George's County after a heart attack. He lived in Bowie.

Mr. Murphy retired in 1975 as vice principal of Beltsville Junior High School, a position he had held since 1957. Before that, he had taught mathematics and science at Frederick Sascer Junior High School in Upper Marlboro for nine years.

He became a high school basketball referee for schools in the Southern Maryland area in the early 1950s and later was the commissioner of the Southern Maryland Board of the International Association of Approved Basketball Officials, retiring from that post in 1965.

Mr. Murphy was born in Plymouth, Pa. He was a graduate of the University of Scranton in Pennsylvania. He taught high school mathematics and science in Scranton and also coached high school football, baseball and basketball teams there before coming to Prince George's County in 1948.

After his retirement from the Beltsville school, Mr. Murphy became manager of the Sacred Heart Council of the Knights of Columbus in Bowie, a position he held until his death.

He was a member of the National Education Association, the Maryland State Teachers Association and the board of directors of the Prince George's County Educators Association. He was a charter member of the St. John Neuman Assembly of the Fourth Degree of the Knights of Columbus.

He is survived by his wife of 45 years, Marie V., of Bowie; two daughters, Noreen Rice of Annapolis, and Mary Beth of Bowie; two sons, Donald and Joseph, both of Bowie, and seven grandchildren.