0
$\begingroup$

Imagine I have a vector A as

\begin{bmatrix}1&2&0&7\end{bmatrix}

I wanna get the sum of every two elements in the vector as a matrix

\begin{bmatrix}2&3&1&8\\3&4&2&9\\ 1&2&0&7 \\ 8&9&7&14\end{bmatrix}

which is of course symmetric!

Is there any matrix operation by which I can construct the binary-sum matrix?

  • 0
    Your vector is in $\Bbb R^4$, and your matrix has $16$ entries, which means that there is a $16\times 4$ matrix that multiplies with your vector and results in a $16$-element vector that is your matrix, row-by-row. I doubt there is one that actually gives you a $4\times 4$ matrix.2017-01-29
  • 0
    The real vector has in fact more than 10^7 elements....2017-01-29

2 Answers 2

2

If you don't mind a few operations, you can do like this? Let your vector be $v$. The operation is $$v^{T}w+w^{T}v$$ where $$w = [1 1 ...1]$$ has the same length as your vector $v$.

  • 0
    Not an answer to the question that was asked, but a great answer nonetheless.2017-01-29
1

To amplify @Arthur's comment a bit:

Let's call your vector $v$. Then $v$ is $4 \times 1$; if you're going to compute $Av$, then $A$ must be $n \times 4$, and the result will be $n \times 1$. If you compute $vA$, then $A$ must be $1 \times k$, and the result will be $4 \times k$. Since you want $4 \times 4$, $k$ must be $4$. But there's no $1 \times 4$ matrix by which you can multiply $v$ to get your desired matrix, because $vA$ will always have rank 1 (since every column will be a multiple of $v$), but your matrix has rank at least 2 (see the upper left $2 \times 2$ block). In short: no.

  • 0
    Thanks... But I don't understand why `vA` would have rank 1!2017-01-29
  • 1
    @Morty Because $v$ does, and matrix multiplication can _never_ increase rank.2017-01-29