After attending a private school as well as the Cölnische Humanistische Gymnasium, he entered the University of Berlin in 1844 where took his doctor's degree three years later under the supervision of Heinrich Gustav Magnus. His thesis on that occasion was devoted to a question in organic chemistry, for he held the opinion that the study of chemistry is an indispensable preliminary to the pursuit of physics, which was his ultimate aim. In Berlin he made the acquaintance of Hermann von Helmholtz at the house of Heinrich Gustav Magnus and was one of the founders of the Berlin Physical Society.