It is the first time since the 1890s that a president who was defeated in an election has returned victorious to take the oath for a second time.