Coordinate vector in a polynomial basis Let $\left\{x+1,\:x^2+x,\:2x-1\right\}$ be a basis of $P2$. Find the coordinate vector of $p(x)$ $=$ $x^2$ $+$ $1$ relative to this basis.
So I set up the matrix as follows:
$\begin{pmatrix}1&0&-1&1\\ 1&1&2&0\\ 0&1&0&1\end{pmatrix}$
Which row reduced to:
$\begin{pmatrix}1&0&0&\frac{1}{3}\\ 0&1&0&1\\ 0&0&1&-\frac{2}{3}\end{pmatrix}$
This led me to think that the coordinate vector was:
$\begin{pmatrix}\frac{1}{3}\\ 1\\ -\frac{2}{3}\end{pmatrix}$
But I am not entirely sure if this vector should be written in terms of numbers or polynomials, for example:
$\begin{pmatrix}\frac{1}{3}\\ x\\ -\frac{2}{3}x^2\end{pmatrix}$
I think my first vector with numbers is correct but I just want to verify.
Thank you!

The coordinate vector contains the coefficients of the basis vectors. So in this case, the vector
$$ \begin{pmatrix} \frac{1}{3} \\ 1 \\ \frac{1}{3} \end{pmatrix} $$
stands for the vector
$$ \frac{1}{3}\big( x + 1 \big) + 1 \big(x^2 + x\big) + \frac{1}{3}\big(2x - 1\big)$$
(As an aside, you can use this fact to check your answer :)
