Though his name is commonly written "Yamakawa," he himself wrote it as "Yamagawa" in English. Yamakawa was sent by the new Meiji government to study physics at Yale University, where he was the first student from Japan to graduate. On his return to Japan, he was posted to Tokyo Imperial University, and became Japan’s first Japanese professor of physics in 1879.
(There had already been several foreign professors, such as William Edward Ayrton)
During the Meiji and Taishō periods he helped found the Kyushu Institute of Technology in 1907 and served as president of Tokyo Imperial University (1901-1905 and 1913-1920), Kyushu Imperial University (1911-1913), and Kyoto Imperial University (1914-1915).
He was later ennobled with the title of danshaku (baron) under the kazoku peerage system. He also authored several other history texts, including "Hoshū Aizu Byakkotai Jūkyūshi-den," which he wrote with fellow Aizu native Munekawa Toraji.
He became a member of the Byakkotai, a unit of the newly reorganized Aizu domain army composed mostly of boys aged 15 to 17 years, who fought in defense of Aizu during the Boshin War. Later in his life he was also a Privy Councilor (appointed in February 1923) and a member of the House of Peers.