Can I remove who were in the sentence below?
The park was empty except for a group of elderly people
who werestretching, jogging, and doing Tai Chi
Is it still grammatical?
It works fine without
who were, because those words have no effect on your list nor the preceeding clause. Let's break it down...
who confirms it's the elderly people performing the listed activities, but this can safely be excluded, because there is no doubt; we already know it's the group of elderly people performing these activities, because they are the only subjects listed. A subject is whom, or what does something. In this case, who is a pronoun that confirms whom the subject is. If multiple subjects existed in the sentence it would be important to confirm which subject is tied to the list, but in this case there is only one subject so it doesn't matter.
A subject is the noun, pronoun [...], or set of words that performs the verb
were is just a past tense form of
be, which is a verb. The only reason it was in the sentence to begin with was to uphold the past tense for who; "who" did what, "who" does what, "who" is doing what. Who is a pronoun, so it takes on the same requirements as the original subject, and because
the park was empty it means the subject, the
group of elderly people, they were in the park, as opposed to they are in the park, or they will be in the park.
a word that takes the place of a noun
words that tell us what a subject does or is