I'm trying to follow these notes on using the matrix form of a quadric surface in 3D. On page 3, they give an example of starting from the form of a unit sphere at the origin and scaling it up by a factor of 3 in all directions, which all works fine.
However, I then tried my own example. Starting from the same unit sphere and translating it by one unit along the x-axis using the affine transformation matrix
$$ M = \begin{bmatrix} 1 & 0 & 0 & 1\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix} $$
and then finding the new Q-matrix which should represent the transformed quadric as
$$ Q' = M^{-1} Q (M^{-1})^T = \begin{bmatrix} 1 & 0 & 0 & -1\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & -1 \end{bmatrix} \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ -1 & 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 0 & 0 & 0 & 1\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 1 & 0 & 0 & -1 \end{bmatrix}. $$
Writing the equation of this quadric as $ x^T Q' x = 0 $ gives $ y^2+z^2+2x-1 = 0 $, which clearly isn't correct because it's not even a sphere but a paraboloid (graph here).
What's also not helping my confidence here is that I couldn't get WolframAlpha to verify my matrix computation above - this calculation certainly doesn't match mine, but I do think mine is correct and it is not getting the syntax or something.
Can anyone help me do this transformation correctly? What went wrong? It says on page 4 that non-linear transformations (i.e. translations) should still work.
Fixed my issue - turns out I was misusing the formula.
It worked when I used $ Q' = (M^{-1})^T Q M^{-1} $ instead.