Matrix and two vectors product

63 Views Asked by At

Does anyone know how to represent the product of an $n×n$ matrix and two $n$-vectors in a compact form using $\sum$ and indexes?

If it was only a vector then $\sum_{j=1}^{n} A_{i,j}v_j$. But with two vectors I have no clue.

2

There are 2 best solutions below

11
On BEST ANSWER

Say the square matrix is $A$ with entries $a_{ij}$ (first index refers to the row, second to the column) and the two vectors are $p=(p_i)^T$ and $q=(q_i)^T$. Then $$p^TAq=\sum_{i=1}^n\sum_{j=1}^np_iA_{ij}q_j=\sum_{1\le i,j\le n}p_iA_{ij}q_j$$

4
On

What about $$\sum_{j=1}^{n}A_{ij} (u_j,v_j)$$ for two vectors ,$u$ and $v$

It could be generalized to more vectors.