They are schooling fish... but I would leave him be.
You have 2 options here.
1) if you do not mind having a single rainbow, leave him as the king of your tank.
2) If you actually want a school of rainbows, give him away or back to the store, and try a new group.
Finally, be sure that he was actually killing the other fish. Make sure your water is clean, healthy, free of disease, and the correct temperature (they like it generally cooler). Other than that, it is really your call. I have kept single rainbow fish before that have no issues at all. Every once in a while, you get a fish who does not follow the rules. It sounds like you have one of those.
Now for my story:
I had a Praecox (Dwarf Neon) who did the same thing. I had him for years, and all of a sudden, he flipped out when we moved to a new house and attacked everything else in the tank tirelessly. Huge fish, small fish, Plecos, Corys, the other Rainbows, everything. I quarentined him, and put him back in a week later after a time out, and he still did the same thing. I eventually did not want to risk it, and took him to my local fish store. They were sooo happy to get him because he was huge and beautiful. It was a sad day, but it is nice to see him in their display tank....(mocking me).