The study of the design and function of batteries, including the electrochemical reactions that occur within them.