0
$\begingroup$

Let $x = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix}$

How do I find a way to express the following matrix

\begin{bmatrix} x_1 & x_1 & \ldots & x_1 \\ x_2 & x_2 & \ldots & x_2 \\ \vdots \\ x_n & x_n & \ldots & x_n\end{bmatrix}

into say a product between a matrix and vector $x$ (or an outer product, or hadamard product...etc)

2 Answers 2

2

$$\begin{bmatrix}x_1 \\ x_2 \\ \vdots \\ x_n\end{bmatrix} \begin{bmatrix}1 & 1 & \cdots & 1\end{bmatrix}$$

  • 0
    Doh! Must be too tired2017-02-06
  • 0
    Same solution, but even more compact: $\vec{x}\vec{1}^T$.2017-02-06
1

Your vector is an $n \times 1$ matrix, and the resultant matrix you want is $n \times n$. So, you would need a $1 \times n$ matrix.

Try $[1\quad 1 \quad \cdots \quad1]$