Carl Gustav Axel Harnack (7 May [O.S. 25 April] 1851, Dorpat (now Tartu) – 3 April 1888, Dresden) was a Baltic German mathematician who contributed to potential theory. Harnack's inequality applied to harmonic functions. He also worked on the real algebraic geometry of plane curves, proving Harnack's curve theorem for real plane algebraic curves.
He was the son of the theologian Theodosius Harnack and the twin brother of theologian Adolf von Harnack (who long outlived him) - all of them from Dorpat, now known as Tartu, in what is today Estonia. After his studies at the University of Dorpat (where his father was a professor), he moved to Erlangen to become a student of Felix Klein. He published his Ph.D. thesis in 1875 and received the right to teach (venia legendi) at the University of Leipzig the same year. One year later he accepted a position at the Technical University of Darmstadt. In 1877 he married Elisabeth von Öttingen, and they moved to Dresden, where he acquired a professorship in the Polytechnikum, which became a technical university in 1890. Harnack suffered from health problems from 1882 onwards, forcing him to spend long periods in a sanatorium. He published 29 scientific articles and was a well-known mathematician at the time of his death.
The various Harnack inequalities in harmonic analysis and in related discrete and probabilistic contexts are named after him, as are Harnack's curve theorem and Harnack's principle. The Harnack medal of the Max Planck Society is named after his brother, Adolf von Harnack.