IPhone shutting itself down?

I have an iPhone 4 and have had it less than a week. I upgraded to iOS 6 and it has been restarting itself when I plug it in, I get horrible battery life, and it feels warm after it reboots itself. Any ideas what's wrong?

Added (1). But it's just when I plug it in to charge. After it reboots it cools off and charges.

It could be because you've been using it too much or it's overheated. I have an iPhone 4 as well and this happens quite frequently.

  • Why is my iPhone 4 shutting down with 20% battery left? For the past week, my phone's been shutting off when it gets to 20% battery life. I don't know why, as I make sure background apps are shut off… Anyone know any solutions to stop this happening?
  • Why is my iPhone 4 always shutting itself off when not on charge? Today I got a new iPhone 4 and for the first hour or so it was working fine. It kept turning itself off whenever it wasn't on the charger but it was already fully charged. I would turn it on then it would just turn straight off. I need help.
  • My iphone keeps shutting down ever since i updated to ios 7? My iphone 4s was working great until i updated it to ios7 even if its fully charged it just stays for a few minutes and shuts down! And shows the charger sign. Then when i plug it in again it works and the battery is full! What should i do.
  • My iPhone 6 has been shutting off by itself? I have only recently bought my iPhone 6 about 1 month ago and only dropped it twice and the drops weren't too high or too rough. But at night when I go to sleep I charge it right next to me and i make it is charging but when I wake up it completely shuts down and it does not turn on unless the do the reset method which is to hold both the home and lock button. This has happened only 2 times. Is this normal or what is the problem? Should it