Skip To Main Content
A colorful, abstract lattice-type shape, generated using algorithms.
Dr. Timothy A. Davis developed software to turn music into art for this piece titled “Inverse in Place.” | Image: Courtesy of Dr. Timothy A. Davis.

Dr. Timothy A. Davis uncovers and creates connections that can be difficult for others to see — at first. For Davis, a professor in the Department of Computer Science and Engineering at Texas A&M University, art and engineering form one such connection. 

Davis, who specializes in sparse matrix algorithms, explores this relationship between art and engineering through his work and art, identifying different types of beauty in each. He sees beauty in the code he writes, solving complex problems elegantly. He also combines math and music to create art, an experience that viewers don’t need a background in computer science to appreciate. 

Davis presented his art while delivering the 2025 I. E. Block Community Lecture at the joint annual meetings of the Society for Industrial and Applied Mathematics (SIAM) and The Canadian Applied and Industrial Mathematics Society on July 30, 2025, in Montréal, Canada. Over 1,000 mathematicians attended the conference. In a press release from SIAM, Davis said the lecture gave him the opportunity to share the connections he sees and the art he creates with a wider audience. 

What Are Sparse Matrix Algorithms?

For over 35 years, Davis has specialized in sparse matrix algorithms. A matrix is essentially a rectangular table of numbers. Davis explained matrices in terms of relationships. If all values in the matrix are non-zero, every variable is related and affects all the other variables. However, in a sparse matrix, most of the values within the table are zero, meaning the variables are not all related and don’t all affect each other. 

“Most data is sparse and can be thought of as collections of objects,” Davis said. “Imagine, for instance, that you’re Google, and you’re trying to solve the page rank problem. Their matrix of webpages could be 30 billion by 30 billion. But every page does not point to every other page on the web.”

Sparse matrices come up frequently in life, and the algorithms Davis writes enable people to analyze the relationships between the values inside them. His algorithms are widely used: Code he wrote is on every iPhone, for example, and is integral to how Google Street View connects images. 

But to solve large problems like this, Davis needs beautiful software built by beautiful code.

A matrix is a collection of objects, and I want[ed] to build one of those for music. So, I thought, ‘What are the objects? What are the friendships? What are the connections between those objects?

Dr. Timothy A. Davis

Beautiful Code

For Davis, code can be beautiful in lots of ways. Beautiful code is fast, efficient and easy to understand. 

“There can be beauty in the elegance of the algorithm that [the code] is implementing,” Davis said. “It’s a mathematical beauty of ‘oh, wow, that just clicks!’”

Davis likened elegant code to a ballerina dancing across a stage; there are other ways to cross the stage — plodding across would work — but the other ways lack the ballerina’s grace. Davis wants his code to be the ballerina. 

He also requires his code to be robust. In 2006, Davis wrote a book called “Direct Methods for Sparse Linear Systems,” published by the Society for Industrial and Applied Mathematics, that included 2,000 lines of code. No bugs have been discovered in this code since the book’s publication, which is, Davis explained, almost unheard of. 

The other software Davis has written encounters bugs, but his code has 20 times fewer bugs when compared to the typical bug rate for commercial quality code. How does he achieve this level of reliability?

“I’m very passionate about my software,” Davis said. “If it’s well-designed, I can see it, and understand it, and hammer it, and test it, and polish it and it’s beautiful.”

However, this mathematical beauty isn’t something everyone can immediately see. Davis’ art is more readily accessible. 

Beautiful Art

To develop the software he uses to turn music into art, Davis thought in terms of the relationships in sparse matrices. 

“A matrix is a collection of objects, and I want[ed] to build one of those for music,” Davis said. “So, I thought, ‘What are the objects? What are the friendships? What are the connections between those objects?’”

Davis defined the relationships between tones and time in a way that he thought would lead to a beautiful mesh and assigned colors to the different frequencies. 

“What if these two units of time are friends with each other? There’s no music theory that says this is the way music is. It’s nonsense,” Davis said. “But I was driven by the mathematical vision I had in my head and by what kind of art I wanted to produce.”

The result wasn’t an immediate success. To demonstrate how his first creation looked, Davis took a piece of paper from his desk, crumpled it into a ball and threw it across the room. But after adjusting the parameters in his code, he achieved results he was happy with. 

Davis creates thousands of images from each piece of music and manually selects the ones he likes. Sometimes, he’s surprised and delighted by the connections he finds. For example, one image generated from a Celtic hymn resembles the Celtic Trinity Knot. 

One of Davis’ favorite pieces of art hangs on the wall above his desk. He titled it “Inverse in Place.” This work is an artistic representation of the orchestral piece “Metastaseis” by Iannis Xenakis — an architect, musician, and composer — who developed mathematical rules to translate his architectural designs into music. 

“I’ve inverted his music,” Davis said. “I’ve put his music back where it came from, which is space. He went from space to rules to music. I went from music to rules to space.”