Art Lifestyle

Common Threads Between Knitting and Engineering

About the Author: Kaylena Pham

At the time of writing, Kaylena Pham was a junior at the University of Southern California studying Geological Sciences. They are an avid knitter and enjoys fiber arts and crafting.

Knitting is a textile craft that bridges art, engineering, and computation together. From the binary structure of stitch patterns, to the mechanical properties of knitted garments, this craft is rooted in scientific principles that provide garments with different forms and functions. Understanding the science of knitting inspires modern day engineering innovations, showcasing knitting’s interdisciplinary nature that weaves creativity with science.

Introduction

“*K1, k1, p1, p1, repeat from * to last stitch,” or in other words, knit one stitch, knit another, purl the next, purl the following, and repeat until you reach the last stitch. Knits and purls are two different types of stitches utilized in many knitted garments. Many knitters rely on this sequence of stitches as a ribbing pattern for cuffs to a sweater. Knitting itself is a form of textile art that turns a ball of yarn into wearable garments. From simple scarves, to elaborate doilies and shawls, knitters across the world have kept this art alive. At first glance, knitting might seem simply artistic, however, its beauty lies in its ability to knit algebraic patterns into textile. Every stitch follows a rule based on a pattern that instructs its form, texture, and shape. 

Knitting is an interplay of math and sciences merged together into an artform. This centuries-old craft embodies the logic of modern engineering principles while continuing to inspire new innovations and design. Each stitch is governed by geometry and coded repetition, following precise mathematical principles. These concepts that create knitwear have shaped breakthroughs in computation, biomechanics, and soft robotics, demonstrating how a traditional textile practice can lead to inspiring cutting-edge research. From the computational logic of stitch patterns that nod to programming language, to the mechanical behavior of stitches reflecting material modeling, knitting is a representative of how interdisciplinary arts, sciences, and technology are.

From History to Technology

The threads between logic and materiality begins with the Jacquard loom. The Jacquard loom is a device that has the capabilities of weaving complex and detailed textiles (Figure 1) [1]. Using punch cards with holes and spaces, the loom is able to read each card to make patterned textiles (Figure 2). Each hole in a card represents whether a thread should be raised or lowered. These cards were then strung together to create automated woven patterns. The weaving process of the loom is binary, where the presence or absence of holes can be translated to the modern day 0 and 1 bits of computer programs [2, 3]. Essentially, the patterns of holes acts as a form of “programming” for the loom, demonstrating how encoded patterns can be reproduced mechanically.

Figure 1. Jacquard loom displayed in the National Museums of Scotland

Intertwining the automotive and repetitive capabilities of the Jacquard loom, knitting machines also began adopting punch cards to produce more complex patterns. Knitting machines have existed as early as the 1500s. But with the invention of the Jacquard loom, machines began using punch cards to operate actions that are traditionally made by needles. Knitting, similar to weaving on a loom, operates on coded sequences of stitches that is similar to the loom’s binary system. Each stitch represents a command that operates similar to a structured algorithm [4]. Just like how the Jacquard loom punch cards can be translated to 0 and 1 bits, so can knitting cards (Figure 3). Each perforation in the card results in different patterns that can be created as it follows the punch card’s programmed structure. Patterns on knitted garments are more than just for style, it is a physical manifestation of binary decisions that translate program into material. This concept of using sequences to control machinery lays the groundwork for modern day computing. 

Figure 2. Program cards from a ninteenth-century Jacquard loom [6]
Figure 3. Knitting machine punch card translated to a binary system

This simple concept of ‘programming’ a loom to produce fabrics inspired the original concept of computers: Babbage’s Analytical Engine. From the punch cards utilized in the Jacquard loom, Charles Babbage and Ada Lovelace, two mathematicians, found that the binary system of using holes to hold information can be transferred to automated machines [7]. Lovelace envisioned that computers could perform complex calculations by following algorithmic patterns [8]. Her vision with Babbage’s mathematical understanding of binary systems resulted in the concept of the Babbage’s Analytical Engine. While the Babbage’s Analytical Engine remained merely a concept, the idea of using punch cards to develop computers came to fruition in the early 1900s. 

In the past century, the U.S Census Bureau struggled to store and record data taken from an ever-growing population. Herman Hollerith, a statistician, was inspired by the Babbage’s Analytical Engine and invented a tabulating machine. Punch cards were used to store information taken from American citizens and could be processed by the machine to record census data [9, 10]. His cards were then  invested by IBM (International Business Machines Corporation), which adapted a punch card system for both inputs and outputs for their computers [9]. These cards allowed for data processing and storage, enabling businesses and government operations to organize data through electronic memory for nearly half a century [10, 11]. 

