The expression of a quadric in the matrix form $$\begin{bmatrix}1&\mathbf x^T\end{bmatrix} \begin{bmatrix} c & \mathbf b^T \\ \mathbf b & A\end{bmatrix} \begin{bmatrix}1\\ \mathbf x\end{bmatrix} = \mathbf x^TA\mathbf x+2\mathbf b^T\mathbf x+c$$ is completely general: it works for any number of variables. If you have $n$ variables, the vectors $\mathbf x$ and $\mathbf b$ will be $n$-dimensional and the matrix $A$ will be $n\times n$.
To see how to convert from an implicit Cartesian equation $f(\mathbf x)=0$ for a quadric into this form, expand the above expression in terms of coordinates. If we have $\mathbf x = (x_1,\cdots,x_n)^T$, then the expression becomes $$\sum_{i=1}^n\sum_{j=1}^n a_{ij}x_ix_j+\sum_{i=1}^n2b_ix_i+c.\tag{*}$$ We find immediately that $c$ is just the constant term of the quadric and that the elements of the vector $\mathbf b$ are the coefficients of the corresponding linear terms, halved. As for the quadratic part of the expression, there are two types of quadratic terms in $f(\mathbf x)$: some are of the form $p_i x_i^2$ and others $q_{ij}x_ix_j$, with $i\lt j$. Comparing this to the sum in (*), we can see right away that the diagonal elements of $A$ are the coefficients $p_i$ of the squared terms of the quadric. For the off-diagonal elements, on the other hand, we have $a_{ij}+a_{ji}=q_{ij}$. In principle, you could use any values that add up to $q_{ij}$ for this pair of matrix elements, but it turns out that only the symmetric part of $A$ contributes to the expression $\mathbf x^TA\mathbf x$, so you might as well make $A$ symmetric in the first place by setting $a_{ij}=a_{ji}=\frac12 q_{ij}$ for $i\ne j$. This makes the larger matrix symmetric, which gives it several useful properties.
Comparing this to your work, assuming that you’ve chosen the order $\mathbf x = (x,y,z)^T$, then you’ve gotten the matrix exactly right.