I am a programmer, so to me $[x] \neq x$—a scalar in some sort of container is not equal to the scalar. However, I just read in a math book that for $1 \times 1$ matrices, the brackets are often dropped. This strikes me as very sloppy notation if $1 \times 1$ matrices are not at least functionally equivalent to scalars. As I began to think about the matrix operations I am familiar with, I could not think of any (tho I am weak on matrices) in which a $1 \times 1$ matrix would not act the same way as a scalar would when the corresponding scalar operations were applied to it. So, is $[x]$ functionally equivalent to $x$? And can we then say $[x] = x$? (And are those two different questions, or are entities in mathematics "duck typed" as we would say in the coding world?)
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
No. To give a concrete example, you can multiply a 2x2 matrix by a scalar, but you can't multiply a 2x2 matrix by a 1x1 matrix.
It is sloppy notation.
I am very curious though. Mathematicians define the "scalar product" of a vertical column and horizontal row matrix as the same operation as the dot product. In fact, matrix multiplication is easily seen as the matrix of dot products between associated row and column vectors. Many times, they treat the rows or columns of a rectangular matrix as a row or column matrix containing vectors as its elements.
If I take the dot product of two vectors I get a scalar. But if I did the same operation, scalar multiplication, between a row and column vector matrix, I get a 1x1 matrix. Whose sole element is the dot product.
What is a 1x1 matrix anyway? What good is it for anything?
I have asked the same question before in the past. Sure it may be sloppy notation and as charles zheng pointed out, it obviously does not work as an equivalence. But there does seem to be some confusion about whether there is even a need for a distinction.
A vector is an 1*n matrix. A 1*n matrix times a n*1 matrix gives us a 1*1 matrix. Can we call it a scalar? Can we multiply it with another matrix of any size, the way we can with a scalar? Not Always I suppose. It may depend on the situation. It may be considered a scalar or a 1*1 matrix based on the application justifying it.