Anyone who spends time around real mathematicians rather than their Hollywood counterparts will be familiar with a propensity for witty, often wildly comedic banter that defies the stereotype of the humourless logician. It may come as some surprise, therefore, to learn that a group of mathematics enthusiasts are gathering in New York City this weekend to celebrate 500 years of darkness and gloom in their discipline.

The occasion for this saturnalia of sadness is the 500th anniversary of Albrecht Dürer's famous Melencolia engraving, with its bafflingly complex array of mathematical and other devices surrounding a large winged figure holding a book and compass. Long before The Da Vinci Code set Tom Hanks in flight from albino assassins, this print was overloading library shelves (and now internet websites) with a staggering number of books and articles from scholars seeking to divine its structure and meaning.

Their interpretations vary greatly, but the one theme they nearly all coalesce around is the idea that Dürer intended his print as a portrait of the melancholic temperament, shown personified by the winged figure, who is said despite her tools of learning to be variously "brooding in idleness," in "paralysis of the earthbound imagination," and "plunged into the deep gloom of reason." This image is thus viewed as the first major depiction of scholarly genius as being either prone to or partially derived from a solitary and melancholic character.

This view is surprising, however, if we consider the print's historical context, for when Dürer created Melencolia, he was near the height of his fame and prosperity. Recently moved into an enormous house looking out on Nuremberg's castle, he enjoyed brisk sales of artworks around Europe, personal access to the imperial crown jewels for painting historical portraits, and a commission from Emperor Maximilian to help design some of the largest monumental prints ever published. It hardly seems the time to produce a work on the theme that applied learning and mathematics yield gloomy results.

Even apart from financial success, Dürer appears one of the least likely artists to devalue mathematical study when he spent so much of his life infatuated with it. Leonardo Da Vinci left a single and more anatomically correct Vitruvian Man, but Dürer's hundreds of preserved studies on ideal proportions – many sketched with a compass and ruler like the ones shown in Melencolia – are breathtaking in their obsession with calculating dimensions of even the tiniest portions of the human anatomy. (And yes, he mathematically calculated those bits, too.)

Dürer's studies of the human form were published posthumously as Four Books on Human Proportions and were preceded by an architectural treatise on fortifications and a geometrical work called Teachings on Measurement with Compass and Ruler. The year after Melencolia appeared, Dürer and the imperial mathematician Johannes Stabius brought out Europe's first printed maps of the celestial constellations, as well as a unique broadsheet projection of the terrestrial globe. Yet if Dürer urged students and artists toward greater study of nature and mathematics in all his writings, what are we to make of his apparent juxtaposition of mathematics with melancholy in his most famous print?

To begin with, I can't possibly do justice here to the enormous and rich scholarship already built around the Melencolia engraving. Much of it has tried to explain Dürer's imagery through ties to philosophers like Marsilio Ficino and Cornelius Agrippa, who in different ways linked the melancholic temperament to dark influences from the planet Saturn but also saw it as a potential source of inspired genius.

The problem is that there's little evidence Dürer knew of these somewhat esoteric theories, and when he did write about melancholy – as he did both before and after this print – he used entirely ordinary terms and gave no indication that he considered it either a dominating influence or a source of genius. Beyond that, no analysis has convincingly explained the extra "I" following "MELENCOLIA" in the print's inscription, which is usually ignored or else said to represent a "type 1" melancholy linked to Agrippa.

But what if this print wasn't intended to represent the melancholic temperament at all? In an article from 1955, one scholar who still supported Saturn-based interpretations pointed out that rather than being a number 1, the extra digit might be a letter "I," which is the imperative form of the Latin verb ire and means to go or move away. Under this reading, the inscription becomes not a title but simply a command – "Sadness, be gone!" – and if we look closely at the engraving, that is exactly what's happening.

Detail from Albrecht Dürer, Melencolia, showing the bat. Photograph: /Wikimedia Commons

The bat's wingtip with its inscription is shown exiting the picture at stage left, and in another example of Dürer's under-appreciated humour, the bat is shown lacking even legs to return and land on. (Dürer was intensely naturalistic when he wanted to be, but he filled his prints with symbolically adjusted animals like a horned serpent in Adam and Eve, a skewered hedgehog symbolizing moral rectitude in Knight, Death, and the Devil, and the backside of a fatted calf peeking out behind the Prodigal Son.) In labeling "Melencolia I" merely a title for Dürer's engraving, historians have forgotten how many Renaissance artworks, and especially prints, were chatty repositories of written commands, laments, and moralistic injunctions.

In the time before he designed Melencolia, Dürer was also drafting and re-drafting a set of reflections on human knowledge that he began with the words "Something to say, that brings no sadness." In these unpublished passages, including one on the back of a sketch for his mathematical collaborator Stabius, Dürer wrote that although it's the nature of individuals to desire absolute knowledge of all things, "we are unable to arrive at such perfection in truth, art, and wisdom." He added, however, that "we are nevertheless not entirely shut out from all wisdom, for if we sharpen our learning through reason and exercise ourselves in it, we may thereby in a correct manner seek, learn, recognize, and thereby arrive at various truths." It is precisely this recognition of our limited but great abilities that he says chases away sadness from scholarly pursuits.

Facebook Twitter Pinterest Dürer's print is full of symbols representing learning and the brevity of life. Photograph: /Wikimedia Commons

Combining these passages with a "Sadness, be gone!" reading of the inscription potentially turns Melencolia into an optimistic rather than pessimistic parable on the struggle for knowledge, including the struggle to understand Dürer's brilliantly enigmatic image. It's a struggle that may, like modern science, never yield perfection or completion. Yet the very act of striving to construct a personal measure of learning within the time allotted one's mortal frame also permits a degree of participation in immortality, which Dürer symbolized by the monument in Melencolia's background (from which hang the hourglass, bell, and judgment scales representing temporal limits).

Other contemporaries of Dürer criticized what they saw as the vain ambitions of secular learning, but his own writings and those of his closest friends invariably portrayed active study as a hallmark of the virtuous life. It now appears he thought it could be a happy life as well.