The term is from Greek philos (φίλος; "beloved", "loving", as in philosophy or philanthropy) and manthanein, math- (μανθάνειν, μαθ-; "to learn", as in polymath).
Philomathy is similar to, but distinguished from, philosophy in that -soph, the latter suffix, specifies "wisdom" or "knowledge", rather than the process of acquisition thereof.
The shift in meaning for mathema is likely a result of the rapid categorization during the time of Plato and Aristotle of their mathemata in terms of education: arithmetic, geometry, astronomy, and music (the quadrivium), which the Greeks found to create a "natural grouping" of mathematical (in the modern usage; "doctrina mathematica" in the ancient usage) precepts.
In a philosophical dialogue, King James penned the character Philomathes to debate on arguments of whether the ancient religious concepts of witchcraft should be punished in a politically fueled Christian society.
The dialogue was used by King James to educate society on various concepts including the history and etymology of the subjects debated.