If is a scalar and is a square matrix, it is very convenient to be able to write . Usually people know immediately what this means, but are uneasy about “abusing” notation, so here’s the detailed justification for why this is perfectly legitimate:
Matrices should be considered first and foremost as linear transformations. You know what a matrix is if you know what it does to vectors. A scalar is also a linear transform on vectors: multiplying a scalar times a vector is a linear operation. Therefore, scalars can also be thought of as linear transformations, and therefore as matrices. It is immediate which matrix the scalar should be: the result of multiplying by a scalar is that all components are scaled by ; the matrix that does this is just .
Here’s another way of saying that. Let be an associative algebra with unity over a field . We can define a homomorphism of algebras via . is an isomorphism since if , implies , a contradiction. is also the unique nontrivial homomorphism from to , since algebra homomorphisms must send to either or . Therefore, there is a unique copy of inside , and we can identify with that copy.
This is a general principle: no one writes when is real and is complex, because the complex numbers are considered a superset of the reals. The same is true of matrices: once we identify scalars with scalar diagonal matrices, matrices are just another superset of the reals.