laser1 said:
TL;DR Summary: 1x1 Matrix is scalar or not?
I've seen dot product being represented as a (nx1 vector times a (mx1)^T vector. This gives a 1x1 matrix, whereas the dot product should give a scalar. I have found some threads online saying that a 1x1 matrix IS a scalar. But none of them seem to answer this question: you can multiply a 2x2 matrix by a scalar, but you can't multiply a 1x1 matrix by a 2x2 matrix.
Strictly speaking, it is not a scalar. Say we have the matrix ##(a).## Then it represents the linear function ##x\mapsto a\cdot x,## i.e. ##a\,\cdot\,.## The dot behind ##a## makes the difference. The number ##a## itself is a scalar, the coordinate at position ##(1,1).##
However, the distinction between ##(a)## and ##a## is a bit artificial in a case where there is only one matrix entry, i.e. if the function and the coordinate is represented by the same single number.
A case, where such a distinction is important is differentiation. We say that the derivative is a linear approximation or a linear function. the derivative ##f'(x_0)## at point ##x_0## isn't linear in ##x_0## but linear in ##v\mapsto f'(x_0)\cdot v.##
\begin{align*}
f(x_0+v)&=f(x_0) + (f'(x_0))\cdot v + o(\|v\|)\\[6pt]
(x_0+v)^3&=x_0^3+(3x_0^2)\cdot v + (3x_0v^2+v^3)
\end{align*}
The linearity is somehow invisible if there is only one direction ##v=x## as in one-dimensional real calculus so speaking of a derivative as a linear map appears to be strange. But it is exactly the difference between a one-dimensional matrix ##(f'(x_0))## and the coordinate ##f'(x_0).##
Hence, there is something to it, distinguishing between a matrix as a linear function and its one coordinate, a scalar, even if the difference in one dimension seems to be a bit artificial.