Nature is rich in structure, which defines the properties not only of the tiniest pieces of matter, but of galaxies and the universe itself. That structure explains both the sound of music, and what is embodied in our DNA.

Our world consists of complex hierarchies of about 100 different chemical elements, and it is the arrangement of these elements into molecules that gives rise to the rich set of materials around us—from the sugar molecules in the food we eat to the oxides in the Earth’s crust. In the living world, a limited set of building blocks of DNA (with four distinct letters) and amino acids (with around 20 distinct types) creates some of the most functionally diverse materials we know of, the stuff that builds our bones, skin, and complex organs such as the brain.

The properties of a piece of matter are defined not by the basic building blocks themselves but by the way they are organized into hierarchies. This paradigm—where structure defines function—is one of the overarching principles of biological systems, and the key to their innate ability to grow, self-repair, and morph into new functions. Spider silk is one of the most remarkable examples of nature’s materials, created from a simple protein spun into fibers stronger than steel.

As we begin to appreciate the universal importance of hierarchies, engineers are applying this understanding to the design of synthetic materials and devices. They can gain inspiration from a surprising source: music.

In the world of music, a limited set of tones is the starting point for melodies, which in turn are arranged into complex structures to create symphonies. Think of an orchestra, where each instrument plays a relatively simple series of tones. Only when combined do these tones become the complex sound we call classical music. Essentially, music is just one example of a hierarchical system, where patterns are nested within larger patterns—similar to the way characters form words, which form sentences, then chapters and eventually a novel.

Composers have exploited the concept of hierarchies for thousands of years, perhaps unknowingly, but only recently have these systems been understood mathematically. This math shows that the principles of musical composition are shared by many seemingly diverse hierarchical systems, suggesting many exciting avenues to explore. From the basic physics of string theory to complex biological materials, different functions arise from a small number of universal building blocks. I call this the universality-diversity paradigm.

Nature uses this paradigm to design its materials, creating new functions via novel structures, built using existing building blocks rather than fresh ones. Yet through the ages humans have relied on a totally different approach to construct our world, introducing a new building block, or material, when a new function is required. For example, an airplane consists of thousands of different materials that originate from very different sources, such as plastics, metals, or ceramics.

It is not the building block itself that is limiting our ability to create better, more durable or stronger materials, but rather our inability to control the way these building blocks are arranged. To overcome this limitation, I am trying to design new materials in a similar way to nature. In my lab we are using the hidden structures of music to create artificial materials such as designer silks and other materials for medical and engineering applications. We want to find out if we can reformulate the design of a material using the concept of tones, melodies, and rhythms. Can a composer come up with a radically different approach to design?

Our brains have a natural capacity for dealing with the hierarchical structure of music, a talent that may unlock a greater creative potential for understanding and designing artificial materials. For example, in recent work we designed different sequences of amino acids based on naturally occurring ones, introducing variations to create our own materials with better properties. However, the way in which the different sequences of amino acids interact to form fibers is largely a mystery and is difficult to observe in an experiment. To gain more understanding, we translated the process by which sequences of amino acids are spun into silk fibers into musical compositions.

In this translation from silk to music, we replaced the protein’s building blocks (sequences of amino acids) with corresponding musical building blocks (tones and melody). As the music was played, we could “listen” to the amino acid sequences we had designed and deduce how certain qualities of the material, such as its mechanical strength, appear in the musical space. Listening to the music improved our understanding of the mechanism by which the chains of amino acids interact to form a material during the silk-spinning process. The chains of amino acids that formed silk fibers of poor quality, for example, translated into music that was aggressive and harsh, while the ones that formed better fibers sounded softer and more fluid, as they were derived from a more interwoven network. In future work we hope to improve the design of the silk by enhancing those musical qualities that reflect better properties—that is, to emphasize softer, more fluid and interwoven melodies.

This approach has implications far beyond the design of new materials. In future we might be able to translate melodies to design better sequences of DNA or amino acids, or even to reinvent transportation systems for cities. Underlying this approach is a branch of mathematics called category theory, which describes the character of the links between different objects within a system. For example, it describes the way a material works by categorizing each of the building blocks (atoms and molecules) with respect to each other, the way they interact and how their interactions create a certain function such as toughness. Category theory finds common descriptions of seemingly distinct systems, creating the possibility to translate back and forth from one field to another.

Using category theory we can discover universal patterns that form the blueprints of our world. We may be able to derive all the things we know—molecules, living tissues, music, the universe—by applying universal patterns in different physical manifestations. For example, a pattern of building blocks might be represented as music, to create a certain melody, or might be represented as DNA to create a certain protein. Both manifestations share the same basic rules for connecting up their building blocks, but the actual building blocks are physically different. In both representations, we choose properties according to the criteria we want to achieve: “beautiful” music or “strong” protein, for example.

Using music as a tool to create better materials may seem like an unusual proposal, but when we appreciate that the underlying mathematics of the structure of music are shared across many fields of study, it begins to make sense. Nature does not distinguish between what is art and what is material, as all are merely patterns of structure in space and time.

This article originally appeared in New Scientist.