Mechanics of Knitting

Knitting itself is a study of structure and mechanics, with loops interlocking together to create a fabric that is able to stretch, bend, and shape. In a knit stitch, the yarn is pulled from the back of the fabric to the front through an existing loop, creating a new interlocking loop that sits smoothly on the surface. In contrast, a purl stitch pulls the yarn from the front to the back, producing a raised bump on the fabric’s surface (Figure 4) [12]. These two basic operations—knit and purl—are inverses of each other and form the binary foundation of all knitted patterns (Figure 3). When combined in alternating sequences, the geometry of how the yarn is looped together is what gives knitted fabrics their distinct strength and flexibility [13].

The geometry and how individual fibers of yarn twist together is crucial to a fabric’s performance [14]. Each loop behaves like a small spring, storing and releasing energy as the fabric is stretched and relaxed. The curvature and angle of the loops define how the fabric distributes tension and how much it can deform before returning to its original shape. This looping architecture gives knitted textiles their characteristic elasticity, softness, and resilience, unlike woven fabrics, which are more rigid due to their perpendicular yarn intersections [15]. The twisting of fibers from each loop gives the yarn tensile strength and flexibility, while the looping of yarns transforms a linear material into a three-dimensional, deformable network capable of stretching and recovering without permanent deformation [14, 15].

Figure 4. Visual of knit and purl stitches on a garment

Knitted fabrics exhibit anisotropic properties, meaning their mechanical behavior changes depending on the direction of the applied force. The anisotropic properties of yarn materials provides knitted garments with the ability to stretch and pull, allowing such garments to be engineered to specific needs [15]. For instance, a ribbing pattern is often used for cuffs of sweaters and cardigans and consists of alternating knit and purl columns. The alternating loops form elastic ridges that can easily expand and contract, providing both comfort and a snug fit [14,15]. This structure of stitches allows for the garment to be more flexible and stretch (Figure 5). 

But for the body of a sweater, cable and stockinette stitches are a different series of stitches that are often used to provide more structure to a garment. A stockinette stitch, which is created by alternating purl and knit stitches for each row creates a smooth surface with loops oriented consistently in one direction, giving the fabric a flatter and more cohesive form. Cable stitches, which are stitches braided together to form textured patterns, twist loops together to add thickness and strength while also reducing elasticity. These different stitch patterns alter the surface curvature of the fabric by changing how the yarn loops interact, a property described mathematically through Gaussian curvature [14]. 

Gaussian curvature, in the context of knitting, is the properties the looping structure of a stitch provides to a garment [14]. When knitting, each stitch creates a unique curvature profile depending on how yarn loops interact. With ribbing, because purl and knit stitches are inverses of each other, this alternation in the pattern allows the fabric to stretch and compress (Figure 5). In contrast, the uniform orientation of stockinette stitches have a near-zero Gaussian curvature, allowing it to lay flat. Cable stitches, on the other hand, are more complex as yarn crosses and overlaps with each other, creating raised textures that resists deformation [14]. The mechanical behavior of knitwear gives designers and engineers the ability to utilize the geometric influences of stitches to create garments that meet specific needs.

Figure 5. Unstretched (A) and Stretched (B) garment made with a ribbing pattern

Computing Knitting

While the physical act of knitting, whether by machine or by hand, are the embodiment of geometry and mechanics, knitted structures can be represented computationally. With textile arts being so closely tied to computing sciences, we are able to revisit simple patterns and understand them using algorithms and code. Taking a simple sequence that creates a ribbing pattern: “*k1, k1, p1, p1*,” (knit one stitch, knit the next stitch, purl the next stitch, purl the following stitch, and repeat from *) this can be seen as a matrix where each element represents a stitch and every row corresponds to loops on a needle (Figure 6) [15]. While there are many shorthand knitting symbols, this ribbing pattern can be analyzed using the syntax: | (knit) and — (purl). Breaking down this ribbing pattern, most ribbings are a repeated series of knitted and purled stitches that are alternated column by column (Figure 5, 6) [15, 16]. 

* knit 2, purl 2; repeat from *: 

| | — — | | — — | | — — | | — — | | — — | | 

| | — — | | — — | | — — | | — — | | — — | | 

| | — — | | — — | | — — | | — — | | — — | | 

