two pencils connected to a battery. One side producing Hydrogen gas, the other side producing oxygen gas
An example of an electrolysis lab setup

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