Turning Electricity into Matter
Electrolysis is the process of using an external source of electricity to force a non-spontaneous chemical reaction to occur. This is how we electroplate jewelry with gold, how we purify aluminum from bauxite ore, and how we split water into hydrogen fuel.
Faraday's Law of Electrolysis allows engineers to calculate exactly how much physical mass of a metal will be deposited onto an electrode based on how much electricity they pump into the system.
The Chemistry of Current
Electrical current (measured in Amperes) is simply a flow rate. One Ampere equals exactly one Coulomb of electrical charge flowing past a point every second. If we know the current and how long we leave the machine turned on, we know the total charge (Coulombs).
By dividing the total Coulombs by Faraday's Constant (96,485 C/mol), we can literally count exactly how many moles of electrons we forced into the chemical bath.
The Equation
To find the final mass, you simply multiply the moles of product by the molar mass of the metal on the periodic table.