If he destroyed the matrix in the Revenge of the Fallen how is he a prime?
I thought all primes had the matrix?
First of all there is some misconception it seems. There is only ONE single matrix we know of in the filmverse (and also in almost all other universes).
Secondly even though the matrix dissolved to bring prime back to life....it reappeared in Transformers 3 where it was inside of his chest.
Now as to HOW he is a prime with / without the matrix is a bit more complicated. As it changed considerably during the years how this is handled. At first it was the one who held the matrix was "Prime". Nowadays it is that you are either one of the first primes, or (like mentioned in Revenge of the Fallen) you have a prime as an ancestor.
Although I have to admit the last thing I never understood how that is possible as......Transformers are created not exactly born. Maybe the new film will shed some light into that (Transformers 5), but I don't have much hope there though as it was mentioned only in Transformers 2 and never again (with the ancestors).
(So even while Optimus did not have the Matrix...in the universe he was still a prime. Same for Sentinel PRIME).