Asking for “formal definitions” is fraught with peril: who is the recognized authority? In any event, “searching around the web” isn’t going to do you much good. If you want to know what a dictionary says about a dictionary, then you shall have to actually use one. :)
All these words have multiple senses, depending on the context and domain:
Dictionary is not so simple as you seem to present it; your discussion of “mapping” suggests you are thinking more of a polyglot-type dictionary or else a computer dictionary, but neither of those are the most common current use for the word, which has a long history with many senses and subsenses.
Lexicon was historically used for “look-up”–type dictionaries for languages like Greek and Hebrew, but also has a particular sense in linguistics.
Vocabulary has at least four main senses, of which you allude to at most one. Sometimes it is just a word-list, but sometimes it is more than that.
Based on the assumption that the curated Oxford English Dictionary is a better primary source for words’ meanings in English than the crowd-sourced Wikipedia entries you stumbled upon, here’s an excerpt of what the OED says about all this.
I suppose you can take these for “formal definitions” if it pleases you to do so, but really they just document matters as the editors of the OED saw fit to do.
It should come as no surprise that the OED takes especial care delineating the historical and extended uses of its own name, dictionary. I’ve omitted a good bit of historical discussion from its excerpted notes below; see the real dictionary if you need that.
Truth be told, the note at the end of dictionary sense 1a is probably all you need, but I’ll include a little more than that just in case. The important paragraph that distinguishes one from the other I’ve highlighted in bold, but the other senses show how domain-specific use of these terms can be, well, more specific in that particular domain.
Etymology: ad. med.L. dictiōnārium or dictiōnārius (sc. liber) lit. ‘a repertory of dictiōnēs, phrases or words’ (see DICTION) in Fr. dictionnaire (R. Estienne 1539), Ital. dizionario, Sp. diccionario.
a. A book dealing with the individual words of a language (or certain specified classes of them), so as to set forth their orthography, pronunciation, signification, and use, their synonyms, derivation, and history, or at least some of these facts: for convenience of reference, the words are arranged in some stated order, now, in most languages, alphabetical; and in larger dictionaries the information given is illustrated by quotations from literature; a word-book, vocabulary, or lexicon.
Dictionaries proper are of two kinds: those in which the meanings of the words of one language or dialect are given in another (or, in a polyglot dictionary, in two or more languages), and those in which the words of a language are treated and illustrated in this language itself. The former were the earlier.
Vocabulary is now generally limited to a smaller and less comprehensive collection of words, or to a word-book of technical, or specific terms. Lexicon is the name usually given to dictionaries of Greek, Hebrew, Arabic, Syriac, Ethiopic, and some other literary languages.
d. An ordered list stored in and used by a computer; spec. (a). a list of contents, e.g. of a database; (b). a list of words acceptable to a word-processing program, against which each word of text is checked.
a. By extension: A book of information or reference on any subject or branch of knowledge, the items of which are arranged in alphabetical order; an alphabetical encyclopædia: as a Dictionary of Architecture, Biography, Geography, of the Bible, of Christian Antiquities, of Dates, etc.
(Here the essential sense ‘word-book’ is supplanted by the accidental one of ‘reference book in alphabetical order’ arising out of the alphabetical arrangement used in modern word-books.)
Etymology: ? mod.L., a. Gr. λεξικόν (sc. βιβλίον), neut. sing. of λεξικός of or for words, f. λέξι-ς diction, word, phrase, f. λεγ- to speak.
- a. A word-book or dictionary; chiefly applied to a dictionary of Greek, Hebrew, Syriac, or Arabic.
The restricted use is due to the fact that until recently dictionaries of these particular languages were usually in Latin, and in mod.L. lexicon, not dictionarius, has been the word generally used.
b. fig. (a). The vocabulary proper to some department of knowledge or sphere of activity; the vocabulary or word-stock of a region, a particular speaker, etc. (b). A list of words or names.
- Linguistics. The complete set of meaningful units in a language; the words, etc., as in a dictionary, but without the definitions. (Opp. GRAMMAR sb.)
Etymology: ad. med.L. vocābulāri-us, -um, f. L. vocābulum vocable sb.: see -ARY1 1. Hence also Ital., Sp., Pg. vocabulario, Fr. vocabulaire (1481). Cf. VOCABULAR sb., VOCABULER.
a. A collection or list of words with brief explanations of their meanings; now esp. a list of this kind given in an elementary grammar or reading-book of a foreign language.
Longer vocabularies are usually arranged alphabetically or according to subject-headings. In philological grammars and readers the vocabulary is commonly termed a glossary.
a. The range of language of a particular person, class, profession, or the like.
Used with limiting terms (possessives, adjectives, etc.).
The sum or aggregate of words composing a language.
fig. A set of artistic or stylistic forms, techniques, movements, etc.; the range of such forms, etc., available to a particular person, etc.
Etymology: ad. L. glossārium, f. glōssa GLOSS sb.1: see -ARY. Cf. Fr. glossaire.
A collection of glosses; a list with explanations of abstruse, antiquated, dialectal, or technical terms; a partial dictionary.
Etymology: f. WORD sb. + BOOK sb.; in sense 1 cf. G. wörterbuch (f. gen. pl. of wort word + buch book), Dutch †woordboek, woordenboek, Icel. orðabók, Sw. ordbok, Da. ordbog.
A book containing a list of words (as of the vocabulary of a language, a book, an art, or science) arranged in alphabetical or other systematic order.
The term is often used where it is desired to avoid the implication of completeness or elaboration of treatment characteristic of a dictionary or lexicon.
The ‘book of the words’ or libretto of a musical composition.
Again, this is just a small excerpt, but the parts I’ve shown should be clear enough.
Oh, and I threw glossary and word-book in because I knew you’d just come back and ask about them, since they are referenced in the other entries. As you can see, there is a lot of overlap in these words, particularly those defined in terms of one another. So even the OED contains what you might call circular references; this always happens with close word-sets like these.
However, there are also fine distinctions to be found and made, should one wish to do so.