Relative pronouns introduce relative clauses. Relative clauses actually have the same function as adjectives, they give some information about the noun or context / idea they refer to. Given that they are more complex structures than simple adjectives, the reader / listener has to know to what the relative clause refers to and therefore they follows the noun they refere to. Adjectives can precede or follow the noun they refer to, although in some languages they are placed before and in other languages they are placed after. A simple adjective can be placed before or after. Perhaps the standard grammar doesn't allow that, but the sentence remains comprehensible. However if a relative clause is placed before the noun it refers to, the sentence becomes hard to understand.
This construction is hard to understand
incomprehensible:That I bought yesterday, the flower vase is on the table.
comprehensible: The flower vase that I bought yesterday is on the table.
simple adjectives can be placed before and after
The red flower vase is on the table.
[The flower vase red is on the table.]
This was the philosphical introduction. Some people wanted to know whether the way the human brain describes verbally the extralinguistic reality is innate or something that people learn and it seems that Chomsky is right. The fundamental structure of the capacity to speak is innate, although it is possible that the similarity of these basic structures only exists, because the possibilities to verbally describe the extralinguistic world are restricted and therefore the basic structures are the same in all languages. Let's continue with the more pragmatic part, given that people in general are not very interested in the philosphical aspects of language.
Relative clauses are connected to the main clause by a relative pronoun. Concerning gender and number the relativ pronoun complies with the noun it refers to and concerning the case, nominative, genetive, accusative, dative it depends on the function inside the relative close. (English is a little bit special concerning this issue. In English the relative pronoun can be left out: The man to whom I talked <=> The man I talked to. The author would say that this is not possible in any other language, at least the author of these lines doesn't know any language where this is possible. For didactical reasons the relative pronoun is used in the following sentences. Another thing useful to see is that English doesn't distinguish in gender and number, it is always the same relative pronoun: The man who crossed the stree <=> The men who crossed the street. In Portuguese the relative pronoun, who in this case, may change depending on gender and number of the reference object.)
=> dative in the relative clause (To whom the ECB borrows money?)
The banks, to whom the ECB borrows money, can't go bankrupt.
=> nominative in the relative clause (Who gets money?)
The banks, who who borrowed money from the ECB can't go bankrupt.
=> genitive in the relative clause (Whose credit volume is based on bank deposits?)
The banks, whose credit volume depends on bank deposits, can't go bankrupt.
=> accusative in the relative clause(Whom the tax payer has to save?)
The banks, who the tax payer has to save from time to time, can't go bankrupt.
The reference object is always the same, the banks, however the function of the banks, referred to by the relative pronoun, is different in each sentence. As far as Portuguese is concerned it is not crucial to see this difference, because similar to English the relative pronoun is the same in most cases. However if you want to learn a language with declension, it is crucial to understand the differences in the role played by the relative pronoun inside the relative clause.
However a relative pronoun can not only refer to a noun, but to an ideat, an indefinite pronoun or a pronoun as well.
referencing a context, an idea
He had not even read the report, what made any discussion impossible.
referencing an indefinite pronoun
He knows nothing that could be interesting for us.
referencing a pronoun
He, who always lied, accuses others to be liars.
There are competing relative pronouns, in other words in certain circumstances more than one relative clause can be used. (The girl that I love ... <=> The girl who I love ...) Competing relative pronouns exists in Portuguese and in English and in most languages.
The apples that did not fall far away from the trunk can never become a tree.
The apples, which did not fall far away from the trunk, can never become a tree.
The relative adverb can refer to a noun in the main clause, but is an adverb in the relative clause. In this case it is not a subject, nor a direct object, nor an indirect object nor a genitive in the relative clause. It describes in this case the circumstances the action described by the verb in the relative clause is performed.
The house where it is nice to live.
The appartement where it is nice to live.
The houses where it is nice to live.
Where refers to house, appartement, houses, but is not a pronoun in the relative clause. It is not the subject, the direct object or the indirect object in the relative clause. It is an adverb.
You can find on the internet lots of definitions like that:: "The relative adverbs where, when & why can be used to join sentences or clauses. They replace the more formal structure of preposition + which used to introduce a relative clause." relative adverbs.
This definition is not really wrong, but it doesn't describe the crucial point and furthermore this definition is true as well for a relative pronoun. The crucial point is the relative adverb is an adverb in the relative clause. It can refer to a noun in the main clause, but the noun in the main close becomes part of the adverbial in the relative clause. The function of a relative pronoun inside the relative clause is completely different than the function of relative pronoun.
What is true for relative pronouns is true as well vor relative adverbs. In English we can leave them out.
The axe with which he break the door.
The axe he broke the door with.
If we want to understand the Portuguese structure, we have to tranlate with preposition + which. Which is the relative pronoun that refers to a noun in the main clause, prepostion + which is an adverbial. The relative adverbs how and where are exceptions to this rule. In this case the preposition is included. ( The house where we organized the party <=> The house in which we organized the party.)
In the following chapters we will see two types of relative clauses, restrictive relative clauses and nonrestrictive relative clauses. To understand the difference between a restrictive and a nonrestrictive relative clause is not really important, but sometimes, as we will see in the following chapters, it is helpful. Nonrestrictive relative clauses are separated from the main clause, as in English, by a comma and some relative pronouns can not be used with nonrestrictive relative clauses. (Shakespeare, who is the most ... <=> ~ Shakespeare, that is the most...)
Restrictive relative clauses are much more common than nonrestrictive relative clauses. Nonrestrictive relative clauses contains only some extra information that is not needed for the comprehension of the sentences and there is no change in the meaning if they were left out.
nonrestrictive relative clauses
Alcoholics, who drink too much, die earlier.
without relative clause: Alcoholics die earlier.
Alcoholics drink too much. That's obvious. That's how the term is defined. By leaving out the relative clause the meaning of the main clause doesn't change.
Joaquim Maria Machado de Assis, who wrote the novel Dom Casmurro, died in 1908.
without relative clause: Joaquim Maria Machado de Assis died in 1908.
Joaquim Maria Machado de Assis is well defined, the fact that he wrote the novel Dom Casmurro is an extra information, but nothing that defines him. We can leave out the relative clause an the meaning of the main clause doesn't change.
restrictive relative books
Poets who doesn't become famous are unhappy.
without relative clause: Poets are unhappy.
Actually the sentence could be interpreted in two different ways. Not becoming famous can be interpreted as an inherent characteristic of poets. Most of them don't become famous. However it can be interpreted as well as a restrictive relative clause. Only those poets who don't become famous are unhappy. However if we leave out the relative clause, all poets are unhappy for whatever reason, what is not the meaning of the original sentence.
This was a short description of the most relevant issues to be taken into account when analysing relative clauses. In the following chapters we will discuss these issues more in detail and explain how it works in Portuguese.