1. This is the boy whom I spoke of yesterday.

2. This is the boy of whom I spoke of yesterday.
3. This is the boy who I spoke of yesterday.
4. This is the boy of who I spoke of yesterday.
-----------------------
All are correct except #4? Am I right? Why do we use 'who' in #3? Traditionally we used 'whom.' When did people start to use 'who' in this sentence?

who is still incorrect in #3 and #4. In #2, you do not need the second "of". "of whom" is clear without it. Without the second "of", #2 actually is better than #1 (it's reads better and sounds better), but neither is incorrect.

You are partially correct. While sentences 1, 2, and 3 are grammatically correct, sentence 4 is not. Let me explain in more detail.

In sentence 1, we use "whom" because it functions as the object of the verb "spoke." "Whom" is the objective form of "who," and traditionally, it should be used when referring to the object of a sentence.

In sentence 2, we use "of whom" to indicate the possession relationship between "boy" and "spoke." This phrasing is less common, but still grammatically correct.

In sentence 3, we use "who" instead of "whom." This is because in modern English, it has become more acceptable to use "who" as the relative pronoun for both the subject and the object of a sentence. While traditionally "whom" would be used as the object, many people now use "who" in more informal situations.

Sentence 4 is incorrect because "of who" is not grammatically correct. It should be "of whom" to maintain proper English grammar.

The change from using "whom" exclusively to also allowing "who" as the relative pronoun happened over time as the English language evolved. This shift has made "who" more widely used and accepted in different contexts.