Ralph and Piggy have no real relationship at the beginning of Lord of the Flies, by William Golding. In fact, within a few minutes of meeting Piggy, Ralph tries to ditch him (a foolish idea since they are all trapped on an island) because he finds Piggy quite annoying and unpleasant. Piggy is undeterred, however, and he follows Ralph.
Together they discover the conch. Ralph sees it and gets it, and Piggy teaches Ralph its significance and how to use it. Ralph is still impatient with Piggy, and Piggy still talks too much, but together they greet the rest of the boys after Ralph blows the conch. Piggy wants to get organized and takes everyone's names, something which Ralph has no interest in doing. It is clear they are not friends when Ralph reveals Piggy's name to the others (something Piggy specifically asked him not to do) and when Piggy reluctantly votes for Ralph (only because he knows Jack is a worse choice). Ralph is elected leader.
None of the boys could have found good reason for this; what intelligence had been shown was traceable to Piggy while the most obvious leader was Jack.
Over the course of the novel, however, Ralph begins to rely on Piggy for help as he tries to lead the boys. Together they stand against Jack. Piggy is terrified that if something happens to Ralph, Jack would immediately kill Piggy, and he is right. Piggy is also sure that Jack wants to get rid of Ralph, something Ralph finds hard to believe; however, Piggy is correct.
When Ralph and Jack are hunting on the mountain together in chapter seven, Ralph is mindful of where they are and where they are going; Jack is the one, despite his hunting experiences, who falters. When Ralph is concerned about Piggy being left alone with the littluns down on the beach in the dark, Jack begins to taunt Ralph just as has always done to Piggy, and Ralph has an epiphany.
Now it was Ralph’s turn to ﬂush but he spoke despairingly, out of the new understanding that Piggy had given him.
“Why do you hate me?”
The boys stirred uneasily, as though something indecent had been said. The silence lengthened. Ralph, still hot and hurt, turned away ﬁrst.
Soon all that Ralph and Piggy have is each other, and they are no match for Jack and his tribe of savages. Jack allows Piggy to be smashed, along with the conch, by a boulder and eventually orders his tribe to kill Ralph. The only reason Ralph is not killed is the appearance of a naval officer here to rescue the boys.
At the end of the novel,
Ralph wept for the end of innocence, the darkness of man’s heart, and the fall through the air of the true, wise friend called Piggy.