Stuart Davis, "Memo," 1956, oil. (Sara Roby Foundation via Smithsonian American Art Museum)

The association between the painter Stuart Davis and jazz is so strong that you may imagine you can hear the piano of Earl Hines or the trumpet of Louis Armstrong in the background of the National Gallery of Art’s exhibition, “Stuart Davis: In Full Swing.” But listen again. Do you really hear it? Or is this one of those reflexive art-history habits that delimits our understanding of the rather chilly, intellectualized, even tortured art that hangs silently on the walls?

And think about why we would want to connect Davis’s work to jazz, why that is validating, why, somehow, the equation “Stuart Davis equals jazz” seems to raise the value of both terms.

The exhibition, which opens Sunday, began at the Whitney Museum of American Art in New York and is both large-scale, with some 100 works on view, and admirably focused, concentrating on Davis’s fascinating habit of returning to earlier work, to find patterns and templates upon which he based the majority of his paintings after 1939. By one estimate, these “recursions” constituted some 80 percent of Davis’s later work, and as one digs deeper into the artist’s life and career, it’s clear that variation as a basic trope of creativity was fundamental to his artistry and legacy.

Variation is also an essential musical technique, and free variation is fundamental to jazz. Davis loved jazz — Hines was a particular favorite — and he bonded with other artists of his day, including Piet Mondrian, over mutual admiration for the form. He also cited jazz as an inspiration and explanation for his work, though this may have been strategic self-justification. Davis wanted to be seen as a deeply American painter, and there is nothing more American than jazz. He also wanted to find a middle ground between formalism and art that was about something in the world. Jazz, as subject matter, seemed to ground his paintings in a fresh new Americana; it connected them not to the airy ratiocination of European art but to the yawping prosody of Walt Whitman and the grittiness of popular culture.

Davis also had to fend off any thought that his recursions were prompted by a want of new ideas. Jazz artists never worried about recycling old tunes, so the metaphor of improvisation was also an argument about his painting. Davis wasn’t borrowing old motifs because he was mindlessly repetitive; he was creating an ever-evolving variation on a set of earlier themes.

Davis’s work is now so deeply embedded in the American consciousness — and so intricately tied up with how we visualize jazz — that it is almost impossible to disentangle the two perceptions. Paintings he made after a transformative trip to Paris in 1928 suggest the easy pleasures — coffee, wine, tobacco — of the great French cauldron of American creativity, where jazz was the national calling card. Later works refer explicitly to jazz, or the demimonde in which it flourished, with titles such as “Swing Landscape,” or words such as “pad,” “mellow” or “cat” painted on the canvas. The bold color palette of Davis’s later paintings suggests the forceful “trumpet” sound of Hines’s piano style, which used right-hand doubling at the octave or tenth to create a brassy tone that cut through the din of nightclub background noise.

But it is the left hand of Hines’s style that offers one of the few points of useful metaphorical connection between Davis’s visual vocabulary and jazz, although even that is tenuous. All the other connections — bold colors, explicit titles, the use of jazz argot — are superficial. But there may be a genuine similarity between the repeated jazz chord patterns usually played by the left hand and Davis’s abiding interest in basic geometric framework or armature underneath his paintings. The idea of a recurring bass line — fundamental not just to jazz but to Western music since people first started writing down musical notes — is an obsessive motif of much of Davis’s work.

The most striking example in this well-designed and well-plotted exhibition is a series of paintings made between 1932 and 1956, known as the “Memo” group, from the title of one of the works. They are all about the same size, and they repeat a basic set of shapes in the same orientation as a sketch Davis made in 1932, of the harbor in Gloucester, Mass. That sketch shows a not-quite-abstract but wispy and reductive framework of lines and curves, representing the rigging of boats, a small fish shop and perhaps a nautical cleat and other hardware one might expect in a fishing town. In a black-and-white painting made shortly after the sketch, the lines of the sketch become thicker, like the metal seams of a stained-glass window; a 1939 painting fills in these spaces with strong swaths of color, creating a suggestive landscape against a bright green background; a 1954 variation uses different, more jarring hues to obliterate that landscape, highlighting interstitial areas to break down any naturalistic reading; and finally, in 1956, the old black-and-white framework partially emerges, reversed (now the lines are white on black), while sharing space with a reminiscence of the earlier color and pattern variations.

Curator Harry Cooper has a subtle and complex reading of this series that references Hegel and Marx. In musical terms, perhaps these works refer to the “bass line” as a consistent underpinning to the image. In any case, the series asks some basic questions: How far can one stray from the original? How much change is necessary for a new variation to be distinguished from the original? When is the process over?

Given Davis’s interest in Bach and the release in early 1956 of Glenn Gould’s recording of the greatest variation cycle ever written, Bach’s Goldberg Variations, it’s tempting to think the 1956 Memo painting isn’t jazz-inspired but steeped in Bach. Certainly the profound change to the original line drawing is closer to the end of Bach’s Goldberg cycle than it is to the open-ended variations of jazz.

The openness of variation technique seems to preoccupy Davis, right up to the last painting he ever worked on, which contained the word “fin,” French for “end,” in the upper left-hand corner. Other late works play with the word “complet,” or French for “complete.” Variation as a technique inspires anxiety about completion, unlike other musical forms that offer composers a finite road map. Jazz, in which one variation flows into the next with temporal freedom, is susceptible to the question: When is this over?

Of course, life inspires that thought in all of us, especially as we get older. It can be unnerving to realize our existence may not be like a narrative, with a beginning, middle and end, but rather an open-ended series of new iterations on what came before until death ends the process.

And yet, the more one thinks about jazz, the less it seems to suit the ideas that Davis was playing with, even if he thoroughly believed they were inspired by the form. It’s worth the effort, at least, to try to see Davis’s work without jazz in your ear.

And what does it look like then? I confess it leaves me cold. I can admire Davis’s resolution to think deeply about technique, to explore ideas borrowed from cubism in different visual contexts, to reduce and expand and explore his own ideas and material with tenacity. The exhibition is rewarding for its juxtapositions, and for occasional works that suggest not just skill but an intensity of feeling, too. It’s fascinating to see the drawings for the “Package Deal” project of 1956, which give clues though no certainty to the relationship between his geometrical background ideas and the surface of the paintings.

But otherwise the work rarely brings a satisfying order to the multiplicity of things the painter is manipulating. It feels busy and aggressive and unrefined. To say that it is like jazz is to imply that jazz is like noise. And that’s not true at all.

Stuart Davis: In Full Swing is on view at the National Gallery of Art through March 5. For more information, visit nga.gov.