Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?)

share|cite|improve this question
Could someone please create further tags for this post? I don't have enough reputation yet. (At least "scalars" would be great.) – Kazark Sep 16 '11 at 4:15
Mathematicians have many, many notions of equivalence. In some of them, the answer is yes. – Qiaochu Yuan Sep 16 '11 at 4:17
It is indeed sensible to treat $1\times 1$ matrices as scalars (for most applications). The surprise here is that multiplication is actually commutative! – J. M. Sep 16 '11 at 4:18
"I am a programmer, so to me $[x]\neq x$ a scalar in some sort of container is not equal to the scalar.". Note that the brackets/parentheses in the matrix notation are mostly there for aesthetic reasons and clarity. Mathematicians could have decided to just write a matrix as a table of numbers with no embellishment at all (or, on the contrary, separate entries by lines). So the notation $[x]$ does not mean that $x$ is contained in something. – Taladris Nov 6 '14 at 10:40
I got bit by this as well...I was using a linear algebra library, and multiplied a $1\times n$ matrix by a $n\times 1$ matrix. The result was stored, and caused a bug later in the program because a matrix data type was expected, but it was a scalar. I checked and this behavior is consistent with Mathematica and Maxima, so I guess it's accepted convention. – Ethan Brown Feb 27 at 3:25
up vote 10 down vote accepted

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.

share|cite|improve this answer
You could treat the 2x2 matrix as having 1x1 matrix entries, then define multiplication to be the matrix of products of 1x1 matrices! – The Chaz 2.0 Sep 16 '11 at 4:29
On the other hand, a column vector ($n \times 1$ matrix) can be multiplied by a scalar as well as by a $1 \times 1$ matrix, and then it's convenient not to make any distinction, for example in the middle step of the calculation $(x \cdot n)n = n(n\cdot x) = n(n^t x) = (nn^t)x$. – Hans Lundmark Sep 16 '11 at 4:39

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.

share|cite|improve this answer
A $1\times 1$ matrix is useful for identifying a field with $GL(1)$ and thereby embedding it in $GL(n)$... :P – Tabes Bridges Feb 7 '13 at 18:18

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.

share|cite|improve this answer
Your answer does not really address the question and there is already an accepted answer. – wltrup Aug 6 '15 at 21:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.