Why is a 'part' in a play called a part?

In math one or more "parts" equal a whole and in theatre the "parts" make up the whole play.