# How could a scalar be equal to the trace of the same scalar? [closed]

A scalar is supposed to be a matrix and a trace is suppose to be a number; how could the two be equal in the picture below where $$Y$$ is an $$n \times 1$$ random vector and $$A$$ is any $$n \times n$$ symmetric matrix of constants, $$\mu$$ is a mean vector with $$\mu=E(Y)$$.

Note: Refer to the first relationship at the first equal sign.

• A $1\times 1$ matrix is usually identified with a number. – Eclipse Sun Feb 3 '19 at 17:40
• While a $1\times 1$ matrix $\pmatrix{a}$ is a matrix, and $a$ is a scalar, it takes a great deal of effort to make a distinction between them. – Angina Seng Feb 3 '19 at 17:40
• @LordSharktheUnknown - This is still kind of perplexing right now to me, may you enlighten me if possible? – Victor Feb 3 '19 at 18:11
• Here's another question that boils down to knowing when it's worth distinguishing a $1\times 1$ matrix from the number inside it, vs when it's helpful to ignore that: math.stackexchange.com/questions/2899910/… – J.G. Feb 3 '19 at 18:29
• @J.G. please take a look on the image that I just added a momet ago(It is not 1 x 1 matrix), Do you think it is kind of funky? – Victor Feb 3 '19 at 18:31

The trace of a matrix is the sum of its diagonal entries, that is, if $$X = (x_{ij})$$ is an $$n \times n$$ matrix, then $$\mathrm{tr}(X) = \sum_{i=1}^n x_{ii}$$. If $$X$$ is a $$1 \times 1$$ matrix, then $$X = (x_{11})$$ and therefore we have that $$\mathrm{tr}(X) = x_{11}$$.

Hence, the trace of a $$1 \times 1$$ matrix is equal to its sole entry.

Observe that the operations of matrix addition and matrix multiplication in the space $$M_{1}(\Bbb{R})$$ of all $$1 \times 1$$ matrices with real entries is exactly the same as the usual addition and multiplication in $$\Bbb{R}$$. Because, \begin{align} (x) + (y) &= (x+y)\\ (x) \cdot (y) &= (xy) \end{align} So, it is natural to identify the space $$M_1(\Bbb{R})$$ with $$\Bbb{R}$$ itself, and call a $$1 \times 1$$ matrix to be a scalar.

(More precisely, the map $$f : M_1(\Bbb{R}) \to \Bbb{R}$$ defined by $$f\bigl((x)\bigr) = x$$ is a ring homomorphism.)

It is in this sense that the author says that the $$1 \times 1$$ matrix $$(\mathbf{Y} - \mu)' \mathbf{A} (\mathbf{Y}-\mu)$$ is a scalar, and equates this scalar to its trace.

• Thanks you for your reply. Hmm, initially I was just thinking about the same thing, please take a look at the image on the statement of therem 1.3.2 I just added a few moments ago. – Victor Feb 3 '19 at 18:35
• @Victor No problem. What seems to be the issue with the statement of the theorem? I still see a $1 \times 1$ matrix. – user279515 Feb 3 '19 at 18:41

This is a common example of abuse of notation, although that link doesn't appear to discuss it: conflating a $$1\times 1$$ matrix with its only element. (This often happens when we pretend the matrix $$\mathbf{a}^\prime\mathbf{b}$$ with column vectors $$\mathbf{a},\,\mathbf{b}$$ is the number $$\mathbf{a}\cdot\mathbf{b}$$; see this related question.) A more accurate statement would have been:

Since $$(\mathbf{Y}-\mu)^\prime\mathbf{A}(\mathbf{Y}-\mu)$$ is a $$1\times 1$$ matrix and using Result 1.5, $$[(\mathbf{Y}-\mu)^\prime\mathbf{A}(\mathbf{Y}-\mu)]_{11}=\operatorname{tr}[(\mathbf{Y}-\mu)^\prime\mathbf{A}(\mathbf{Y}-\mu)]=\operatorname{tr}[\mathbf{A}(\mathbf{Y}-\mu)(\mathbf{Y}-\mu)^\prime].$$

• Thanks You for your answer, That is ridulously misleading for a graudate textbook made a big mistake from early on. It is the main text for a graduate course in Cornell University, I guess they shouldn't choose this lousy textbook from the beginning. faculty.bscb.cornell.edu/~booth/courses/stsci7170/syllabus.pdf – Victor Feb 3 '19 at 18:45
• @Victor I understand your frustration, but I wouldn't be too hard on Moser or anyone at Cornell. Common abuses of notation are harmless when readers expect them, which is what everyone involved assumed. Ideally a good teacher would sense students who don't and point out, "BTW Moser's saying this when he means that". But it's possible Moser and Cornell alike expect graduate students to know this one. – J.G. Feb 3 '19 at 18:53