2

If we collect data and put it into a matrix of size (100,3), we tend to say we have three-dimensional data. We think of each column as a dimension.

On the other side, if we have a vector of size (100,1), we tend to say this is a hundred-dimensional vector.

But the vector is also a matrix. In the case above, we can say this is a (100,1) matrix or (100,1) vector. Yet in the matrix case, we would say it is one dimensional, but for vector, we would say it is a hundred dimensional. Why?

Stenga
  • 241
  • 2
  • 10
  • 3
    You can call a (100, 1) vector one hundred dimensional if you want, but your statements on "we tend to say" or "we would say" don't match my perception of prevailing usage. It's one-dimensional too, and people often say so. – Nick Cox Oct 03 '20 at 10:30
  • 1
    I won't edit your title, but your question is more about terminology or word usage. It's nothing to do with notation. – Nick Cox Oct 03 '20 at 10:31
  • No, "people" don't. The first object is simply a 2D (not 3D) matrix. The second is a vector, which by definition is 1D (not 100D). It has **length** 100. That's not "100-dimensional". I never heard anyone call that "100-dimensional", but if a handful of people did, the issue is with them, not terminology. (Can you provide citations of people using terms like this?) – smci Oct 03 '20 at 21:55
  • The key is _purpose_! Then it's usually a matter of limitation of the tool, or paper. One hundred results, perhaps sequential, of a 3d (x,y,z) position has a purpose way beyond it just being a 2d table, 100 rows, 3 columns, of numbers. – Philip Oakley Oct 03 '20 at 22:38

2 Answers2

5

I don't agree with the premise that

if we have a vector of size (100,1), we tend to say this is a hundred-dimensional vector.

I would say it is a vector of length 100.

A vector can certainly be considered a matrix, and in linear algebra we can think of a vector as a column vector, in for example:

$$ y = Xb$$

where $X$ is a matrix of dimension $n \times m$ and $b$ is a column vector of $m \times 1$ dimension, resulting in a $n \times 1 $ column vector. This is the familiar scenario in regression where $X$ corresponds to the data and we would naturally think of there being $n$ observations, and $m$ variables / features / dimensions. We can think of each column of $X$ as a column vector, of length $n$, representing one of the variables in the data.

Alternatively, a vector can be a row vector. For example, the dot product of two vectors, $ x \cdot y $, where $x$ is a $1 \times n $ row vector and $y$ is a $n \times 1 $ column vector.

Robert Long
  • 53,316
  • 10
  • 84
  • 148
1

If your data is $n \times m$ matrix, where $n$ is the number of samples and $m$ the number of features, it’s $m$-dimensional data. If $m$ is 3, it’s three-dimensional, if it’s 1, it’s unidimensional. With one column, it’s a column vector, so it has one dimension. Other case may be when someone is describing each sample in terms of a (row) vector of length $m$, so you have $n$ such vectors and data is $m$-dimensional. Dimensionality is about number of features, not samples.

Tim
  • 108,699
  • 20
  • 212
  • 390