Sentinel Prime never wasted a single micro second to kill Optimus, thus Sentinel was the predecessor of Optimus, and Optimus offered him the Matrix of Leadership, but Sentinel refused to accept it.
He betrayed the Autobots due to bringing back his very own planet, Cybertron. When Sentinel's ark was crash-landed on the moon, Soundwave and his evil Decepticons took all the pillars except 5, including the control pillar.
The only way to revive him needed the matrix. This is the thing Optimus affected to Sentinel and revived him, and he knows that the Deceptions had all other the pillars so he betrayed.
Ironhide is the only badass Autobot, which is the strongest one and the most feared bot, so Sentinel blasted him with his sonic rust cannon.
Sentinel needed to be treated like a god; in the final battle he says to Optimus "we were gods once all of us (the 13 primes), but here there will be one". Optimus tried to stop transporting the resources so it made Sentinel a little bit angry.