<s>[INST] Is it possible to solve such an unlinear matrix equation? I have a matrix equation of the form:
$Sx=x^TKxp$, while $
    S = \begin{pmatrix}
    0 & a & a \\
    b & 0 & b \\
    c & c & 0 \\
    \end{pmatrix}
$, $a$ and $b$ are real, known numbers, $K = \begin{pmatrix}
    0 & \frac{1}{2} & \frac{1}{2} \\
    \frac{1}{2} & 0 & \frac{1}{2} \\
    \frac{1}{2} & \frac{1}{2} & 0
\end{pmatrix}
$, $p = \begin{pmatrix}
    1 \\
    1 \\
    1
\end{pmatrix}$ and $x = \begin{pmatrix}
    r \\
    s \\
    t
\end{pmatrix}$ with $r$, $s$ and $t$ as the unknows.
Is it possible to solve this equation system analytically or only numerically? How can a approach be?
 [/INST] Let $u=x^TKx=rs+st+tr$ (1). 
$Sx=up$ is then a straightforward equation which gives $r,s,t$ in terms of $u$. 
Substitute into (1) and you have a quadratic equation for $u$. 
</s>