Ever since grade school, we’ve continually grappled with the minor inconvenience of our shoelaces coming untied. But why does the simple act of walking cause the knot to come undone in the first place?

A new study conducted by researchers at the University of California, Berkeley and published in the Proceedings of the Royal Society A explains exactly why shoelaces come loose. The culprit: “a double whammy” of stomping and whipping forces that act like an invisible hand loosening the knot and tugging on the free ends of the laces.

Researchers filmed a runner on a treadmill in slow-motion. By putting accelerometers on the runner’s feet while she walked and ran in different shoes, the team determined that the foot strikes the ground at seven times the force of gravity. In response to that force, the knot stretches and then relaxes. Then, as the knot loosens, the swinging leg applies an inertial force on the free ends of the laces, which rapidly leads to a failure of the knot in as few as two strides after inertia acts on the laces.

The team was surprised by “how many forces were interacting on the foot while walking or running,” UC Berkeley graduate researcher Christine Gregg said. “It’s a dynamic environment involving swinging motions and high impact forces.”

Additional experiments were conducted to isolate the impact, direction of force, and inertia that occur before shoelaces become untied. In one test, a pendulum impacted a surface, simulating the one-directional impact of walking. The researchers tied laces to the end of the pendulum in different directions to test the effect of impact direction. They also put weights on the free end to magnify the effect of inertia — or the force caused by their own weight and whipping motion.

The researchers concluded that not all knots are equal. The stronger form is the square knot, which is comprised of two lace crossings of opposite handedness on top of each other. The weaker form is a version of a false knot made from two lace crossings of the same handedness, which causes the knot to twist instead of lie flat when tightened. Although the dynamic forces that cause the untying are the same in both knots, the strong knot structure better mitigates the forces.

“We suspect that it has to do with the twist in the knot that is present in the weak form, but this is still just a hypothesis and we are still testing,” Gregg said.

She added that the interesting thing about this mechanism is that “your laces can be fine for a really long time, and it’s not until you get one little bit of motion to cause loosening that starts this avalanche effect leading to knot failure.”

Beyond shoelaces, understanding what makes entangled structures strong or weak could potentially have applications in topics as diverse as surgery sutures or DNA folding.