| | — — | | — — | | — — | | — — | | — — | | 

| | — — | | — — | | — — | | — — | | — — | |

 

Figure 6. Model of a matrix for a ribbing pattern. Adapted from [16]

In this model, the ribbed pattern functions similarly to a programmed set of instructions one may use in coding languages to produce a desired output [16]. Just as how a computer executes a set of instructions based on a binary sequence, so too can knitting. Alternating between two fundamental operations: knit and purl, are a reflection of computer binaries that consist of 0s and 1s to generate results. Computers use these discrete variables to execute an order of commands just as knitters use a specific sequence of stitches, such as the alternating ribbing pattern, to create desired garment properties. 

Beyond the stitch pattern itself, external variables, such as loop size, yarn type, and stitch tension, can be modified to alter the fabric’s final properties, just as programmers manipulate variables and parameters in code to influence an algorithm’s output. Looking at knitted machines, this relationship is clear as punched holes in knitting cards serve as mechanical equivalents of digital code. Where each hole corresponds to a binary decision: lift the needle or leave it lowered (Figure 3). Changing yarn types and tensions on a machine can alter such results,

influencing the behavior of the knitted fabric. Alterations to the sequences of holes can produce different entirely different patterns of garment. A knitter can interpret symbolic commands and adjust variables to modify an output, just like how programmers can adjust their syntax and parameters to alter results [4, 16]. This physical execution of coded instructions mirrors the way computers run a program, transforming symbolic notation into results [16]. In both systems, logic and structure work together to translate abstract information into functional form.

With each stitch represented on a grid, researchers have used matrix-based algorithms to study how knitted fabrics behave under stressors, such as tension and compression (Figure 7). The looping geometry of stitches can be quantified utilizing mathematical models that represent the curvature, contact points, and deformation of each stitch in relation to its neighboring ones [17]. Translating stitches to a model allows scientists to stimulate how fabrics will behave based on the symmetry, pattern, and material of the yarn [14, 15, 18]. These models deepen our knowledge of the mechanics behind fabrics and allow engineers to create programmable material design to adjust a fabric before it is physically created. 

Knitting represents a physical form of coding. Each stitch is a different command and each row is a line of code. The final knitted garment is a compiled program that works various variables together to form an output. By adjusting structural and material variables, knitters and engineers alike “debug” and refine their work, iterating toward the desired output. How knitting embodies the same logical precision as computer programming offers insight into the relationships between the arts and sciences. 

Figure 7. Rendering of knitted garments with their color-coded matrix

Craft as a Scientific Language

 

Knitting embodies the overlap between crafting, science, and engineering. At its core, engineering is the connection of abstract concepts to solve problems and create solutions. Philosophers have distinguished scientific and theoretical thinking from creative practices, arguing that both are necessary to create harmony between thinking and producing results [20]. The act of knitting is intellectual in the form of logic and math. Stitches themselves, depending on the shapes and forms being created, are placed in precise positions that offer the most aesthetic and efficient garments. In hand knitting, the rhythm and positions of needles can determine the tension of the garment, allowing the creator to focus on the mental action of looping yarn together while also focusing on a pattern to create a material. For machine knitting, the creator must focus on the colors and patterns that are aesthetically satisfying. Creators would often create their own punch cards to insert into their knitting machines, enacting their logical knowledge to ensure each loop and stitch comes together in the desired outcome. Creatively, knitters utilize colors and patterns to create something that is uniquely theirs. Oftentimes, patterns would be tweaked and stitches can be altered to produce something that fits a creator’s vision. This invisible process of materializing thinking through design, math, and intention allows knitters to find the harmony between creativity and science [21]. 

Beyond the thinking process of knitting, this craft shares parallels with the engineering design process when knitting is viewed as a series of experimental steps. Every engineering problem begins with a hypothesis, just as every stitch is a hypothesis tested in real time. When designing a garment, the way the structure drapes to the material of the yarn are all ways knitters test their design. Creators will always readjust and redesign as they see fit, just as engineers will often find various methods to test their hypothesis to see which works best. Craftspeople will often find solutions and think by doing. Engaging with materials and testing different stitches reflect the same process of how engineers will often physically do field work and test substances to prove or disprove their hypothesis [22, 23]. Moreso, in the knitting community, open-source knowledge is widely available with websites, such as Ravelry, that are dedicated to sharing knitting patterns to the public [24]. Many engineering projects will allow public access to their datasets for other engineers to reference off of and computer sciences utilizes sites such as GitHub to share code with the wider community. The creative process intertwines with the process that engineers take to solve problems, showing how creativity and analysis are closely tied together. 

