I am working on stability analysis of systems with impacts and in my algorithm, I have reached a state where I have $xPx = 1$, where $P$ is a positive semi definite matrix. now with my code, at a point, I calculate the value of P, I want to recover x, which will be $sqrt(1/P)$. But as there are some negative elements of P the square root is coming imaginary number which cannot be right as my $x$ is a position variable in transverse plane. Whats is the solution or am I making some mathematical logical error? equation is from following paper, equation number 14.
Thanks for help.