Answer:
Grammatical function is the syntactic role played by a word or phrase in the context of a particular clause or sentence. Sometimes called simply function.
In English, grammatical function is primarily determined by a word's position in a sentence, not by inflection (or word endings).
it basically means: To express action
Examples and Observations:
The five elements of clause structure, namely subject, verb, object, complement, and adverbial, are grammatical functions. In addition, we distinguish predicator as the function carried by the main verb in a clause, and predicate as the function assigned to the portion of a clause excluding the subject.
Within phrases, certain types of units can function as modifiers, more specifically as premodifiers or postmodifiers.
There is no one-to-one correspondence between functions and their possible formal realizations. Thus the functions of subject and direct object are often realized by a noun phrase, but can also be realized by a clause.