 After graduating from school, he went to Kolozsvár, the capital of Transylvania, where he attended the Franz Joseph University.After qualifying as a teacher of mathematics and physics Vályi was awarded a scholarship to allow him to study for two years at the University of Berlin, where the remarkable mathematics team of Kummer, Borchardt, Weierstrass and Kronecker were lecturing.His doctoral dissertation was on the theory of partial differential equations of the second order.