Untied shoelaces -- it's one of life's most annoying quirks. A team of mechanical engineers at the University of California Berkeley has had enough, so they investigated the reason why shoelaces keep on coming untied.

According to a report from Phys Org, the group found that the feet's combination of stomping on the ground and whipping around act as an "invisible hand," loosening and eventually untying the knot.

"When you talk about knotted structures, if you can start to understand the shoelace, then you can apply it to other things, like DNA or microstructures, that fail under dynamic forces," Christopher Daily-Diamond, study co-author and a graduate student at Berkeley, explained. "This is the first step toward understanding why certain knots are better than others, which no one has really done."

There are two ways people generally tie their shoelaces: the "granny knot" and the "square knot" that tends to last longer. Both eventually fail though, and to find out why, the researchers conducted several experiments testing the knots. First, one of the study authors Christine Gregg hopped on a treadmill as her colleagues filmed her feet.

With the slow-motion video, the team observed that the foot strikes the ground at seven times the force of gravity. Reacting to this increased force, the knot stretches and relaxes with the foot's movement. This causes the knot to loosen, and when the swinging leg also applies inertial force on the ends of the shoelaces, it's only a matter of time that the knot becomes untied. The shoelaces can unravel in as little as two strides.

Walking -- the combination of stomping and swinging -- is necessary for the knots to come undone. A report from Science Magazine stressed that simply stomping will not get the knot to fail, nor will just swinging the feet.

"We were able to see that these two combined effects lead to shoe knots failing," UC Berkeley engineer Oliver O'Reilly told Science Magazine. "You need both together."

The experiment also underlined the superiority of the square knot, which only failed half the time compared to the granny knot, which failed all the time. Scientists still need further studies to figure out why one knot is stronger than the other.

The significance of knots goes beyond solving the everyday problem of shoelaces. Understanding these mechanics has other practical applications like mountaineering and climbing, sailing and even surgical sutures. More importantly, knots exist on a microscopic level as well such as in the DNA.

The study appears on the journal Proceedings of the Royal Society A.