# Is there a quick way to find this matrix A?

I want to find a matrix $\mathbf A$ such that $x^2 + 4y^2 + 9z^2 + 4xy - 6xz = 1$ can be written as

$$\begin{bmatrix}x&y&z\end{bmatrix}\mathbf A\begin{bmatrix}x&y&z\end{bmatrix}^\top = 1$$

Is there a quick way to do this? I can tell $\mathbf A$ is

$$\begin{bmatrix} 1 & x_{12} & x_{13}\\ x_{21} &4 & x_{23}\\ x_{31} & x_{32} & 9 \end{bmatrix}$$

But I need to guess the other elements. Is there a quick way to solve this?

• watch this : youtube.com/watch?v=0yEiCV-xEWQ – rapidracim Mar 28 '18 at 20:34
• Multiply it out once, and compare terms. No need to guess. – jgon Mar 28 '18 at 20:35
• You can choose your matrix to be symmetric. In that case, divide coefficients of $xy,xz$ and $yz$ terms by $2$ to obtain the $x_{12},x_{13}$ and $x_{23}$ entries respectively. – StubbornAtom Mar 28 '18 at 20:39

• $x_{12}=x_{21}=2$
• $x_{13}=x_{31}=-3$
• $x_{23}=x_{32}=0$
$$ax^2 + by^2 + cz^2 + 2dxy+2exz+2fyz\implies A=\begin{bmatrix} a & d & e\\ d & b & f\\ e & f & c \end{bmatrix}$$
It' rather simple: it is the symmetric matrix $$\begin{bmatrix} 1 & 2 & -3\\ 2 & 4 & 0\\ -3 & 0 & 9 \end{bmatrix},$$ where the coefficients $a_{ij}$ are half the coefficients of $x_ix_j$ in the quadratic form.