From Fabric to Function

While the principles of knitting are important to creating stylish garments, they have also shaped engineering innovations. Because knitted structures provide strength and flexibility, they have been integral in biomedical engineering research. Interlocking loops of knitted structures are porous, yet resilient, allowing for researchers to create scaffold knits from PLA (a thermoplastic monomer made of starches or sugars) fibers (Figure 8). The use of PLA can be incorporated with collagen or graphite to improve structural strength and performance [26]. These knits are used in tissue engineering to support cell attachment, growth, and regeneration, particularly in applications such as bone and ligament repair [25]. Combining art and science, engineers are able to create three dimensional structures that have controlled porosity and elasticity, mimicking the function of specific tissues.

Figure 8. Optical Images of a (A) PLA and (B) P4HB textile scaffold [27]

In the field of soft robotics, the same qualities knitted fabrics have of stretch and conformity apply well for programmable textiles and flexible actuators. From the study Knitting from Nature: SelfSensing Soft Robotics Enabled by AllinOne Knit Architectures (Yang et al., 2023), researchers were able to develop a single knit structure that functions as an actuator and a sensor [28]. The knitted fabric is able to be one physical structure that can move and sense touch. Researchers designed a textile where loops of the yarn can bend and twist when pressure is applied without the need of separate sensors or motors. The fabric is self-sensing and is more energy efficient than normal robotic actuators. Yarn acts like a circuit trace and stitches act as code, creating an intelligent material that provides low-cost actuators with customizable functional capabilities. 

Weaving in the Ends

From the rhythmic “K1, p1, repeat” of a ribbing pattern to the intricate programming of robotic fabrics, knitting embodies the enduring connection between craft and science. Across these applications, knitting is shown to go beyond a domestic craft, but a platform for advancing engineering. In biomedical engineering, the flexibility and porosity of PLA-based knitted scaffolds support tissue growth and regeneration. While in soft robotics, the geometric precision of stitches enables the creation of adaptive materials that bend, stretch, and sense their environment. 

Each stitch, governed by geometry and tension, operates like a coded command, producing outcomes that are both predictable and infinitely variable. This interplay of pattern and precision reflects the very heart of engineering and sciences: to translate abstract principles into functional design. No matter the application, knitting and its properties continue to guide modern innovation. Knitting is a reminder that innovation is not separate from the arts or sciences, but rather, an interwoven garment that brings forth new ideas and scientific understanding. It transforms yarn into loops of logic that are rooted in mathematical and scientific principles. This craft continues to advance scientific understanding, inspiring modern day innovations one stitch at a time.

Works Cited

[1] N. Gessler, “An Interview with Computer Collector Nicholas Gessler,” International Foundation for Information Technology, Publication CAB21, 2021. [Online]. Available: https://theiff.org/publications/cab21-gessler.html

[2] “Jacquard Loom,” Age of Revolutions, 2024. [Online]. Available: https://ageofrevolution.org/200-object/jacquard-loom/

[3] C. Stokes, “Programming owes its strength to our long legacy of knitting,” Opensource.com, 6 Jun. 2018. [Online]. Available: https://opensource.com/article/18/6/how-programming-evolved-knitting

[4] “A Graph Model and a Layout Algorithm for Knitting Patterns,” K. Gray, B. Bell and S. G. Kobourov, Preprint, Department of Computer Science & Department of Mathematics, University of Arizona, Tucson, AZ, 2024. [Online]. Available: http://rungray.github.io

[5] “Jacquard loom,” Age of Revolution, https://ageofrevolution.org/200-object/jacquard-loom/ (accessed Nov. 2, 2025).

[6] M. Wertheim, “Things That Think: An Interview with Computer Collector Nicholas Gessler,” The Institute for Figuring // Where the wild things are, https://theiff.org/publications/cab21-gessler.html (accessed Nov. 2, 2025).

[7] Davis, M., & Davis, V. (2005). Mistaken Ancestry: The Jacquard and the Computer. TEXTILE, 3(1), 76–87. https://doi.org/10.2752/147597505778052594 

[8] Marinos Koutsomichalis and Afroditi Psarra. Computer-Aided Weaving: From Numerical Data to Generative Textiles. 2015. DOI: 10.14236/ewic/eva2015.59

