Scalar operations on matrices are those that work on each element separately.
LM <- log(M) gives a matrix with the logs of each element. If c is a scalar c*M multiplies each element of the matrix M by c.
Element by element multiplication or addition of two matrices M*N is allowed (only) if they both have identical dimensions.