I know and I have already did the proof by considering an $n\times n$ arbitrary matrix and checking the conditions and figured it out that the matrix should be the identity matrix. Moreover, when I was searching here, I saw this question and its answers. The answers there are as well by doing calculations on matrices.
I would like if there is some more professional approach to do this proof.