1
$\begingroup$

Define an $N\times N$ matrix $$ A = \begin{bmatrix} a_{11} & & & \\ a_{21} & a_{22} & & \\ \vdots & & \ddots & \\ a_{N1} & \dots & & a_{NN} \end{bmatrix} $$ and a vector $$ x = \begin{bmatrix} x_{1} \\ x_{2} \\ \vdots \\ x_{N} \end{bmatrix} $$ What is the simplest operation that produces the following vector: $$ v = \begin{bmatrix} a_{11}x_{1} \\ a_{21}x_2 + a_{22}x_2 \\ a_{31}x_3 + a_{32}x_3 + a_{33}x_3 \\ \vdots\\ a_{N1}x_N + \dots + a_{NN}x_N \end{bmatrix} $$ I.e. each row in this vector is the dot product between row $j$ in $A$ and a vector filled with $x_j$.

This is clearly not the product $A x$. I have looked at elementary matrix multiplication and it does not seem like there is a simple operation in terms of that. One way to actually achieve it is split $A$ into $N$ matrices with each of the rows of $A$, then defining $N$ vectors filled with $x_1, x_2$ respectively etc, and then doing products and adding all the resulting vectors. Clearly, that seems like an overly complicated solution.

Have I missed something simple?

$\endgroup$
  • $\begingroup$ "This is clearly not the product Ax" ?? How so ? $\endgroup$ – Hippalectryon Sep 16 '15 at 19:55
  • 1
    $\begingroup$ It is clearly the product $Ax$. $\endgroup$ – Calle Sep 16 '15 at 19:58
  • $\begingroup$ @Calle: In the product $Ax$ the second component is $a_{21}x_1+a_{22}x_2$ and so one for the other components. $\endgroup$ – Emilio Novati Sep 16 '15 at 20:01
  • $\begingroup$ Oh boy, did I mess up reading this. Sorry about that. $\endgroup$ – Calle Sep 16 '15 at 20:02
2
$\begingroup$

Given a matrix $$ A = \begin{bmatrix} a_{11} & & & \\ a_{21} & a_{22} & & \\ \vdots & & \ddots & \\ a_{N1} & \dots & & a_{NN} \end{bmatrix} $$

the matrix of the operator you are looking for is

$$ B = \begin{bmatrix} a_{11} & & & \\ 0 & a_{21} + a_{22} & & \\ \vdots & & \ddots & \\ 0 & \dots & & \sum_{j=1}^N a_{Nj} \end{bmatrix} $$

$\endgroup$
1
$\begingroup$

If I well understand $a$ is a trinagular matrix, so you can define the matrix $D(A)$ as a diagonal matrix with the diagonal element $d_{ii}=\sum_j a_{ij}$ and the request vector is $D(A)x$.

$\endgroup$
0
$\begingroup$

Assuming the matrix $\bf A$ has all 0s on it's strictly upper triangular part, a way to build the matrix bharb proposes is to do "$\textrm{diag}(\bf A 1)$" where 1 is the column vector filled with ones of such a size that the product is defined.

$\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.