In Uttar Pradesh Brahmins have common surnames as Chaturvedi alias Chaubey, Dwivedi alias Dubey and Trivedi. Are these surnames which have "Vedi" included in them have something to do with the Vedas. There is common folklore that the Brahmins who know all four Vedas are known as Chaturvedi and those who knew three were called Trivedi and Dwivedi were who knew two Vedas. Is this folklore true if not how did they get such titles?
Before they became surnames Dwivedi, Trivedi and Chaturvedi were probably titles given to people who have studied more than one Veda. So says Swami Harshananda in A Concise Encyclopaedia of Hinduism (Vol. 1):
dvivedī ('one [who has studied] two Vedas')
Started perhaps as the academic title of a person who has studied two Vedas (dvi = two) it gradually became the family title of persons born as his descendants.
Similarly, the evolution of the two other titles trivedī and caturvedī — for those who are the scions of the persons who had mastered three or four Vedas.
Study of one Veda was the minimum expected of every dvija or the twice-born.
In Hindu Dharma: The Universal Way of Life, Swami Chandrasekarendra Saraswati says the same about the origin of these titles:
I said that there was no bar on anyone learning more than one śākhā. Even today we find North Indians with appellations like Caturvedī, Trivedī and Dvivedī.
We had a Trivedī, who was governor of one of our states, Duve and Dave are derived from Dvivedī. One descended from a family well versed in the four Vedas is called a Caturvedin. In Beṅgāl he is called Catterjī. Those who have mastered three Vedas are Trivedins. Today it is rare to see a man who has learned even one Veda, but the fact that members of some families still call themselves Trivedins or Caturvedins show that in the past here must have been individuals who knew more than one Veda.