What are the different ways of matrix-vector multiplication when the matrix has the given form?

55 Views Asked by At

Suppose we have $$ \begin{bmatrix} a & b \\ b & a \end{bmatrix} \begin{bmatrix} c \\ d \end{bmatrix} = \begin{bmatrix} ac+bd \\ bc+ad \end{bmatrix} $$ Where $a,b,c,d$ are non-zero integers.

What are the different ways of performing matrix-vector multiplication of this form with less than 4 products?

2

There are 2 best solutions below

0
On BEST ANSWER

First note that $$ac+bd=ac+bd+bc-bc$$ $$=b(d-c)+c(a+b)$$ And $$bc+ad=bc+ad+ac-ac$$ $$=a(d-c)+c(a+b)$$ So now we only need three products $$A=a(d-c)$$ $$B=b(d-c)$$ $$C=c(a+b)$$ Therefore $$ \begin{bmatrix} a & b \\ b & a \end{bmatrix} \begin{bmatrix} c \\ d \end{bmatrix} =\begin{bmatrix} ac+bd\\ bc+ad\\ \end{bmatrix} $$ $$ = \begin{bmatrix} b(d-c)+c(a+b)\\ a(d-c)+c(a+b) \end{bmatrix} = \begin{bmatrix} B+C\\ A+C \end{bmatrix} $$

0
On

You can go with three multiplications, compute $$ A := ac, B := bd, C := (a+b)(c+d) $$ then $$ \begin{bmatrix} a & b \\ b & a \end{bmatrix} \begin{bmatrix} c \\ d \end{bmatrix} = \begin{bmatrix} A + B \\ C - A - B \end{bmatrix} $$