Pakatan Harapan chairman Tun Dr Mahathir Mohamad was officially sworn in as the seventh Prime Minister of Malaysia on Thursday night.