Generate matrices with super simple condition I have a matrix $A \in \mathbb R^{n \times d}$ and a vector $x \in \mathbb R^{d \times 1}$ given to me.
I want to generate matrices $W, H \in \mathbb R^{d \times d}$ of rank $1$ and vectors $u, v \in \mathbb R^{n \times 1}$ such that
$W = A^Tux^TH^T$ and $H = W^TA^Tvx^T$
I'm having trouble doing this since I need to choose them all "at the same time". Anyone has any idea or an example of this setting?
 A: Let us write the equations:
$$W = A^Tux^TH^T \tag{1}$$
$$H = W^TA^Tvx^T \tag{2}$$
where we can assume without loss of generality that $x^Tx=1$.
Plugging (2) into (1) gives:
$$W=(A^Tu\underbrace{x^Tx}_1v^TA)W$$
$$W=\underbrace{(A^Tu)}_{p}\underbrace{(A^Tv)^T}_{q^T}W\tag{3}$$
Let us right (3) under the following form:
$$\begin{pmatrix}|&|&&|\\w_1&w_2&\cdots&w_d \\ |&|&&|\end{pmatrix}=pq^T \begin{pmatrix}|&|&&|\\w_1&w_2&\cdots&w_d \\ |&|&&|\end{pmatrix}$$
Otherwise said:
$$\forall i=1 \cdots d, \ \ w_i=pq^T w_i$$
meaning that $w_i$ is an eigenvector of rank-one matrix $pq^T$ associated with eigenvalue $\color{red}{1}$.
But the eigenpairs of this rank-one matrix are well-known (see theorem $1$ in this document); they are:
$$\begin{cases}\text{eigenvalues : }&(p^Tq, 0, 0, \cdots 0) \ \ \text{associated with}\\
\text{eigenvectors : }&(p,k_1,k_2, \cdots k_{d-1}) \  \text{resp.}\end{cases}$$
where the $k_i$ constitute any basis of the $(d-1)$-dimensional space orthogonal to $p:=A^Tu$ (which is the kernel of $p^Tq$).
Therefore, as all the $w_i$ have to be associated to nonzero eigenvalue, we have $w_i=p$, meaning that
$$W=[p,p,\cdots p]=[A^Tu,A^Tu,\cdots A^Tu], \tag{4}$$
that we can write as well:
$$W=p\mathbb{1}^T=A^T[u,u,\cdots,u]=A^Tu\mathbb{1}^T$$
where $\mathbb{1}$ is the column vedtor with all entries equal to $1$.
This identification can be done under the condition that the nonzero eigenvalue has the value $\color{red}{1}$:
$$p^Tq=1$$
which is equivalent to:
$$u^TAA^Tv=1 \tag{5}$$
((5) is called a "conjugation relationship" in the framework of conics or quadrics).
Practical conclusion: take $u,v$ to be any pair satisfying (5) (there is a large degree of freedom for that!), then $W$ is given by relationship (4). $H$ is then obtained from (2).
