The president and president-elect shook hands as part of a long-standing tradition signifying the transfer of power.