Apparently, it is often taught that Ophelia and Hamlet actually had sex on the grounds that:
~Ophelia's insane litanies ("hey nonny, nonny," etc) of crude songs are indicative of her not being pure
~she went mad as a result of 1) her having hidden her transgression from her father who was, by then, dead and would never learn the truth about her, and 2) being rejected by the guy who took her virginity, which was the only thing (according to Polonius) that gave her worth.
Furthermore, I recently learned than Kenneth Branagh's cinematic version of "Hamlet" considers this liaison canon.
I've never thought that was the case and still do not! The tragedy of Ophelia is her complete debasement at the hands of others and, eventually, her own (eg: her madness and [intentional or not] suicide), while remaining, in body, spirit, and mind innocent of transgression, blameless; purity, squandered and wasted.
Ophelia, in many ways, is a 'sacrificial virgin.' Consider that allusion which is perhaps the most significant in the entire play, in reference to Ophelia's role: Hamlet, harassing Polonius, calls him "Japheth," inquiring about his daughter:
"Ham. O Jeptha Judge of Israel, what a treasure had'st thou?
Pol. What a treasure had he my Lord?
Ham. Why one faire daughter and no more, the which he loved passing well.
Pol. Still on my daughter.
Ham. Am I not i'th right old Jeptha?
Pol. If you call me Jeptha my Lord, I have a daughter that I love
Ham. Nay that followes not.
Pol. What followes then my Lord?
Ham. Why as by lot God wot, and then you knowe it came to passe, as most like it was; the first rowe of the Pons Chanson will showe you more, for looke where my Abridgements come,"
Hamlet indicates that he is making reference to the popular ballad "Japha [sometimes "Jesse"], Judge of Israel," the first stanza, in fact:
"I have read that many years agoe, When Jepha, judge if Israel, Had one fair daughter and no more, Whom he loved passing well. And as by lot, God wot, It came to passe most like it was, Great warrs there should be, And who should be the chiefe, but he, but he." (Stationers Company Books--1567, 1624 ?)
In "Japha," Japheth makes a deal with God, offering the virginal sacrifice of his only daughter in exchange for victory in war. Obligated to provide his half of the bargain, Japheth tells his daughter what he has promised; she is faithful to him and agrees to die, first taking a three month period of mourning in which she goes into the desert and "bewails her virginity."
Ophelia's mad songs are just this; a maid bewailing her virginity before she must die for the foolishness of her father! She mourns her abbreviated and fruitless life, signing wistfully of her Valentine and "going in a maid and coming out a maid no more."
Furthermore, I do not believe Hamlet and Ophelia had relations because of Hamlet's negative attitude towards sex. Sex for Hamlet does mean procreation--he so often mentions 'conception' when talking to Polonius about Ophelia, calls Polonius a fishmonger (alluding to fishmongers' daughters being apparently sexually loose, but especially to their being fertile and bearing many children)-- and he, most ardently, does not want to "breed more sinners." Consider his mildly disgusting reference to conception as "the sun breeds maggots in a dead dog,/ being a good kissing carrion," or his first soliloquy about Denmark, about the world being "an unweeded garden," expressing a deep disgust in the "teeming life of weeds, maggots, and sinners" (as Arden "Hamlet" editor, Harold Jenkins summarizes) of which he (Hamlet) wants no part!
So: Ophelia, virgin or no?