Let $f: \mathbb{R}^2\to \mathbb{R}$ be a bilinear form defined as: $$f\left((x_{1},x_{2}),(y_{1},y_{2})\right)=x_{1}y_{1}+2x_{1}y_{2}+2x_{2}y_{1}+4x_{2}y_{2}$$
Find a base for $\mathbb{R}^2$ such that $f$ has a diagonal form, represented by a matrix.
My Attempt:
Let $A$ be the representative matrix for $f$, hence $A=\left(\begin{array}{cc} 1 & 2\\ 2 & 4 \end{array}\right)=A^{t}$, then the quadratic form associated to $f$ is:
$q(x_{1},x_{2})=x_{1}^{2}+4x_{1}x_{2}+x_{2}^{2}=(x_{1}+2x_{2})^{2} $
let $y_{1}\triangleq x_{1}+2x_{2}$ , then $q(x)=y_{1}^{2}$, and the base is: $B= \{ (1,2,0)\}$. this isn't a base for $mathbb{R}^2$ and does not satisfy a diagonal form as wished. what am I missing in my solution?
$\newcommand{\eps}{\varepsilon}$ $\newcommand{\real}{\mathbb{R}}$
Let me write an answer to clarify some important concepts.
The precise meaning of the bilinear form you gave is that (I have corrected a probable typo in your equation)
Now your goal is to determine a new basis $\{\eta_1, \eta_2\}$, such that the matrix representation of $f$ under this new basis is a diagonal matrix. This can be done by making congruent transformations on $A$ as: \begin{align*} A = \begin{pmatrix} 1 & 0 \\ 2 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 \\ 0 & 0 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} := P^TDP. \tag{2} \end{align*} Substituting $(2)$ into $(1)$ yields \begin{align*} f(\alpha, \beta) = (x_1, x_2)P^TDP(y_1, y_2)^T \tag{3} \end{align*}
It is a well known result that if the transition matrix from the basis $\{\eta_1, \eta_2\}$ to another basis $\{\eps_1, \eps_2\}$ is $P$, i.e., \begin{align*} (\eps_1, \eps_2) = (\eta_1, \eta_2)P, \end{align*} and the coordinate of any given vector $\gamma$ under $\{\eps_1, \eps_2\}$ is $z = (z_1, z_2)^T$, then the coordinate of $\gamma$ under $\{\eta_1, \eta_2\}$ is $Pz$. In view of this, $(3)$ can be rewritten as \begin{align*} f(\alpha, \beta) = (x_1', x_2')D(y_1', y_2')^T, \end{align*} where $(x_1', x_2')^T = P(x_1, x_2)^T, (y_1', y_2')^T = P(y_1, y_2)^T$ are coordinates of $\alpha$ and $\beta$ under the basis $\{\eta_1, \eta_2\}$.
To determine $\{\eta_1, \eta_2\}$, do \begin{align*} (\eta_1, \eta_2) = (\eps_1, \eps_2)P^{-1} = \begin{pmatrix} 1 & -2 \\ 0 & 1 \end{pmatrix}, \end{align*} i.e., $\eta_1 = (1, 0)^T = \eps_1, \eta_2 = (-2, 1)^T = -2\eps_1 + \eps_2$.
To summarize, the matrix of the bilinear form under the basis $\{\eta_1, \eta_2\}$ is a diagonal matrix $D = \mathrm{diag}(1, 0)$. The matrix $D$ is singular, which is in line with the original matrix $A$ is singular (as $\det(A) = 0$). In fact, you might know that the $D$ deduced in this problem is known as the canonical form of a real bilinear form.