The trivia (singular trivium) are three lower Artes Liberales, i.e. grammar, logic, and rhetoric. These were the topics of basic education, foundational to the quadrivia of higher education, and hence the material of basic education and an important building block for all undergraduates.
The ancient Romans used the word triviae to describe where one road split or forked into two roads. Triviae was formed from tri (three) and viae (roads) – literally meaning "three roads", and in transferred use "a public place" and hence the meaning "commonplace."
The pertaining adjective is triviālis. The adjective trivial was adopted in Early Modern English, while the noun trivium only appears in learned usage from the 19th century, in reference to the Artes Liberales and the plural trivia in the sense of "trivialities, trifles" only in the 20th century.
The Latin adjective triviālis in Classical Latin besides its literal meaning could have the meaning "appropriate to the street corner, commonplace, vulgar." In late Latin, it could also simply mean "triple." In medieval Latin, it came to refer to the lower division of the Artes Liberales, namely grammar, rhetoric, and logic. (The other four Liberal Arts were the quadrivium, namely arithmetic, geometry, music, and astronomy, which were more challenging.) Hence, trivial in this sense would have meant "of interest only to an undergraduate."
The adjective trivial introduced into English in the 15th to 16th century was influenced by all three meanings of the Latin adjective:
Trivia was used as a title by Logan Pearsall Smith in 1902, followed by More Trivia and All Trivia in 1921 and 1933, respectively, collections of short "moral pieces" or aphorisms. Book II of the 1902 publication is headed with a quote from "Gay's Trivia, or New Art of Walking Streets of London.",
Trivialities, bits of information of little consequence was the title of a popular book by British aphorist Logan Pearsall Smith (1865-1946), first published in 1902 but popularized in 1918 (with More Trivia following in 1921 and a collected edition including both in 1933). It consisted of short essays often tied to observation of small things and commonplace moments. Trivia is the plural of trivium, "a public place." The adjectival form of this, trivialis, was hence translated by Smith as "commonplace."