"Cat" is the subject of your first sentence. The predicate is "sat on the mat". "Mat is the subject of your second sentence. The predicate is "is where the cat sat". A writer can do whatever he/she wants, but without correct grammar, the writing/speech is likely to be discounted.
Student or Learner