# How to denote n elements in a vector?

I have a column vector with two 1's and n 2's, where n is an integer. What is a clever way of denoting that there are n 2's in the matrix? I was thinking of using like a side brace, but I don't know how to do that, and I think it might look messy. Does anyone have any suggestions?

This is what I currently have:

\begin{align*}
\begin{bmatrix}
1 & 1 \\
2 & 1 \\
3 & 1 \\
3 & 1 \\
\vdots & \vdots  \\
n \text{ times } & n \text{ times } \\
\vdots & \vdots \\
3 & 1
\end{bmatrix}
\begin{bmatrix}
m \\ b
\end{bmatrix} = \begin{bmatrix}
1 \\ 1 \\ 2 \\ 2 \\ \vdots \\ n \text{ times } \\ \vdots \\ 2
\end{bmatrix},
\end{align*}


In the above code, the rows with entries 3 and 1 are supposed to appear in the left-hand matrix n times, and the 2 in the right-hand matrix is supposed to appear n times. My current notation is pretty confusing, though.

• Yes, let me update my post. Commented Oct 8, 2018 at 3:53
• This site is full of proposals. Arrows, brace, whatever. One vey minimal possibility is to load \usepackage{graphicx} and to replace n \text{ times } by \rotatebox{-90}{$n$ times}.
– user121799
Commented Oct 8, 2018 at 3:59
• Does this question help?
– NBur
Commented Oct 8, 2018 at 8:02
• Another option is to indicate the size of the matrix as a subscript and only have \vdots in the actual matrix. Having n times in the actual list is kind of ambiguous: x ... n times ... x could be interpreted as there are n+2 xs. Commented Oct 8, 2018 at 8:16

Here is a realisation with some fine-tuning of @marmot's suggestion:

\documentclass{article}
\usepackage{mathtools}%
\usepackage{graphicx}

\begin{document}

\begin{align*}
\begin{bmatrix}
1 & 1 \\
2 & 1 \\
3 & 1 \\
3 & 1 \\[-1.2ex]
\vdots & \vdots \\
\rotatebox{90}{\footnotesize$n$ times} &\rotatebox{90}{\footnotesize$n$ times} \\[-1.3ex]
\vdots & \vdots \\[-0.4ex]
3 & 1
\end{bmatrix}
\begin{bmatrix}
m \\ b
\end{bmatrix} = \begin{bmatrix}
1 \\ 1 \\ 2 \\ 2 \\[-1.2ex]  \vdots \\\rotatebox{90}{\footnotesize$n$ times} \\[-1.3ex] \vdots \\[-0.4ex] 2
\end{bmatrix}
\end{align*}

\end{document}


Introduce notation and explain it.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\one}[1]{\mathop{{}\mathbf{1}}\nolimits_{#1}}

\begin{document}

Let's denote by $\one{m\times n}$ the $m\times n$ matrix having all entries equal to~$1$; therefore,
for instance,
\begin{equation*}
\one{m\times n}=\one{m\times 1}\one{1\times n}
\end{equation*}
For simplicity, we will also write $\one{n}$ instead of $\one{n\times 1}$, so the above equality
can also be written $\one{m\times n}=\one{m}^{}\one{n}^T$.

Then we have, with block matrices,
\begin{equation*}
\begin{bmatrix}
1 & 1 \\
2 & 1 \\
3\one{n} & \one{n}
\end{bmatrix}
\begin{bmatrix} m \\ n \end{bmatrix} =
\begin{bmatrix} 1 \\ 1 \\ 2\one{n} \end{bmatrix}
\end{equation*}

\end{document}