Sayyiduna Ibn Abbas (may Allah be pleased with them both) says: "Allah Almighty made the prayer obligatory by the tongue of His Prophet (peace and blessings be upon him): four rak'ahs when resident and two rak'ahs when travelling."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 12410