# Solving symbolic matrix equation

I have this equation, $$f(x)=Ax-diag(x)(Ax+b)$$, where $x\in \mathbb{R}^n$, $A\in \mathbb{R}^{n\times n}$ and $b\in \mathbb{R}^n$, for which I need to find the zeros. $x=0$ is an obvious solution, but I would like to see if there are other solutions as well.

Is there an explicit way to get the solution in terms of, $A$ and $b$ without specifying the matrices completely?

-

It's hard to know how far you can go, but Solve can work in this kind of situation. For instance, leaving all parameters completely free, define the elements and the function f:

n=2;
aMat = Array[a, {n,n}];
xVec = Array[x, n];
bVec = Array[b, n];
f[xVec_] := aMat.xVec - DiagonalMatrix[xVec].(aMat.xVec + bVec);


Then solve for the zeros

Solve[f[xVec] == 0, xVec]


At least in the 2-by-2 case, you get a completely general answer, though it is unwieldy.

-