Béla Bartók was born in Nagyszentmiklós, Hungary (more recently part of Romania) in 1881. His parents were both amateur musicians. His mother gave him his first piano lesson on his fifth birthday and, at the age of nine, Bartók had written several short pieces. He began studying at the Gymnasium in Nagyvárad in 1891, and in May 1892 he gave his first public performance as both composer and pianist. Although his mother moved the family around over the next few years, Bartók managed to learn his trade and attended the Budapest Academy of Music, becoming a well-known pianist in the following years.
Until 1906, Bartók composed prolifically, producing works such as the Violin Sonata (1903), the Piano Quintet (1903-4), and the First Orchestral Suite (1905). He travelled between such places as Budapest, Berlin and Vienna, giving piano recitals and often performing his own music. His compositions were particularly influenced by Hungarian folksongs and the music of Richard Strauss. Beginning in 1905 and continuing for the rest of their lives, Bartók and Zoltan Kodaly collaborated on collections of genuine Hungarian folk music, often arranged for voice and piano. In 1907 Bartók became a professor of piano at the Budapest Academy of Music, and began to collect folk music from other countries, including Slovak, Romanian and Transylvanian songs. In 1909 he married his pupil Márta Ziegler.
Largely withdrawing from public life and concentrating on his studies of folk music, it was not until around 1915 that Bártok began to produce music again, with such works as the Piano Suite (1916), the Second Quartet (1915-17) and the ballet The Wooden Prince (1917). In 1918 he wrote the piano score for his second ballet The Miraculous Mandarin.
Throughout the 1920s, his international reputation grew as he toured in England, France, Germany, the Netherlands, Switzerland, Italy, Czechoslovakia, Romania and the USA. In the 1930s he published his collections of folksongs and was commissioned to compose a few new works. Seeking to escape the Nazis, Bartók left for the United States in late 1940, where he settled with his wife, and studied American collections of folk music, working as a researcher at Columbia University and Harvard. In 1942 his health began to decline, and he was later diagnosed with polycithemia. He died in West Side Hospital, New York, in 1945, homesick but still composing.