Both and Both of
Both is used to talk about two people or things.
Both cats and dogs are pet animals.
Before a noun with a determiner (the, my, this etc.), both and both of are both possible.
Both of my parents are teachers. OR Both my parents are teachers.
You can take both of the shirts. OR You can take both the shirts.
Both of these answers are correct. OR Both these answers are correct.
Note that the is often dropped after both.
She has eaten both chops. OR She has eaten both the chops. OR She has eaten both of the chops.
Before personal pronouns we use both of.
Both of them have agreed to come. (NOT Both them have agreed to come.)
She has invited both of you. (NOT She has invited both you.)
Note that both of is followed by object forms of the pronoun (us, them, you etc.).
The not used before both
We do not put the before both.
Both the boys were given prizes. (NOT The both boys were given prizes.)
Negative structures
In negative structures we use neither, not both not.
Neither of them came. (NOT Both of them did not come.)
Both with verbs
Note the special structure in which both goes with the verb.
They can both swim. (= Both of them can swim.)
They have both come. (= Both of them have come.)
They both liked the movie. (= Both of them liked the movie.)
Both…and
Note that in this structure words of the same part of speech follow both and and.
She is both beautiful and intelligent. (Here both and and are followed by adjectives.)
She both sings and acts. (Verbs)
I have invited both John and Peter. (Nouns)