Is a 1x1 Matrix Considered a Scalar in Mathematics?

Click For Summary

Discussion Overview

The discussion revolves around whether a 1x1 matrix can be considered a scalar in mathematics. Participants explore definitions of scalars, the relationship between scalars and matrices, and implications in linear algebra, particularly in the context of dot products and matrix multiplication.

Discussion Character

  • Debate/contested
  • Conceptual clarification
  • Mathematical reasoning

Main Points Raised

  • Some participants note that a 1x1 matrix can be represented as a scalar but question whether it should be treated as such in mathematical operations.
  • Definitions of a scalar are discussed, with some suggesting it has magnitude but no direction, while others argue this is not particularly helpful in linear algebra.
  • One participant states that a vector space is defined over a scalar field, typically the real or complex numbers, and that in this context, a 1x1 matrix is equivalent to a scalar.
  • Another participant emphasizes that while a 1x1 matrix can be identified with a scalar, the operations involving them, such as multiplication with larger matrices, differ significantly.
  • There is a discussion about the dot product being represented as a multiplication of matrices, with some arguing that it produces a 1x1 matrix that should be treated as a scalar, while others maintain that it is not strictly a matrix multiplication.
  • Clarifications are made regarding the distinction between scaling and matrix multiplication, with some participants noting that an mxn matrix can only be multiplied by an nxp matrix.
  • One participant points out that while one can identify a 1x1 matrix with its single component, this identification may not hold under all arithmetic laws.

Areas of Agreement / Disagreement

Participants generally do not reach a consensus on whether a 1x1 matrix should be considered a scalar. Multiple competing views remain regarding definitions and implications in mathematical operations.

Contextual Notes

There are limitations in the discussion regarding the definitions of scalars and matrices, as well as the implications of treating a 1x1 matrix as a scalar in various mathematical contexts. The distinction between operations involving scalars and matrices is emphasized, but not fully resolved.

laser1
Messages
170
Reaction score
23
TL;DR
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.
 
Physics news on Phys.org
:welcome:

What's your definition of a scalar?
 
PeroK said:
:welcome:

What's your definition of a scalar?
I would tentatively say that it is something that has a magnitude but no direction! I'm not sure.
 
laser1 said:
I would tentatively say that it is something that has a magnitude but no direction! I'm not sure.
That's not particularly helpful in the context of linear algebra. A matrix has neither magnitude nor direction!

https://en.wikipedia.org/wiki/Scalar_(mathematics)
 
laser1 said:
I would tentatively say that it is something that has a magnitude but no direction! I'm not sure.
My answer would be that a vector space is defined over a scalar field - usually ##\mathbb R## or ##\mathbb C##. In this context, that's what a scalar is. Note that it's pointless to argue that a complex number has a magnitude and a direction and can't be a scalar. It's a scalar in the context of Linear Algebra.

The set of 1x1 matrices (with real entries, say) is clearly equivalent to the set of real numbers. But, if we use this as our field of scalars, then scalar multiplication is not defined the same as we would normally expect for matrix multiplication by a 1x1 matrix. With scalar multiplication, we multiply every element of the matrix by the scalar. Whereas, technically a 1x1 matrix cannot be multiplied by a 3x3 matrix, for example.

The moral is that terminology and definitions are there to help you. But, if you start messing around with things, you end up with arguments over words that have little or no mathematical content.
 
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.
 
Last edited:
PeroK said:
My answer would be that a vector space is defined over a scalar field - usually ##\mathbb R## or ##\mathbb C##. In this context, that's what a scalar is. Note that it's pointless to argue that a complex number has a magnitude and a direction and can't be a scalar. It's a scalar in the context of Linear Algebra.

The set of 1x1 matrices (with real entries, say) is clearly equivalent to the set of real numbers. But, if we use this as our field of scalars, then scalar multiplication is not defined the same as we would normally expect for matrix multiplication by a 1x1 matrix. With scalar multiplication, we multiply every element of the matrix by the scalar. Whereas, technically a 1x1 matrix cannot be multiplied by a 3x3 matrix, for example.

The moral is that terminology and definitions are there to help you. But, if you start messing around with things, you end up with arguments over words that have little or no mathematical content.
Okay, so can I conclude that the dot product is NOT two matrix multiplied? But people get messy with it and say that it is even though technically it is not. Is this correct?
 
laser1 said:
Okay, so can I conclude that the dot product is NOT two matrix multiplied? But people get messy with it and say that it is even though technically it is not. Is this correct?
The dot product is defined to be a function that takes two vectors and produces a number (either Real or Complex). It can be seen as the multiplication of two matrices (1x3 times 3x1), as long as you also map the resulting 1x1 matrix to the corresponding number.

In most applications that level of detail is hardly relevant. To be honest, it's not a detail I've ever previously noticed.
 
  • Like
Likes   Reactions: laser1
PeroK said:
as long as you also map the resulting 1x1 matrix to the corresponding number.
aha! That was what I was missing. Thanks
 
  • #10
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.
How do you multiply a 2x2 matrix by a scalar? It doesn't hold up dimension-wise; you can only multiply an mxn matrix by an nxp matrix.
 
  • Skeptical
Likes   Reactions: PeroK
  • #12
PeroK said:
Ok, fair enough, I should have been more precise. This is scaling, which is different from matrix multiplication. An mxn matrix can only be multiplied, in terms of matrix , rather than scaling, with an nxp matrix.
 
  • #13
A matrix is (even 1 by 1) not a number. But the set of ##1\times 1## matrices over a ring ##R## is isomorphic to ##R## (the real numbers, say). You can get away with it in some sense by identifying these matrices with their single component (the scalar), but strictly speaking that is not consistent with the arithmetic laws. For example, we can multiply a matrix with any scalar, but we can't multiply every matrix with any ##1\times 1## matrix.

In short, if you know what you're doing, you can get away with it. Otherwise, let scalars and matrices be separate objects and you'll also be fine.
 
Last edited:
  • Like
Likes   Reactions: laser1

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 6 ·
Replies
6
Views
15K
  • · Replies 27 ·
Replies
27
Views
2K