In the story "The Yellow Wallpaper" by Charlotte Perkins Gilman, the house serves as a symbol of confinement and oppression. The protagonist is isolated in a room with yellow wallpaper, which becomes a canvas for her mental struggle. This setting reflects her descent into madness, illustrating the themes of mental health and gender roles.