The pathological, involuntary imitation of another person’s behavior. This condition may be present in people with autism or Tourette’s syndrome, but not always.

Example: You scratch your ear and observe the patient doing the same; no matter what you do, he mechanically continues to copy your actions.

Here is a great resource about the distinction between voluntarily imitating and compulsively having to imitate: