Added method to check if matrix is an identity matrix.
Changed gitignore.