Problems In High School Chemistry/Inchem/reactions/decomposition

Decomposition is the breaking down a compound back into its components (elements). A form of decomposition is electrolysis, a method of decomposition through adding electricity. When new energy (in the form of electricity) is added to the molecules they become unstable again and start vibrating. After vibrating enough, the element with the higher electron affinity takes the remaining electrons to remain stable, and the other atoms become unstable

Electrolysis lab set up with two pencils
An example of an electrolysis lab setup