A Doll's House explores a range of views on social roles, marriage, and identity. The various characters of the play present expressions of different takes on each of these issues.
Though much has been made of A Doll's House as a comment on gender roles, the play does not offer a single perspective on the role of men or women in society, but rather offers a complex view of the difficulties of identity even within a rigidly defined social situation.
Taking Mrs. Linde and Nora as examples, we can begin to see how these two characters work together to present a complex perspective on gender roles.
Contrary to Nora's late-blooming independence, Mrs. Linde chooses to marry Krogstad so that she can take care of him and his children. She states on multiple occassions that she wishes to have someone to take care of. She cannot imagine life without work and, for her, work implies emotional caretaking.
Nora is bonded to her children, not because she is expected to be but because she has an authentic love for them. She was raised by a nurse, not a mother. Her own mother was not at all a part of her upbringing. In bonding with her children, Nora is (perhaps) compensating for the mother's absence she experienced as a child.
Nora wants to be a good mother, yet she chooses to leave her children in the end. Her choice to leave effectively constitutes a repetition of her own childhood. Not only is she like her father, as Torvald repeatedly suggests, but she is going to be absent to her children as her own mother was absent to her.
These facts present a picture of Nora as a divided figure. She is not only strong-willed and independent when she leaves her husband and children. The story is not as simple as that. Nora makes a significant compromise when she decides to leave her role as mother behind and chooses to develop her individual identity.
However, certain attitudes are presented as being small-minded. Torvald Helmer is a representative of a set of ideas that demean and patronize women and which serve to obscure women's identities.
In refering to Nora as a little bird and suggesting that her qualities are all essentially defined in what they can do to entertain him, Torvald does Nora a severe disservice. His treatment of Nora serves to strip her of an important expectation - the expectation that she has a mind of her own; an identity of her own.
The action of the play brings Nora to an important realization.
In the final act of A Doll's House, Nora is forced to acknowledge that she has no identity separate from that of her husband.
This conclusion is not related entirely to social roles, per se. Mrs. Linde is able to maintain a positive sense of her own identity while marrying. A woman's role in marriage clearly is not the issue for Nora. Her issue has to do with a choice between passivity and self-assertion. She must, quite literally, choose to be selfish or selfless and her decision is created by her husband's patronizing attitudes rather than the socially codified institution of marriage.