Born into a wealthy Polish Jewish family in Lemberg, Austria-Hungary ; Ulam studied mathematics at the Lwów Polytechnic Institute, where he earned his PhD in 1933 under the supervision of Kazimierz Kuratowski and Włodzimierz Stożek. In 1935, John von Neumann, whom Ulam had met in Warsaw, invited him to come to the Institute for Advanced Study in Princeton, New Jersey, for a few months. From 1936 to 1939, he spent summers in Poland and academic years at Harvard University in Cambridge, Massachusetts, where he worked to establish important results regarding ergodic theory. On 20 August 1939, he sailed for the United States for the last time with his 17-year-old brother Adam Ulam. He became an assistant professor at the University of Wisconsin–Madison in 1940, and a United States citizen in 1941.