# Diagonal basis for bilinear form on $\mathbb{R}[x]_2$.

For $f,g \in V =\mathbb{R}[x]_2$, we have the bilinear form \begin{eqnarray*} \phi : &V \times V &\rightarrow \mathbb{R} \\ &(f,g) &\mapsto \int_{-1}^1 xf(x)g(x)dx. \end{eqnarray*} I showed that it is degenerate by observing that ker$(\phi_L) = \left\{a_0\left(1 - \frac{5}{3}x^2\right) \in V \mid a_0 \in \mathbb{R}\right\} \neq \{0\}$. (Maybe this is already where it goes wrong.) I am now to give a basis of $V$ for which the matrix associated to $\phi$ is diagonal. Now while I do have a theorem that guarantees the existence of such a basis, a method to construct such a basis eludes me. $$H = \left( \begin{array}{rrr} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{array} \right)$$

• well, if you can type in the matrix $H$ using the basis $(1,x,x^2),$ so 3 by 3, I can show you quickly how to change; that is, given symmetric $H$ with rational entries, I can show you how to solve $P^T HP = D$ and $Q^T D Q = H$ with $Q = P^{-1},$ entries of $P$ rational, and $\det P = \pm 1$ – Will Jagy Apr 13 '18 at 23:27
• I typed in a matrix $H$ with all entries $0,$ all you need to do is correct the entries to the actual inner products, a symmetric matrix. Since you are beginning with the inner product (rather than a polynomial quadratic form), this construction is called the Gram matrix. – Will Jagy Apr 13 '18 at 23:32
• well, if you do edit in the corrections, leave a comment to me here beginning with an "at" sign and and least the first three letters of Will. The next time I look at my main page, there will be a little red flag showing that I have a comment reply and giving a link back here to your comment. – Will Jagy Apr 13 '18 at 23:43
• Good, Please find $(1,1)$ and $(1,x) = (x,1)$ and $(1,x^2)= (x^2,1)$ and $(x,x)$ and $(x,x^2)= (x^2,x)$ and $(x^2,x^2)$ and edit those numbers into the matrix in the correct places – Will Jagy Apr 13 '18 at 23:51
• Thank you very much @WillJagy! I only now see that I can write the matrix associtated to $\phi$ (in some basis $B = (v_1, v_2, v_3)$) as $[\phi(v_j,v_i)]_{i,j}$. (I figure you guessed I knew that already...) For the basis $B = (1,x,x^2)$ I get $H =$\begin{bmatrix} 0 & 2/3 & 0 \\ 2/3 & 0 & 2/5 \\ 0 & 2/5 & 0\end{bmatrix}. To change the basis, I have found a theorem that seems to suggest something along the lines of what you said, so I think I'll get there now myself. Many thanks! – Jos van Nieuwman Apr 13 '18 at 23:52

Multiplying the columns of $P$ by $( 1,-2, -5)$ suggests the basis $$\{ \; 1+x, \; \; 1-x, \; \; 3 - 5 x^2 \; \}$$

$$P^T H P = D$$ $$\left( \begin{array}{rrr} 1 & 1 & 0 \\ - \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & 0 \\ - \frac{ 3 }{ 5 } & 0 & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 0 & \frac{ 2 }{ 3 } & 0 \\ \frac{ 2 }{ 3 } & 0 & \frac{ 2 }{ 5 } \\ 0 & \frac{ 2 }{ 5 } & 0 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & - \frac{ 1 }{ 2 } & - \frac{ 3 }{ 5 } \\ 1 & \frac{ 1 }{ 2 } & 0 \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} \frac{ 4 }{ 3 } & 0 & 0 \\ 0 & - \frac{ 1 }{ 3 } & 0 \\ 0 & 0 & 0 \\ \end{array} \right)$$ $$Q^T D Q = H$$ $$\left( \begin{array}{rrr} 1 & - \frac{ 1 }{ 2 } & - \frac{ 3 }{ 5 } \\ 1 & \frac{ 1 }{ 2 } & 0 \\ 0 & 0 & 1 \\ \end{array} \right) \left( \begin{array}{rrr} \frac{ 4 }{ 3 } & 0 & 0 \\ 0 & - \frac{ 1 }{ 3 } & 0 \\ 0 & 0 & 0 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & 1 & 0 \\ - \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & 0 \\ - \frac{ 3 }{ 5 } & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 0 & \frac{ 2 }{ 3 } & 0 \\ \frac{ 2 }{ 3 } & 0 & \frac{ 2 }{ 5 } \\ 0 & \frac{ 2 }{ 5 } & 0 \\ \end{array} \right)$$

ORIGINAL: I multiply your matrix by $15/2$ to get integers. To apply to your specific matrix, multiply both $H$ and $D$ by $2/15.$

