Refactor the combinations as identity_matrix function