# How to solver the least square problem involves with the variable is the product of Hadamard Product?

I encounted an least square problem involves hadamard product of two $$100\times 1$$ matrix: X, Y: $$A_{N\times100}*(X_{100\times 1}∘Y_{100\times 1})_{100\times 1} = B_{N\times 1}$$ In above equation, * is a traditional matrix multiplication, ∘is the hadamard product. A and B are observed known matrix， X is also known . I known this is non-convex problem. My question: is there any method to get an approximate anser of Y?

• The pseudoinverse $A^+$ and Hadamard multiplication/division $\{\odot/\oslash\}$ can solve the problem \eqalign{ &A(x\odot y) = b \\ &(x\odot y) = A^+b \\ &y = (A^+b)\oslash x \\ }
– greg
Jan 4, 2022 at 13:05

Let $$\mathbf{y}=\mathbf{x} \circ \mathbf{x}$$, a 100-by-1 vector with positive entries. The least-squares problem you are facing is now recast into a non-negative least-squares (NNLS) , i.e. minimize $$\phi(\mathbf{y})=\| \mathbf{Ay-b} \|^2, s.t. \mathbf{y} \ge 0$$ Once $$\mathbf{y}$$ is found, take the (elementwise) square root to obtain $$\mathbf{x}$$
Let $$\mathbf{z}=\mathbf{x} \circ \mathbf{y}$$, Since $$\mathbf{x}$$ is known, the method consists in 1) solving for $$\mathbf{z}$$ using standard LS and then 2) retrieve $$\mathbf{y}$$ by elementwise division : $$\mathbf{y}=\frac{\mathbf{z}_{LS}}{\mathbf{x}}$$