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?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityI 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?
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.
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$