Building matrix so that the inner product of columns results in an element of another matrix

59 Views Asked by At

Let $$A_{n \times n} = \begin{bmatrix} a_{11}\quad a_{12}\quad ... \quad a_{1n}\\ a_{21}\quad a_{22}\quad ... \quad a_{2n}\\ .\\.\\.\\ a_{n1}\quad a_{n2}\quad ... \quad a_{nn} \end{bmatrix}$$ be symmetric and assume that $\operatorname{rank}(A)\neq 1$, for any purpose.

I need to find $$W_{m \times n} = \begin{bmatrix}w_1\quad w_2\quad ...\quad w_n\end{bmatrix}$$ so that $$<w_i,w_j>\,\approx\,a_{ij}\qquad \forall i,j$$

Is there an algorithm for that?

1

There are 1 best solutions below

4
On

As $A$ is symmetric there exists (see eigendecomposition) an orthogonal matrix $U\in\Bbb R^{n\times n}$, i.e. $UU^\top = I$, and a diagonal matrix $D=\operatorname{diag}(d_1,\ldots,d_n)\in\Bbb R^{n\times n}$ such that $A = UDU^\top$. Now, let $D^{1/2}=\operatorname{diag}(d_1^{1/2},\ldots,d_n^{1/2})$ and set $W=D^{1/2}U^\top$. We obtain $$\langle w_i,w_j\rangle = (W^\top W)_{i,j} = \Big((D^{1/2}U^T)^\top D^{1/2}U^\top\Big)_{i,j}= (UD^{1/2}D^{1/2}U^\top)_{i,j} = A_{i,j}\qquad \forall i,j.$$ There are many numerical method for computing the eigendecomposition of a symmetric matrix. In particular, you can use any SVD solver to find $U$ and $D^2$.

Note if $A$ is also positive semi-definite, i.e. all its eigenvalues are nonnegative, then you may also perform a Cholesky decomposition.