# How to undo a matrix-vector multiplication

I have an iterative algorithm that computes a matrix-vector multiplication such as:

$$b = Av$$

I know the vector b (which is the result of the algorithm) and the vector v. Is there a way to get the matrix A?

• Do you know just one pair of vectors $\mathbb b$ and $\mathbb v,$ or more than one pair? Do you have the ability to provide several examples of $\mathbb v$ and get the resulting vector $\mathbb b$ in each case? Dec 26, 2018 at 22:09

The first column of $$A$$ is $$A.(1,0,0,\ldots,0)$$, the second column is $$A.(0,1,0,\ldots,0)$$ and so on.

• Well the algorithm starts with $A_0 = \gamma I$ so your answer is kind of correct. But I wanted to know $A$ after the algorithm, given that I know the result $Av$ and $v$. If it helps I am referring to the algorithm called two-loop recursion of Quasi-Newton method. Jan 6, 2019 at 15:05
• I don't know. My suggestion is that you post a new question, but this time don't forget to mention that algorithm. Jan 6, 2019 at 15:09

There exists an infinity of solutions to the problem $$b=Av$$ Where $$b$$ and $$v$$ are vectors

The problem can be rewritten as $$b^T = v^T A^T$$

The minimum (least square) solution is given by the Moore-Penrose pseudo-inverse: $$A_0^T = (v^T)^+ b^T = v\,(v^T v)^{-1}\, b^T$$

Which gives $$A_0 = \frac{1}{|v|^2} b\,v^T$$

Note that $$A_0$$ is of rank $$1$$.

The other solutions are given by $$A = A_0 + B = \frac{1}{|v|^2} b\,v^T + B$$ For any matrix $$B$$ such that $$B\,v = 0$$

• In place of a matrix $B$ plus a constraint $(Bv=0)$, it might be easier to use an unconstrained matrix $C$ and the nullspace projector $(I-vv^+)$ to write the solution as $$A = bv^+ + C(I-vv^+)$$ where $v^+=\frac{v^T}{v^Tv}\quad$ This is actually the same solution since $A_0=bv^+$ and $B=C(I-vv^+)$
– greg
Dec 27, 2018 at 15:39
• @greg Effectively. Thank you for this precision Dec 27, 2018 at 16:05