Necessarily means as something that must follow. Not necessarily, it does not necessarily mean that, necessarily true.
Almost every use is negative — not necessarily is the standard phrase, and it denies that one thing follows from another without denying the thing itself. In logic, necessarily true means true in every possible case, which is a much stronger claim.
1adverbnecessarilyAs something that must follow.
“Expensive wine isn't necessarily better than cheap wine.”
necessarily is a qualifier.
Latin
necessārius — unavoidable, inevitable, required
Old French
necessaire
Middle English
necessarye
English
necessary
English, today
necessarily
Built from
From necessary + -ly. necessary comes from Middle English necessarye, from Old French necessaire, from Latin necessārius (“unavoidable, inevitable, required”), variant of necesse (“unavoidable, inevitable”), probably from ne or non cessus, from the perfect passive participle of cēdō (“yield; avoid, withdraw”); see cede. Older use as a noun in reference to an outhouse or lavatory under the influence of English and Latin necessārium, a medieval term for the place for monks’ “unavoidable” business, usually located behind or attached to monastic dormitories.
Etymology from Wiktionary, CC BY-SA