# check whether a point is in an ellipsoid

I check this by plugging some $X$ into the ellipsoid $(X-C)^TQ(X-C)$, if the result is less than 1, it means the point is in the ellipsoid.

At first, I thought the result will always be non-negative. However, sometimes I got negative values, so I check if the absolute value of the result is less than 1.

I saw a related question here, where they only check if the result is less than 1. So my question is why am I getting negative values?

-