# Name of a vector of 1s?

Let's consider an N dimensional vector where each coordinate takes the value 1. For example, for $$N=5$$ we have: $$(1,1,1,1,1)$$.

Does this type of vector have a name in the literature? Perhaps "unary?". Also, are there any conventions on how to refer to it in terms of notation? (e.g. $$\mathbf{1}^T$$?)

• ${\bf I}_5$.... Commented Apr 19, 2021 at 22:41
• Your notation $\mathbf{1}$ (or $\mathbf{1}^T$ if you insist that $\mathbf{1}$ is a column vector) is fine and is commonly used. Just define it when you are using it. Commented Apr 19, 2021 at 22:59
• Commented Apr 19, 2021 at 23:00

It's not quite common enough to have a standard notation, but a reasonably well-accepted notation would be something like $$\mathbf{1}_n = (1, 1, \ldots, 1) \in \mathbb{R}^n$$, and if you needed a column vector then you'd write $$\mathbf{1}^\intercal_n$$. It may sometimes be called the 1-vector of size $$n$$ or a size $$n$$ vector of 1s.

As such, it's the kind of thing that when you use it you would probably be best off defining it explicitly so that it's clear what you're doing with it.

I do not disagree at all with all the other answers, but I would add that if you are dealing with not only vectors but matrices as well, a mathematically equivalent way to write a vector of size $$n$$ containing ones could be: $$diag(I_n) = diag\left(\begin{bmatrix} 1 & 0 & 0 & \cdots & 0 \\ 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \cdots & 1 \end{bmatrix}\right) = \begin{bmatrix}1 & 1 & 1 & \cdots & 1 \end{bmatrix}$$

A hint of that use of the "diag" operator can be found in another StackExchange question: What does $\mbox{diag}(A)$ denote? . Notably:

diag(A) for a matrix A usually refers to the vector holding the diagonal entries of A.

Conversely, diag(v) for a vector v usually refers to the square matrix which has v on the diagonal and zeros everywhere else.

A third common usage is to let diag(A) for a matrix A be the matrix with all non-diagonal entries replaced by zero, which is [...] equivalent to diag(diag(A)) using the other convention.

I'm not aware of any conventional terminology. However, vector of ones is pretty compact and seems to get the job done. Similarly, I'm not aware of any special notation. Were I using it, I'd just define some notation. For example, let $$a \in \mathbb{R}^d$$ denote the vector of ones (ie, $$a = (1,\ldots, 1)$$).

Of course, depending on the context, there could be special notation. That could represent the identity in something like the multiplicative group $$\mathbb{Z}^× \times \mathbb{Z}^×$$. Then the standard notation for an identity element would be used.

• I think the all-ones vector is special enough to deserve its own notation. The symbol $v$ would usually be used as an arbitrary vector in a given space. Commented Apr 19, 2021 at 23:00
• Sure, I wasn't so much suggesting he use $v$. Just saying how I would deal with such an object were I using it. You could plug in anything you want for $v$. I'm just not aware of a conventional notation. Commented Apr 19, 2021 at 23:04

It is common to find $$\bf{e}= [1, \dots, 1, \dots, 1]^T$$ in linear algebra textbooks. This is because the basis vectors are represented by $$\bf{e_k} = [0, ..., 1, ..., 0]^T$$.