In Girl with a pearl earring how is the main idea relationships conveyed throughout the novel?
Although I am a bit confused by what you mean when you say "main idea relationships," you are right to assume the main idea of Girl With a Pearl Earring is intimately connected with relationships! The main idea of this story is the negative results of societal constraint. This, of course, is exemplified by the relationships in Girl With a Pearl Earring and especially in the character of Griet.
Greit is the perfect example of how society can trap an individual through relationships. She is trapped by the Vermeers by being forced to work there. We can see the entrapment in this quotation:
I felt as if my parents had pushed me into the street, that a deal had been made and I was being passed into the hands of a man. At least he is a good man, I thought, even if his hands are not as clean as they could be.
She is trapped in her poverty due to the government. She is trapped in society through marriage because she is unable to love who she wants to love: Vermeer already has a wife. She is then even trapped by the jealousy and envy of that wife! She is further trapped when Pieter discovers Griet's attraction to Vermeer.
All of the characters in Girl With a Pearl Earring are trapped by society. They are either trapped by the legal system, by the moral system, or social strata. As a result, it becomes obvious that this trapping by society is the main idea of Girl With a Pearl Earring.