This is only a short-answer space. I can make a general comment though. Gertrude and Ophelia represent so many layers of meaning that it is impossible to see the play without them. Gertrude represents all women to Hamlet. He is so angry about his mother's seeming infidelity that he paints all women as frail and unreliable. Claudius loves Gertrude but she isn't aware, until the end of the play, of what he did to her former husband. Ophelia is used in some way by all the important males in her life. She is Shakespeare's innocent suffering: collateral damage in the rotting state of Denmark.