SCALAR MATRIX, Matrices I have read two definitions of scalar matrix. The first one is that a square  matrix whose principal diagonal elements are some nonzero scalar is called scalar matrix. But the second is slightly different which says a square matrix whose  diagonal elements all contain the same scalar. In the second definition, it has not been mentioned that the scalar is nonzero. Which one is correct? Please clear my confusion.

The practice in mathematics is to allow writers to express themselves by giving their own definitions of terms like "scalar matrix" so that the most convenient or clear exposition of a topic can be achieved.  
It may be that the first author you read wanted the nonzero condition to exclude a case where the scalar matrix would be singular.  
I would expect that both authors also require the non-diagonal entries of a "scalar matrix" to be zero, so that in concise form a scalar matrix is:
$$ cI $$
where $c$ is a scalar (like any matrix entry, an element of the related field of numbers) and $I$ is an identity matrix of appropriate size.
