# How do galvanic cells work?

I was wondering how a galvanic cell works

If you look at the picture below, if I have magnesium metal in sulfuric acid, will the metal react with the acid to be then turned into magnesium ions and in the process give away 2 electrons and that is how electrons are given in any cell: the electrode interacts with the electrolyte in the anode and then gives up electrons? And if this is the case, then why wouldn't the zinc replace copper in copper sulfate at the cathode and also give 2 electrons away?

What am I doing that is wrong?

• This galvanic cell is bad in that each half-cell would readily react on its own (zinc would replace copper, magnesium would replace hydrogen). That being said, it still might be able to produce some current. – Ivan Neretin Aug 19 '16 at 6:19
• ok then how should one choose an electrolyte – user510 Aug 19 '16 at 17:24
• Choose it so that it would not react with the corresponding electrode. In this case, $\ce{MgSO4}$ and $\ce{ZnSO4}$ would do. – Ivan Neretin Aug 19 '16 at 19:25
• so if the electrodes don't react with the electrolyte, then how do they give electrons? – user510 Aug 19 '16 at 19:39
• Like always: ions to the solution, electrons to the wire. – Ivan Neretin Aug 19 '16 at 20:28

First of all I think that it would not work. In a galvanic cell they should create an electron potential, but in your cell, half cell would react within itself, so no electron potential will be created. The one with $\ce{Mg}$ and $\ce{H2SO4}$, $\ce{Mg}$ will displace $\ce{H2}$ creating $\ce{MgSO4}$. In a cell it is necessary to have a similar salt in container to the plate we have taken, here it is of $\ce{Mg}$ so that they would not react itself rather react with the one in other half cell. I hope that this will be enough. I am ready to help you further.