In the context of inner products and normed vector spaces I need help with the following exercise :
$(1)$ Show that the function $q : \mathbb R^3 \times \mathbb R^3 \to \mathbb R$
$$q(\mathbf u, \mathbf v) = q((x_1, x_2, x_3), (y_1, y_2, y_3)) = 5x_1y_1 + 3x_2y_2 - 2x_2y_3 - 2x_3y_2 + 2x_3y_3$$
defines an inner product $<\mathbf u, \mathbf v>_q = q(\mathbf u, \mathbf v)$ in the vector space $\mathbb R^3$.
I want to use this proposition to answer the question :
Proposition. $\langle \mathbf x, \mathbf y \rangle$ is an inner product on $\mathbb R^n$ if and only if $\langle \mathbf x, \mathbf y \rangle = \mathbf x^T A \mathbf y$, where $A$ is a symmetric matrix whose eigenvalues are strictly positive.
Here's a simpler exercise which I was able to solve :
$(2)$ For $f : \mathbb R^2 \times \mathbb R^2 \to \mathbb R$ where $f(\mathbf x, \mathbf y)= x_1y_1-x_2y_1-x_1y_2+4x_2y_2$ the matrix $$A=\begin{pmatrix}1&-1\\-1&4\end{pmatrix}.$$
We note that $A$ is symmetric and has strictly positive eigenvalues. Therefore, by the previous proposition, the function $f$ defines an inner product given by $$\langle \mathbf x, \mathbf y\rangle_f = \mathbf x^T A \mathbf y.$$
I wanted to use a similar argument for $(1)$ but I was not able to set up the matrix. Can someone describe the appropriate method to set up the matrix $A$ in exercise $(1)$ so I do it myself in other exercises?
EDIT : Given the answer of Roland, I found the matrix $A$ to be
$$A=\begin{pmatrix}5&0&0\\0&3&-2\\0&-2&2\end{pmatrix}$$
which is indeed a symmetric matrix. Possibly someone can verify if my work is correct.
Let $A=\begin{pmatrix} a_{11} & a_{12} & a_{13}\\a_{21} & a_{22} & a_{23}\\a_{31} & a_{32} & a_{33}\end{pmatrix}.$ Then $$ \begin{pmatrix}x_1 \\x_2\\x_3 \end{pmatrix}^T \begin{pmatrix} a_{11} & a_{12} & a_{13}\\a_{21} & a_{22} & a_{23}\\a_{31} & a_{32} & a_{33}\end{pmatrix} \begin{pmatrix}y_1 \\y_2\\y_3 \end{pmatrix} = \sum_{i=1}^3 \sum_{j=1}^3 x_i a_{ij}y_j,$$
i. e. $a_{11}$ corresponds to the factor in front of $x_1y_1$, $a_{12}$ to the factor in front of $x_1 y_2$ and so on. Can you take it from here?