# How to write a matrix of $n\times 2$ where the first column is made of only 1's?

How to write a matrix of $$n\times 2$$ where the first column is made of only 1's?

Suppose I have a vector x={.24,...,10}.

How can I get this

$$\left( \begin{matrix} 1 & .24 \\ 1 & 21 \\ 1 & 33 \\ 1 & 11 \\ 1 & 10 \end{matrix}\right)$$

How can I do that?

I know how to write a 'normal' matrix, it's MatrixForm[{1,2},{1,1}] but how to give the form above?

col2 = {2.4, 21, 33, 11, 10};


{{1, 2.4}, {1, 21}, {1, 33}, {1, 11}, {1, 10}}

% // MatrixForm //TeXForm


$$\left( \begin{array}{cc} 1 & 2.4 \\ 1 & 21 \\ 1 & 33 \\ 1 & 11 \\ 1 & 10 \\ \end{array} \right)$$

Also

{1, #} & /@ col2 (* or Map[{1, #} &, col2] *)
col1 = ConstantArray[1, Length@col2];
Transpose[{col1, col2}]


both give

{{1, 2.4}, {1, 21}, {1, 33}, {1, 11}, {1, 10}}

• Many thanks kglr, I think the first option its the easier:) – g.a.l.l.e.t.a Oct 31 '18 at 5:07
• @user459663, my pleasure. Welcome to mma.se. – kglr Oct 31 '18 at 5:14

Here is another solution, based on Table. For a toy list,

bill = Range
Flatten[Table[{1, bill[[j]]}, {i, 1, 1}, {j, 1, 5}], 1]
MatrixForm[ted]
`

The last line is for formating reasons, and Flatten removes a redundant pair of brackets.