Skip to main content
Search IntMath

Is a 1×1 matrix a scalar?

By Murray Bourne, 26 Nov 2015

Reader Nour recently wrote:

Hello! 🙂

I just had a problem and got stuck when i tried to multiply (A.B).C where A ,B and C are three matrices with dimensions 1x3, 3x1 and 3x1 respectively. I got the product of (A.B) with a 1x1 dimensional matrix.

The question is: can a 1x1 matrix be a scalar? So should I just stop and say that 1x1 and 3x1 can't be multiplied?

Or is the matrix [2] = 2 a scalar (for example)?

And continue multiplying the scalar (AB) with the matrix C?

This was an interesting question. First, let me explain the issue a bit.

Multiplying matrices

We learn in the Multiplying Matrices section that we can multiply matrices with dimensions (m × n) and (n × p) (say), because the inner 2 numbers are the same (both n). The result will be a vector of dimension (m × p) (these are the outside 2 numbers).

Now, in Nour's example, her matrices A, B and C have dimensions 1x3, 3x1 and 3x1 respectively.

So let's invent some numbers to see what's happening.

Let's let


{B}={\left[\begin{matrix}{5} \\ {10} \\ {2}\end{matrix}\right]},


{C}={\left[\begin{matrix}{6} \\ {4} \\ {2}\end{matrix}\right]}

Now we find (AB)C, which means "find AB first, then multiply the result by C".

{A}{B}={\left[{2},{3},{5}\right]}{\left[\begin{matrix}{5} \\ {10} \\ {2}\end{matrix}\right]}={\left[{2}\times{5}+{3}\times{10}+{5}\times{2}\right]}={\left[{50}\right]}


{\left({A}{B}\right)}{C}={\left[{50}\right]}{\left[\begin{matrix}{6} \\ {4} \\ {2}\end{matrix}\right]}

The above line is Nour's dilemma. Are we allowed to multiply the above? We have the following situation:

(1 × 1) matrix × (3 × 1) matrix

According to what I said above, since the inside numbers (1 and 3) are different, then we can't multiply the matrices.

However, if we regard a (1 × 1) matrix as a scalar, we can multiply them just fine, and get the following result:


Which is correct?

Software solutions

Scientific Notebook gave me the following for the first step:

{A}{B}={\left[{2},{3},{5}\right]}{\left[\begin{matrix}{5} \\ {10} \\ {2}\end{matrix}\right]}={50}

That is, it regards a 1×1 matrix as a scalar. It was fine with the scalar times matrix step and gave the same as my second result above.

However, it choked (it refused to answer) when I tried to do it all in one go, like this:


Even giving it a hint (by putting brackets) didn't help:


Wolfram|Alpha regards the result of AB as a (1 × 1) matrix. Here's a screen shot:

Wolfram|Alpha matrix example

It did not behave well and gave rather strange results when trying to do the whole thing. Here's a screen shot of its answer for ABC, where it regarded parts of the question as a vector, and other parts as a matrix:

Wolfram|Alpha matrix example

SageMath (the free cloud-based computer algebra system) also regards the result of AB as a (1 × 1) matrix. It appropriately chokes when trying to do the whole thing. Here's a screen shot:

Sagemath matrix scalar example

What do the forums say?

Here's one conversation on Stackexchange: Are one-by-one matrices equivalent to scalars?

This next one has a contradictory conclusion: Is a one by one matrix just a number scalar?

And there's more enlightenment here on this Google+ discussion.

What I told Nour

My feel is that your statement "So i will just stop and say that 1x1 and 3x1 can't be multiplied" is correct. While the outer numbers are the same, the inner ones are not, so you can't multiply them.

What do you think?


Mathematics is not always a consistently behaved beast, despite what many text books say.

See the 10 Comments below.

Leave a comment

Comment Preview

HTML: You can use simple tags like <b>, <a href="...">, etc.

To enter math, you can can either:

  1. Use simple calculator-like input in the following format (surround your math in backticks, or qq on tablet or phone):
    `a^2 = sqrt(b^2 + c^2)`
    (See more on ASCIIMath syntax); or
  2. Use simple LaTeX in the following format. Surround your math with \( and \).
    \( \int g dx = \sqrt{\frac{a}{b}} \)
    (This is standard simple LaTeX.)

NOTE: You can mix both types of math entry in your comment.


Tips, tricks, lessons, and tutoring to help reduce test anxiety and move to the top of the class.