Recovering matrix elements from a matrix equation I have the following matrix equation:
$$\overrightarrow{y}=H\overrightarrow{x}$$
where $H$ is a square matrix of $N$ elements, $y$ is a $N$ columns vector and $x$ a $N$ rows vector. Knowing $x$ and $y$ how can I find the matrix $H$ or, one of the matrices $H$ satisfying the previous equation?
Thanks
 A: There will be infinitely many matrices which satisfy your requirements given $x \neq 0$.  To construct a matrix $H$ satisfying your requirements, suppose the $i^{th}$ component of $x$ is $x_i \neq 0$.  Take the matrix with $\frac{y}{x_i}$ on the $i^{th}$ column and zeros everywhere else.
By the way, I think you mean that $x$ is a column vector too.  You can't multiply an $n \times n$ matrix by a row vector on the right.
A: If by chance you are interested in the lowest rank of all such $H$, the rank one matrix
$$H = \vec{y}\left(\frac{1}{\vec{x}^\top \vec{x}}\right)\vec{x}^\top$$
gives
$$H\vec{x} = \vec{y}\left(\frac{1}{\vec{x}^\top \vec{x}}\right)\vec{x}^\top\vec{x} = \vec{y}\left(\frac{\vec{x}^\top\vec{x}}{\vec{x}^\top \vec{x}}\right) = \vec{y}$$
Additionally, you could find such $H$ nearest to any given matrix $A$ (use $A=0$ if you want to find the smallest possible $H$):
From QR on the vectors:
$$ x = Q_x e_1 |x|$$
$$ y = Q_y e_1 |y|$$
Set
$$S = \begin{bmatrix} \frac{|y|}{|x|} &\star &\star & \star&\cdots \\ 0&\star &\star & \star&\cdots \\ 0& \star&\star& \star &\cdots \\ \vdots &\vdots &\vdots & \vdots&\ddots \end{bmatrix}$$
where all $\star$ emements come from the respective elements of 
$$Q_y^* A Q_x$$
and use

$$ H = Q_ySQ_x^*$$

This works because unitary matrices (as the QR factorization gives) are norm preserving:
$$|A - \underbrace{Q_ySQ_x^*}_{H}| = |Q_y^*AQ_x - S|$$
