Beethoven moved to Vienna in 1792, when he was 21 years old. He was probably first introduced to the great composer Joseph Haydn in late 1790, when the latter was traveling to London and stopped in Bonn around Christmas time. They met in Bonn on Haydn's return trip from London to Vienna in July 1792, and it is likely that arrangements were made at that time for Beethoven to study with the old master.
Years later, after Beethoven achieved widespread fame, Haydn wanted to take credit. He told those close to him that he wanted Beethoven to tell his publisher to print on the front cover of his compositions the acknowledgment: "By Ludwig van Beethoven, student of Josef Haydn."
When Beethoven heard about this he was ticked off. He said incredulously, "What? I never learned anything from him!"