Udayin was a king of Magadha in ancient India. Udayin laid the foundation of the city of Pataliputra at the confluence of two rivers, the Son and the Ganges. He shifted his capital from Rajgriha to Patliputra due to the latter's central location in the empire.