An exhibition of Rembrandt's self-portraits such as the one currently at the National Gallery begs a few questions. First and foremost, how did self-portraiture come to be regarded not just as an important part of the painter's armoury, but even intrinsic to the whole art of painting - so much so that Basil Hallward, the man who paints the portrait of Dorian Gray, can say: "Every portrait that is painted with feeling is a portrait of the artist, not of the sitter"?
Self-portraiture really got off the ground during the 15th century, when artists started to agitate for an improved social status that would rank them above manual labourers. Self-portraits were as good a form of calling-card and self-advertisement as any. What's also interesting, though, is that during this period we find as many, if not more, sculpted self-portraits. Lorenzo Ghiberti (1378-1455), who was the first artist to write an autobiography, depicts himself twice on the bronze doors to the Baptistery in Florence.
Yet during the 16th century self-portraiture became increasingly identified with painting. Leon Alberti had already hinted at the more autobiographical nature of painting in his treatises on the arts. For Alberti, the inventor of painting was Narcissus, gazing at his own image in the pool. In this account, painting was as much a mirror of the artist as it was self- centred. Indeed, it was completely anonymous: Alberti said it originated with people noticing familiar forms in tree trunks or clods of earth.
Another myth that gave painted self-portraits greater credibility is the legend in which Christ is said to have wiped the sweat and blood from his face on to a cloth given to him by Veronica as he was on the way to Calvary. Miraculously, his features became imprinted on the cloth and "authentic" examples were preserved as relics in several churches, including St Peter's in Rome. The so-called sudarium is in effect the first Christian self-portrait. Albrecht Durer exploited these associations when he painted a self- portrait in gouache and watercolour on transparent linen, with the white of the linen providing the highlights. During the 16th century, as canvas started to replace wood and plaster as a support for painting, such associations became even stronger. The celebrated Italian poet Gian Battista Marino entitled a treatise on the visual arts: "Painting, or the Holy Shroud" (1614). The greasy and smeary quality of so many of Rembrandt's late works suggests that he was well aware of painting's primal scene in which a sweaty and blood-stained face gets wiped on cloth.
But the artist did not even have to paint a self-portrait for his own image to be present to the viewer. Style - or rather, a signature style - also revealed the man. Before the Renaissance it was assumed that there was one true style to which all painters should aspire. But with the Renaissance it became increasingly accepted that there were different but equally valid styles in painting which were rooted in the artist's personality.
In Castiglione's best-selling book of etiquette, The Courtier (1528), the ideal courtier is called upon to learn how to paint and Castiglione then celebrates the product differentiation that was evident in contemporary painting: "Behould in peincting Leonard Vincio, Mantegna, Raphael, Michelangelo, George of Castelfranceo: they are all most excellent dooers, yet are they in working unlike, but in any of them a man wold not judge that there wanted ought in his kind of trade: for every one is knowen to be of most perfection after his maner." The Courtier was translated into several European languages, and Charles I of England would have been influenced by such ideas when he formed the first great collection of self-portraits by artists as various as Durer, Titian, Rembrandt, Bronzino and Rubens.
Rembrandt's great contemporary, the sculptor Bernini, gave a persuasive account of why painting might be better suited to self-portraiture. Speaking in Paris in the 1660s he noted that a painter, while working on a composition, can make continual adjustments. Thus, if asked at the end whether he has put "all his skill into the work", he can "assent without hesitation", for not only has he been able to "imbue it with all the knowledge with which it began", but also "to add what he has learned" while working on it. A sculptor cannot put all his skill into his work, Bernini said, because he cannot modify the pose as he goes along and as he becomes more experienced. When working in marble the pose has to be established right at the outset. So the sculptor and the sculpture exist in a state of arrested development.
It was in this period that the visible correction, the pentimento (derived from the word meaning to repent), became a trademark of the great master. In their late work, Rembrandt and Velazquez often changed their minds in mid-picture and took little trouble to cover their tracks: they even painted with their fingers. Pentimento demonstrated their fertility and recorded the mind and body in action. Nothing was set in stone.
The major institutional consequence of the 17th century's fixation with painted self-portraiture is the Uffizi self- portrait collection. This was begun by Cardinal Leopoldo de Medici in 1664, and by the mid-18th century featured 270 painted self-portraits - including one by Rembrandt, which was probably acquired by Cosimo III de Medici on a visit to Amsterdam in 1667. Sculptors were admitted only if they had painted their own portrait, and Bernini and Canova are among the tiny handful that did so. Nathaniel Hawthorne encapsulates the ethos that lay behind the collection in his novel set in Italy, The Marble Faun (1860): "Artists are fond of painting their own portraits; and, in Florence, there is a gallery of hundreds of them, including the most illustrious; in all of which there are autobiographical characteristics, so to speak; traits, expressions, loftinesses, and amenities, which would have been invisible, had they not been painted from within. Yet their reality and truth is none the less."
None of this can quite explain the fixation that Rembrandt had with painting his own portrait - altogether he painted himself on at least 40 occasions and etched himself 31 times. But it does suggest that Rembrandt, in his lifelong struggle to lay his own imprint on canvas and paper, was a central rather than a marginal figure in the 17th-century art world.
"Rembrandt by Himself" runs at the Sainsbury Wing, National Gallery, London WC2 (0171-747 2885) from 9 June to 5 September.
James Hall's book, "The World as Sculpture: the changing status of sculpture from the Renaissance to the present day", is published by Chatto & Windus, £25