Two things that are important to an electron
Electrons are fast moving entities; in the order of speeds of 1,367 miles/second.
Some atoms have few electrons (such as hydrogen with 1, carbon with 6, nitrogen with 7, and oxygen with 8); others have many (such as silver with 47, iodine with 53, and mercury with 80).
How come electrons don't crash into each other?
Electrons want to stay far away from each other
The first element that is critical for electrons is that they stay away from sister electrons.
Their negative charges repel.
Thus, when electrons are in the same energy level, they want to stay as far apart from each other as they possibly can.
Electrons would love to get closer to the nucleus
The second element that drives electrons is an electrostatic attraction to the nucleus.
Electrons would like to decrease their energy level; getting closer to the nucleus will do just that. However, each electron has been imbued with a certain amount of energy. As the electron veers towards the nucleus, its internal energy pulls it away.
It's sort of like being scolded by a schoolteacher to stay in its designated seat.
Particle/wave character
This is what gives the electron its wave character: one force pulls it towards the nucleus and its own energy pulls it away.
Just imagine driving your car down the circular off ramp at fast speed: Even as you are trying to circle down the ramp, the car is veering outwards. In a similar fashion, as the electron is pulled in ; its own energy forces it out .
Electrons don't crash: Meeting an electron's needs
Those two forces create patterns where electrons are most likely to be.
For electrons to be as far apart from each other at a given energy level, their best bet is to live at the vertices of a Platonic solid. Given that the sides of Platonic solids of are equal length, electrons are able to stay at arm's length from their sisters.
Electrons are also pulled in to the nucleus. Thus, they perform a dance that seems like the one depicted in the image above. It is this dance that gives the electrons their wave/particle character.
The tips of an octahedron
The net effect is that of an electron "living" in a composite of positions in an orbital-like structure: close enough to the nucleus when it can be, not too close to the other electrons, and always following the dictates of its internal energy.
The schematic image below shows 6 electrons as far apart from each other on a sphere. For the creation of the p orbitals, those six electrons are perched on the tips of an octahedron. Electrons don't crash because when one of the electrons moves away from the vertex of the octahedron, the others follow suit. They move in a direction that will maintain appropriate distancing.
Creating p-orbitals
Those two forces create our electron orbitals in the following manner (example, for a p-orbital):
- The most effective way for electrons to stay as far apart from each other is to 'live' at the the vertices of a Platonic Solid (the image above on the left shows 6 vertices equidistant from each other)
- The electron travels along its energy arc along a spherical surface (# 1)
- However, it is pulled towards the nucleus (# 2)
- Its own energy pulls it away from the nucleus back to the sphere's arc (# 3), still staying apart from its sister electrons
- Visualize a multiplicity of such actions, some getting closer to the nucleus, some not as much
- This creates our 3-dimensional p-orbital
Those two forces - keeping electrons as far as possible from each other and strong attraction to the nucleus - create our electron orbitals. Electrons don't crash when they each have defined places that they are most encouraged to be.