Suppose $x=[x_1, x_2, \cdots, x_n]^t$, $b=[b_1,b_2,\cdots,b_n]^t$ with $b_i\in K$ and $A\in M_n(K)$, where $K$ is a field. There are well known criteria for the system of equations $Ax=b$, by considering rank of $A$ and $[A|b]$.
If we consider the equation $x^tAx=\lambda$, for $\lambda \in K$, what are the criteria for the existance of solution and simple methods to solve it?