6

I have seen a matrix multiplication with programming and other means such as the convention of dot product where $[3][2]=6$. However, I am unsure if it is technically correct to have it $[3][2]=[6]$. If you have a matrix $A$ which is $ 1 \times n$ and another matrix $B$ which is $n \times 1$ where $n$ is an element of the set of natural numbers, then $AB$ is another matrix which is $1 \times 1$ (like $[6]$) or is it not a matrix at all (like $6$)?

Widawensen
  • 8,517
W. G.
  • 1,856
  • It is common to say that $[6]$ and $6$ are the same thing, which is to say that $1 \times 1$ matrices are scalars. The one "bad" result is that it allows normally disallowed multiplications (such as multiplying a $1 \times 1$ matrix by a $2 \times 2$ matrix). – Ben Grossmann Dec 29 '16 at 15:52
  • So I should be okay just leaving it as [6]? – W. G. Dec 29 '16 at 16:05
  • Depends what you're doing with it. Are you leaving it as $[6]$ in a program? As an answer on paper? – Ben Grossmann Dec 29 '16 at 16:08
  • On paper, I want it to be as mathematically correct as possible. – W. G. Dec 29 '16 at 16:09
  • I think it should be a 1x1 matrix. Einstein notation and every other aspect of matrices would make logical sense to keep it labeled as a matrix. But that's my opinion unless I hear otherwise. – W. G. Dec 29 '16 at 16:15
  • I've added a quick argument against $1 \times 1$ matrices in my answer. – Ben Grossmann Dec 29 '16 at 16:27

1 Answers1

9

Yes, it is technically correct to write, for example, $$ \pmatrix{3&1}\pmatrix{2\\-1} = (5) $$ However, it is much more common to simply write $$ \pmatrix{3&1}\pmatrix{2\\-1} = 5 $$ It is rare to see $1 \times 1$ matrices enclosed in brackets (or thought of as matrices rather than scalars), so the reader is likely to be confused at first if you decide to go with the "technically correct" first option. However, either way is understandable.


Often, writing a $1 \times 1$ matrix as a scalar allows you to cut through and clarify matrix multiplication. For example, it is helpful to write that if $x$ is a unit vector, then $$ (xx^T)^2 = x(x^Tx)x^T = (x^Tx)(xx^T) = xx^T $$ In the case that $x$ isn't a unit vetor, we can now easily see that $(xx^T)^n = (x^Tx)^{n-1} xx^T$, which is more immediately comprehensible than $x(x^Tx)^{n-1}x^T$.

Similarly, the Sherman-Morrison formula should technically be written as $$ A^{-1} - A^{-1}u([1] + v^TA^{-1}u)^{-1}v^TA^{-1} $$ but (I find) it is much clearer if written in the form $$ A^{-1} - \frac{A^{-1}uv^TA^{-1}}{1 + v^TA^{-1}u} $$

Ben Grossmann
  • 234,171
  • 12
  • 184
  • 355