Definition -
(1) The structure and rules of a language.
(2) The set of conventions outlining how to speak and write in an acceptable fashion (see prescriptivism).
(3) A formalized notation for describing the structure and rules of a language (e.g. a phrase structure grammar).

Etymology -
The word ultimately derives from the Greek grammatike tekhne, art of letters (from gramma, letter).

Oxford English Dictionary -
Its first citation is from 1362:
"Gramer for gurles, I gon furste to write."
(Langl. P. Pl. A. xi. 131 )

Please comment