Why Do I Sometimes Get a Shock When I Touch a Doorknob?
The little shocks you can get by walking on a carpet come from what is called static electricity. Static electricity is created when positive and negative charges aren’t balanced.
Everything in nature has atoms, and every atom has electrons. When your shoes rub against a thick carpet, they may scrape away some electrons.
If your body builds up a surplus of electrons, it has a negative charge. Things with opposite charges are always attracted to each other, so positive charges seek negative ones and negative ones seek positives.
If your hand touches something that can easily carry electrons (such as a doorknob), the electrons will leap from your hand to the doorknob. You will then see an electric spark and feel a little shock. The shock may surprise you, but it is not dangerous.