Let $P_{2}(\mathbb{R})$ denote the vector space of real polynomial functions of degree less than or equal to two and let $\beta := \{p_{0}, p_{1}, p_{2}\}$ denote the natural basis of $P_{2}(\mathbb{R}) $ so $p_{i}(x) = x_{ i}$ ).
Define $g ∈ P_{2}(\mathbb{R})$ by $g(x) = 3 + 4x − x^{ 2}$
Write g as a linear combination of the elements of B. Compute the coordinate vector $g_{\beta}$ of g with respect to $\beta$.
Define $h_{1}, h_{2}, h_{3} ∈ P_{2}(\mathbb{R})$ by $h_{1}(x) = −2, h_{2}(x) = 4 − x$ and $h_{3}(x) = 6 + x^{ 2}$ ,
and let $C := \{h_{1}, h_{2}, h_{3}\}$ be another basis of $P_{2}(\mathbb{R})$. Construct the change of coordinate matrix A from C to $\beta$. Compute $A^{ −1}$ . Compute the coordinate vector $g_{C}$ of g with respect to C.
I have this question for revision for exam but am not sure how to start this is $$g_{\beta} = \begin{matrix} 1 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & -1 \end{matrix} $$
or is $$g_{\beta} = \begin{matrix} 1 \\ 4 \\ -1 \end{matrix} $$
Any help would be appreciated thank you.