Ophelia is a difficult role to play because her character, like Gertrude's, is murky. Part of the difficulty is that Shakespeare wrote his female roles for men, and there were always limitations on them that restricted and defined the characterizations devised. In the case of an ingenue like Ophelia, a very young and lovely woman, Shakespeare would have been writing for a boy. The extent to which a boy could grasp subtle nuances might have prevented the playwright from fleshing out the character more fully.
We do know that Ophelia is torn between two contradictory poles. Her father and brother believe that Hamlet would use her, that he would take her virginity and throw it away because she could never be his wife. Her heart has convinced her that Hamlet loved her, though he swears he never did. To her father and brother, Ophelia is the eternal virgin, the vessel of morality whose purpose is to be a dutiful wife and steadfast mother. To Hamlet, she is a sexual object, a corrupt and deceitful lover. With no mother to guide her, she has no way of deciphering the contradictory expectations.
Just like Hamlet, the medieval precept that the father's word is unquestionable governs Ophelia. But her Renaissance sense of romantic love also rules her. How can she be obedient to her father and true to her love? When she lies to Hamlet and tells him that Polonius is home when he is concealed in the room eavesdropping, Ophelia proves she cannot live in both worlds. She has chosen one, and her choice seals her fate.
The dilemma also forces her into madness. She has no way to reconcile the contradictory selves her men demand that she be and still retain an equilibrium. Ophelia's desperation literally drives her crazy, and she has no means with which to heal herself.