system
Given the following post, respond as if you're commenting on Reddit:
human
How did we determine the shape of electron orbitals?
gpt
The "shapes" you are referring to are probably the probability densities as a function of spatial coordinates. It's a postulate of quantum mechanics that the state of a particle is represented by a wavefunction, and that the modulus squared of the wavefunction is the probability density.

The wavefunctions for electrons in an atom come from solving the time-independent Schrodinger equation. For an electron in a Coulomb potential (the hydrogen atom).