[9] Travelletter, “From the jacquard loom to the computer and IBM • Travel letter,” Travel Letter, https://www.travelletter.net/lyon/looms-lyon-computers/ (accessed Nov. 2, 2025). 

[10] C. Stokes & D. Stokes, “K2P1, or How Your Programming Language Evolved from Knitting,” YouTube video, 06:15, 27 Aug. 2018. [Online]. Available: https://www.youtube.com/watch?v=t-Bb0Lf3sCs&t=390s 

[11] “IBM Punched-Card History,” IBM Corporation. [Online]. Available: https://www.ibm.com/history/punched-card 

[12] Singal, K., Dimitriyev, M.S., Gonzalez, S.E. et al. Programming mechanics in knitted materials, stitch by stitch. Nat Commun 15, 2622 (2024). https://doi.org/10.1038/s41467-024-46498-z 

[13] de Araujo, Mario & Fangueiro, Raul & Hu, Hong. (2003). Modelling and simulation of the mechanical behaviour of weft-knitted fabrics for technical applications: Part I: General considerations and experimental analyses. AUTEX Research Journal. 3. 111-123. 10.1515/aut-2003-030303.

[14] Rout, S.K., Bisram, M.R. & Cao, J. Methods for numerical simulation of knit based morphable structures: knitmorphs. Sci Rep 12, 6630 (2022). https://doi.org/10.1038/s41598-022-09422-3 

[15] K. Singal et al., “Programming mechanics in knitted materials, stitch by stitch,” npj Flexible Electronics, vol. 8, 2024. [Online]. Available: https://pmc.ncbi.nlm.nih.gov/articles/PMC10960873/

[16] Bernasconi, Anna & Bodei, Chiara & Pagli, Linda. (2007). Knitting for Fun: A Recursive Sweater. 4475. 53-65. 10.1007/978-3-540-72914-3_7.

[17] Ding, V. Sanchez, K. Bertoldi & C. H. Rycroft, “Unravelling the Mechanics of Knitted Fabrics Through Hierarchical Geometric Representation,” arXiv preprint arXiv:2307.12360 (2023). [Online]. Available: https://arxiv.org/abs/2307.1236 

[18] A. du Pasquier et al., “Knit Happens: Designing the Mechanics of Machine Knitting,” arXiv preprint arXiv:2501.07567 (2025). [Online]. Available: https://arxiv.org/abs/2501.07567 

[19] Scheidt, Fabian & Ou, Jifei & Ishii, Hiroshi & Meisen, Tobias. (2020). deepKnit: Learning-based Generation of Machine Knitting Code. Procedia Manufacturing. 51. 485-492. 10.1016/j.promfg.2020.10.068.

[20] Parry, Richard, “Episteme and Techne”, The Stanford Encyclopedia of Philosophy (Winter 2024 Edition), Edward N. Zalta & Uri Nodelman (eds.)

[21] C. Dormor, A Philosophy of Textile: Between Practice and Theory. 2018.

[22] R. Mack, Handicraft Philosophies: Craft, Representation, and Social Knowledge in Eighteenth-Century Britain.

[23] M. Craig, A. Peterson & S. Peterson, “Following a thread: knitting patterns and program tracing,”

[24] C. Stokes, “Programming owes its strength to our long legacy of knitting,” Opensource.com, https://opensource.com/article/18/6/how-programming-evolved-knitting (accessed Nov. 2, 2025).

[25] “Modelling and simulation of the mechanical behaviour of weft-knitted fabrics for technical applications — Part I: General considerations and experimental analyses,” [ResearchGate], 2008. 

[26] Gokarneshan N, Varadarajan B, Sentil kumar C, Balamurugan K, Rachel A. Engineering knits for versatile technical applications: Some insights on recent researches. Journal of Industrial Textiles. 2011;42(1):52-75. doi:10.1177/1528083711426021 

[27] Caronna, In vitro evaluation of bioabsorbable poly(lactic acid) (PLA) and poly-4-hydroxybutyrate (P4HB) warp-knitted spacer fabric scaffolds for osteogenic differentiation, https://iopscience.iop.org/article/10.1088/1748-605X/ada85d (accessed Nov. 2, 2025). 

[28] Yang, Mengxin & Sun, Fei & Hu, Xiaorui & Sun, Fengxin. (2023). Knitting from Nature: Self-Sensing Soft Robotics Enabled by All-in-One Knit Architectures. ACS applied materials & interfaces. 15. 10.1021/acsami.3c09029.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *