
Duke Frederick is the play's source of court cruelty and disruption - his usurpation of the dukedom and abrupt banishment of Rosalind set the whole plot in motion, and his sudden offstage conversion in Act V removes the one obstacle the pastoral comedy cannot resolve through love alone.
Duke Frederick has usurped the dukedom from his elder brother before the play begins, and his presence in the early scenes is defined by an unpredictable, almost causeless severity - he banishes Rosalind from court with no real justification beyond a vague unease at her popularity, brushing aside Celia's protests that the two have been inseparable since infancy. It is one of Shakespeare's more abrupt villainies, offered without extensive motivation because the play is more interested in what it sets in motion than in Frederick's inner life.
His pursuit of the exiles continues even after they flee - he orders Oliver, on pain of confiscation of his estate, to find Orlando and bring him back dead or alive, extending the court's cruelty into the forest through a proxy. This command is what sends Oliver to Arden in the first place, making Frederick indirectly responsible for the very reconciliation and romance his tyranny was meant to prevent.
Frederick's resolution happens entirely offstage and is reported rather than shown: marching on the forest with an army to finish what his officers could not, he meets 'an old religious man' on the very edge of Arden and is converted on the spot, renouncing the world, restoring the dukedom to his brother, and retiring to a religious life. The suddenness is the point - Frederick's malice, having been established as essentially arbitrary, is undone with the same arbitrary speed, clearing the stage for a purely happy ending.
Duke Frederick is motivated by a suspicious, insecure grip on power that expresses itself in sudden, poorly justified acts of severity - banishing Rosalind, threatening Oliver, pursuing the exiles into the forest - with little psychological explanation offered beyond the fact of his own uneasy authority.
Frederick's cruelty is presented with almost no interior justification, which is itself characteristic - he is less a fully realised villain than a destabilising force whose actions the play needs in order to send its lovers into the forest. His sudden conversion at the play's end is treated with the same lack of elaborate motivation as his original usurpation, underlining that the play was never especially interested in his inner life.