
The practice of purposely looping thread to create intricate knit garments and blankets has existed for millennia. Though its precise origins have been lost to history, artifacts like a pair of wool socks from ancient Egypt suggest it dates back as early as the 3rd to 5th century CE. Yet, for all its long-standing ubiquity, the physics behind knitting remains surprisingly elusive.
“Knitting is one of those weird, seemingly simple but deceptively complex things we take for granted,” says theoretical physicist and visiting scholar at the University of Pennsylvania, Lauren Niu, who recently took up the craft as a means to study how “geometry influences the mechanical properties and behavior of materials.”
Despite centuries of accumulated knowledge, predicting how a particular knit pattern will behave remains difficult—even with modern digital tools and automated knitting machines. “It’s been around for so long, but we don’t really know how it works,” Niu notes. “We rely on intuition and trial and error, but translating that into precise, predictive science is a challenge.”
In a paper published in the Proceedings of the National Academy of Science, Niu and her mentors Randall Kamien of Penn’s School of Arts & Sciences and Geneviève Dion of the Center for Functional Fabrics at Drexel University have presented a model that seeks to decode the ancient practice of knitting by ascribing a mathematical language to the stitches in knits and purls.
“The beautiful thing about Lauren’s approach is that it doesn’t just describe what’s happening—it predicts it,” says Kamien. “We’re taking the tools we use to study everything from gravity to soap bubbles and applying them to knitting. And, remarkably, it works.”
Dion, drawing from her experience as a textile researcher and garment designer, views this work as a crucial convergence of scientific theory and practical design applications. “Right now, fabric design relies on experience, experimentation, and intuition,” she says. “If we can apply predictive models to textiles, we open the door to fabrics with precise, engineered properties—whether it’s self-folding medical materials, reconfigurable structures for soft robotics, or garments that adapt to the body in new ways.”
Decoding knitting, one stitch at a time
To build their model, Niu borrowed mathematical techniques from an unexpected source: general relativity, the theory used to describe the warping of space and time. While relativity explains how gravity bends space-time, the researchers applied similar geometric principles to explain how the looping paths of yarn create curvature in knitted fabrics.
“It started with the simple observation that knit fabrics curl in specific ways,” Niu says. “Think of when you cut the sleeves off a T-shirt, and it curls up; that usually means it’s made with only knit stitches. Purls just curl in the other direction.”
However, when knits and purls are combined, “that’s when the magic happens,” Dion says. “You get these incredible self-folding structures that can be soft and flexible but also structured and resilient.”
Niu explains that knitting, at its core, is a method of transforming a one-dimensional strand of yarn into a structured, flexible two-dimensional sheet, which can then fold itself into complex three-dimensional shapes. The researchers realized that this transformation could be described mathematically using the same principles that govern how surfaces curve in space.
Instead of seeing a knitted fabric as just a collection of interlocking loops, the team treated it as a continuous surface with an intrinsic curvature determined by the arrangement of stitches. By applying the formalism used to describe how materials bend and stretch—known as elasticity theory—they built an energetic model that simulates the forces acting on the loops of yarn and predicts how a piece of fabric will deform in space.
“The key insight was recognizing that knitting operates like a programmable material,” Kamien says. “By controlling the stitch pattern—just knits and purls—you can essentially encode instructions for how the fabric will behave once it comes off the needles. That’s why a scarf, a sock, and a sweater can all come from the same kind of yarn but behave so differently.”
Their simulations revealed that the mechanical properties of knitted fabrics often depend more on stitch geometry than on the material itself. Whether the yarn was wool, cotton, or synthetic, the fabric’s tendency to curl, pleat, or expand followed universal geometric rules. This suggests that knitting is governed by fundamental mathematical principles—ones that could be harnessed to design materials with precise, tunable behaviors.
Where knitting meets origami
Niu explains that the work fits into the larger focus of Kamien’s group, particularly its research on kirigami, the art of cutting paper to create complex, foldable structures.
“Kirigami, much like knitting, is an example of how geometry can be used to encode mechanical properties into a material,” she says.
The team’s previous work has explored how strategically placed cuts in a sheet can cause it to morph into specific three-dimensional shapes when stretched. The insights from knitting take this idea further, showing that a material’s internal structure—not just its cuts—can dictate how it folds and unfolds.
“The parallels between knitting and kirigami are striking,” Kamien says. “In kirigami, you add cuts; in knitting, you add loops. But in both cases, you’re programming geometry directly into the material so that it shapes itself without requiring extra inputs like heat, hinges, or reinforcements.”
Dion coined a new term for this approach: knitogami™—a fusion of knitting and origami that captures the idea of self-folding textiles. “We call it knitogami because it extends the principles of origami into a soft, fabric-based medium,” she explains. “Instead of relying on folds and creases in paper, we’re using the inherent elasticity and structure of knitted loops to create dynamic, shape-shifting materials.”
By mapping out these rules, the team developed a framework that could be used to create programmable textiles—fabrics that shape themselves without requiring external forces like heat or manual pleating.
“If we can predict how a piece of fabric will shape itself just by changing the stitch pattern, we can start designing textiles with built-in functionality,” Dion says. “This could lead to garments that adapt to movement, medical textiles that mold to the body, or even large-scale deployable structures that assemble themselves.”
The next steps
Looking ahead, the team hopes to refine their model to incorporate even more complex stitch patterns and fabric behaviors.
“Right now, we’re focused on fundamental stitches—knits and purls—but the real world of knitting is much richer,” Niu says. “The goal is to take this mathematical approach and expand it to include cables, lace, and other advanced techniques that knitters have developed over centuries.”
Randall Kamien is the Vicki and William Abrams Professor in the Natural Sciences in the Department of Physics and Astronomy in the School of Arts & Sciences at the University of Pennsylvania.
Lauren Niu is senior research scientist at the Center for Functional Fabrics at Drexel University and a visiting postdoctoral researcher at Penn Arts & Sciences.
Geneviève Dion is a professor in the Department of Design at the Westphal College of Media Arts and Design and Founding Director of the Center for Functional Fabrics at Drexel University.
This research was supported by the Simons Foundation, the Kaufman Foundation, the Advanced Functional Fabrics of America, Inc. (Transaction HQ00342190016), the Air Force Research Laboratory (FA8650-20-2-5506), and NextFlex, as well as the U.S. Army DEVCOM–Soldier Center.