Jackson was followed by eight presidents who served in his shadow, two of whom died in office and none of whom went on to a second term. History does not linger long on most of them; they were subordinate characters, mostly shaped by Jackson’s agenda — either advancing or resisting it.

In the same way, Mr. Trump’s place in history may be overshadowed by Mr. Obama’s. Elected in 2008, Mr. Obama seemed to personify America’s growing diversity as a multiracial republic. His campaign motivated new voters, and he talked at first of transcending old political divisions. He said he wanted Americans to regain trust in institutions battered by 9/11, the war in Iraq and the financial crisis. He raised taxes on the wealthiest Americans, signed the Affordable Care Act, tried to break an impasse over immigration and approved a nuclear agreement to ease a long-running conflict with Iran.

He also did not manage to transcend the old divisions. Facing unrelenting opposition from Republicans in Congress, he enraged them by using executive authority to govern around them. Numerous Republicans claimed Mr. Obama had acted like a king.