Prof William Swan FRSE PRSSA LLD (13 March 1818 in Edinburgh – 1 March 1894 in Shandon, Argyll) was a Scottish mathematician and physicist best known for his 1856 discovery of the Swan band.
He was born in Edinburgh the only child of David Swan, engineer, and his wife, Janet Smith. Janet was the daughter of Thomas Smith, lighthouse engineer. Her sister was married to the famous lighthouse engineer, Robert Stevenson. He was privately educated at home, 7 Union Street, and appears to have been both lonely and unhappy. His father died in 1821 when he was only three. His mother took in lodgers to make ends meet, including at one point Thomas Carlyle. William's only childhood friend is said to have been his cousin, Thomas Stevenson.
At 17 he was sent to Edinburgh University to study Divinity. He "came out" during the Disruption of 1843 and became an active member of the Free Church, teching mathematics and physics at the Free Church Normal School. From there he move to teach the same subjects at the Scottish Naval and Military Academy in Edinburgh.
In 1848 he was elected a Fellow of the Royal Society of Scotland his proposer being Philip Kelland. He served as Secretary to the Society 1858-59. In the 1850s "William Swan, teacher of mathematics" was living at 4 Duke Street in the New Town, remamed Dublin Street in the 1920s.
In 1856, Swan applied to join the faculty at Marischal College, but was passed over in favor of James Clerk Maxwell. Swan subsequently joined the Scottish Naval and Military Academy, where in 1857 he demonstrated that Fraunhofer's D-line in the spectrum of the Sun was caused by the presence of sodium; in this respect, he is sometimes credited as having inspired Gustav Kirchhoff's research into the same issue.