$$P^T H P = D$$ $$\left( \begin{array}{rrr} 1 & 1 & 0 \\ - \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & 0 \\ - \frac{ 3 }{ 5 } & 0 & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 0 & 5 & 0 \\ 5 & 0 & 3 \\ 0 & 3 & 0 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & - \frac{ 1 }{ 2 } & - \frac{ 3 }{ 5 } \\ 1 & \frac{ 1 }{ 2 } & 0 \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 10 & 0 & 0 \\ 0 & - \frac{ 5 }{ 2 } & 0 \\ 0 & 0 & 0 \\ \end{array} \right)$$ $$Q^T D Q = H$$ $$\left( \begin{array}{rrr} \frac{ 1 }{ 2 } & - 1 & 0 \\ \frac{ 1 }{ 2 } & 1 & 0 \\ \frac{ 3 }{ 10 } & - \frac{ 3 }{ 5 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 10 & 0 & 0 \\ 0 & - \frac{ 5 }{ 2 } & 0 \\ 0 & 0 & 0 \\ \end{array} \right) \left( \begin{array}{rrr} \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & \frac{ 3 }{ 10 } \\ - 1 & 1 & - \frac{ 3 }{ 5 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 0 & 5 & 0 \\ 5 & 0 & 3 \\ 0 & 3 & 0 \\ \end{array} \right)$$

Algorithm discussed at http://math.stackexchange.com/questions/1388421/reference-for-linear-algebra-books-that-teach-reverse-hermite-method-for-symmetr
$$H = \left( \begin{array}{rrr} 0 & 5 & 0 \\ 5 & 0 & 3 \\ 0 & 3 & 0 \\ \end{array} \right)$$ $$D_0 = H$$

$$E_j^T D_{j-1} E_j = D_j$$ $$P_{j-1} E_j = P_j$$ $$E_j^{-1} Q_{j-1} = Q_j$$ $$P_j Q_j = Q_j P_j = I$$ $$P_j^T H P_j = D_j$$ $$Q_j^T D_j Q_j = H$$

$$H = \left( \begin{array}{rrr} 0 & 5 & 0 \\ 5 & 0 & 3 \\ 0 & 3 & 0 \\ \end{array} \right)$$

==============================================

$$E_{1} = \left( \begin{array}{rrr} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$ $$P_{1} = \left( \begin{array}{rrr} 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; Q_{1} = \left( \begin{array}{rrr} 1 & 0 & 0 \\ - 1 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; D_{1} = \left( \begin{array}{rrr} 10 & 5 & 3 \\ 5 & 0 & 3 \\ 3 & 3 & 0 \\ \end{array} \right)$$

==============================================

$$E_{2} = \left( \begin{array}{rrr} 1 & - \frac{ 1 }{ 2 } & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$ $$P_{2} = \left( \begin{array}{rrr} 1 & - \frac{ 1 }{ 2 } & 0 \\ 1 & \frac{ 1 }{ 2 } & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; Q_{2} = \left( \begin{array}{rrr} \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & 0 \\ - 1 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; D_{2} = \left( \begin{array}{rrr} 10 & 0 & 3 \\ 0 & - \frac{ 5 }{ 2 } & \frac{ 3 }{ 2 } \\ 3 & \frac{ 3 }{ 2 } & 0 \\ \end{array} \right)$$

==============================================

$$E_{3} = \left( \begin{array}{rrr} 1 & 0 & - \frac{ 3 }{ 10 } \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right)$$ $$P_{3} = \left( \begin{array}{rrr} 1 & - \frac{ 1 }{ 2 } & - \frac{ 3 }{ 10 } \\ 1 & \frac{ 1 }{ 2 } & - \frac{ 3 }{ 10 } \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; Q_{3} = \left( \begin{array}{rrr} \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & \frac{ 3 }{ 10 } \\ - 1 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; D_{3} = \left( \begin{array}{rrr} 10 & 0 & 0 \\ 0 & - \frac{ 5 }{ 2 } & \frac{ 3 }{ 2 } \\ 0 & \frac{ 3 }{ 2 } & - \frac{ 9 }{ 10 } \\ \end{array} \right)$$

==============================================

$$E_{4} = \left( \begin{array}{rrr} 1 & 0 & 0 \\ 0 & 1 & \frac{ 3 }{ 5 } \\ 0 & 0 & 1 \\ \end{array} \right)$$ $$P_{4} = \left( \begin{array}{rrr} 1 & - \frac{ 1 }{ 2 } & - \frac{ 3 }{ 5 } \\ 1 & \frac{ 1 }{ 2 } & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; Q_{4} = \left( \begin{array}{rrr} \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & \frac{ 3 }{ 10 } \\ - 1 & 1 & - \frac{ 3 }{ 5 } \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; D_{4} = \left( \begin{array}{rrr} 10 & 0 & 0 \\ 0 & - \frac{ 5 }{ 2 } & 0 \\ 0 & 0 & 0 \\ \end{array} \right)$$

==============================================

$$P^T H P = D$$ $$\left( \begin{array}{rrr} 1 & 1 & 0 \\ - \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & 0 \\ - \frac{ 3 }{ 5 } & 0 & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 0 & 5 & 0 \\ 5 & 0 & 3 \\ 0 & 3 & 0 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & - \frac{ 1 }{ 2 } & - \frac{ 3 }{ 5 } \\ 1 & \frac{ 1 }{ 2 } & 0 \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 10 & 0 & 0 \\ 0 & - \frac{ 5 }{ 2 } & 0 \\ 0 & 0 & 0 \\ \end{array} \right)$$ $$Q^T D Q = H$$ $$\left( \begin{array}{rrr} \frac{ 1 }{ 2 } & - 1 & 0 \\ \frac{ 1 }{ 2 } & 1 & 0 \\ \frac{ 3 }{ 10 } & - \frac{ 3 }{ 5 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 10 & 0 & 0 \\ 0 & - \frac{ 5 }{ 2 } & 0 \\ 0 & 0 & 0 \\ \end{array} \right) \left( \begin{array}{rrr} \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } & \frac{ 3 }{ 10 } \\ - 1 & 1 & - \frac{ 3 }{ 5 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 0 & 5 & 0 \\ 5 & 0 & 3 \\ 0 & 3 & 0 \\ \end{array} \right)$$