The duke is basically characterized by the first line that he utters — "If music be the food of love, play on" — that is, he is the most (or one of the most) melancholy characters that Shakespeare ever created. His entire opening speech is filled with words such as "excess," "surfeiting," "appetite . . . sickening," and "dying fall," words which show the duke to be sentimentally in love with love. He has seen Olivia, and the very sight of her has fascinated him to such an extent that his romantic imagination convinces him that he will perish if she does not consent to be his wife. Thus, this romantic, melancholy indulgence is the crux of the play because the duke uses Cesario (Viola) as his emissary to court Olivia.
The duke, however, is as changeable as the "sea" and as inconsistant as "an opal in the sunlight." His languid craving for music is equated by his languid reclining upon an opulent couch and his requesting attention, and then suddenly becoming bored by what he has just requested. It is, however, the duke's changeable nature which allows us to believe that he can immediately switch his love for Olivia to Viola at the end of the play.
The duke is, however, according to Olivia and others, a perfect gentleman. He is handsome, brave, courtly, virtuous, noble, wealthy, gracious, loyal and devoted — in short, he is everything a young lady could wish for in a husband. This is ultimately what makes it believeable that Viola does fall in love with him immediately.