Consider the space
\({\cal P}_2\text{,}\) the space of quadratic functions. Let
\(B=( 1, 1+x,1+x+x^2, )\) be a basis of
\({\cal P}_2\) and
\(\boldsymbol{v} = 2x+x^2\text{.}\) To find the representation, we need to find
\(c_1, c_2\) and
\(c_3\) such that
\begin{equation*}
c_1 \cdot 1 + c_2 \cdot (1+x) + c_3 \cdot (1+x+x^2) = 2x+x^2
\end{equation*}
by equating coefficients this is same as solving the linear system:
\begin{align*}
c_1 + c_2 + c_3 \amp = 0 \\
c_2 + c_3 \amp = 2 \\
c_3 \amp = 1
\end{align*}
resulting in
\(c_1=-2, c_2=1, c_3=1\text{,}\) therefore
\begin{equation*}
\text{Rep}_B (\boldsymbol{v}) = \begin{bmatrix} -2 \\ 1 \\ 1 \end{bmatrix}
\end{equation*}
If instead the basis is given as
\(D=( 2,2x,x^2 )\text{,}\) then
\begin{equation*}
c_1 \cdot 2 + c_2 \cdot (2x) + c_3 \cdot (x^2) = 2x+x^2
\end{equation*}
which shows that
\(c_1=0, c_2 =1, c_3 = 1\text{,}\) therefore
\begin{equation*}
\text{Rep}_D (\boldsymbol{v}) = \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}
\end{equation*}