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)

$\endgroup$
2
$\begingroup$

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

$\endgroup$
  • $\begingroup$ Doh! Must be too tired $\endgroup$ – Carlos - the Mongoose - Danger Feb 6 '17 at 4:38
  • $\begingroup$ Same solution, but even more compact: $\vec{x}\vec{1}^T$. $\endgroup$ – Anna SdTC Feb 6 '17 at 4:43
1
$\begingroup$

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]$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.