The use of MatrixForm is tricky. You should use it only for display, and not for calculation. One way of doing that is to wrap the assigment in parentheses (), and only thereafter use MatrixForm, i.e.: (a={{1,0},{0,1}})//MatrixForm
, instead of a={{1,0},{0,1}})//MatrixForm
, or else separate entirely the assignment and the display:
a = {{1, 0}, {0, 1}};
a // MatrixForm
We all hope that Wolfram Research will soon make these obscure tricks obsolete by a revision of MatrixForm.