Copy identityMatrix to avoid accidentally changing it