# Vector Space of Polynomials and a Basis of Its Subspace

## Problem 165

Let $P_2$ be the vector space of all polynomials of degree two or less.
Consider the subset in $P_2$
$Q=\{ p_1(x), p_2(x), p_3(x), p_4(x)\},$ where
\begin{align*}
&p_1(x)=1, &p_2(x)=x^2+x+1, \\
&p_3(x)=2x^2, &p_4(x)=x^2-x+1.
\end{align*}

(a) Use the basis $B=\{1, x, x^2\}$ of $P_2$, give the coordinate vectors of the vectors in $Q$.

(b) Find a basis of the span $\Span(Q)$ consisting of vectors in $Q$.

(c) For each vector in $Q$ which is not a basis vector you obtained in (b), express the vector as a linear combination of basis vectors.

(The Ohio State University Linear Algebra Exam Problem)

## Solution.

### (a) Use the basis $B=\{1, x, x^2\}$ of $P_2$, give the coordinate vectors of the vectors in $Q$

To obtain the coordinate vectors with respect to the given basis $B=\{1, x, x^2\}$, we fist express a given vector as a linear combination of basis vectors. ( You need to take care of the order of the basis vectors.)

For example, for the vector $p_4(x)$, we have the linear combination
$p_4(x)=1\cdot 1+(-1)\cdot x+1\cdot x^2.$ Thus reading the coefficient of the basis vectors $1, x, x^2$, we see that the coordinate vector of $p_4(x)$ with respect to the basis $B$ is
$[p_4(x)]_B=\begin{bmatrix} 1 \\ -1 \\ 1 \end{bmatrix}.$

By the similar argument, the coordinate vectors are
\begin{align*}
&[p_1(x)]_B=\begin{bmatrix}
1 \\
0 \\
0
\end{bmatrix}, &[p_2(x)]_B=\begin{bmatrix}
1 \\
1 \\
1
\end{bmatrix},\\
& [p_3(x)]_B=\begin{bmatrix}
0 \\
0 \\
2
\end{bmatrix}, &[p_4(x)]_B=\begin{bmatrix}
1 \\
-1 \\
1
\end{bmatrix}.
\end{align*}

### (b) Find a basis of the span $\Span(Q)$ consisting of vectors in $Q$

Let
\begin{align*}
T:&=\{[p_1(x)]_B, [p_2(x)]_B, [p_3(x)]_B, [p_4(x)]_B\}\\
&=\left\{\begin{bmatrix}
1 \\
0 \\
0
\end{bmatrix}, \begin{bmatrix}
1 \\
1 \\
1
\end{bmatrix}, \begin{bmatrix}
0 \\
0 \\
2
\end{bmatrix}, \begin{bmatrix}
1 \\
-1 \\
1
\end{bmatrix}\right\}.
\end{align*}
Then a basis of $\Span(Q)$ consisting of vectors in $Q$ corresponds to a basis of $\Span(T)$ consisting of vectors in $T$.

Consider the matrix whose columns are the vectors in $T$. We reduce it by elementary row operations as follows.
\begin{align*}
\begin{bmatrix}
1 & 1 & 0 & 1 \\
0 &1 & 0 & -1 \\
0 & 1 & 2 & 1
\end{bmatrix}
\xrightarrow[R_3-R_2]{R_1-R_2}
\begin{bmatrix}
1 & 0 & 0 & 2 \\
0 &1 & 0 & -1 \\
0 & 0 & 2 & 2
\end{bmatrix}
\xrightarrow{\frac{1}{2}R_3}
\begin{bmatrix}
1 & 0 & 0 & 2 \\
0 &1 & 0 & -1 \\
0 & 0 & 1 & 1
\end{bmatrix}.
\end{align*}
The last matrix is in reduced row echelon form and the first three columns contain the leading 1’s.
Therefore the set consisting of the first three vectors in $T$
$\left\{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 0 \\ 2 \end{bmatrix}\right\}$ is a basis for $\Span(T)$.
(This is what I call the leading 1 method.)

Therefore by the coordinate vector correspondence, it follows that the set
$\{p_1(x), p_2(x), p_3(x)\}$ is a basis for $\Span(Q)$ consisting of vectors in $Q$.

### (c) For each vector in $Q$ which is not a basis vector you obtained in (b), express the vector as a linear combination of basis vectors

From the solution of part (b), we see that the vector $p_4(x)$ is the only vector in $Q$ which is not a basis vector.
Thus we want to express $p_4(x)$ as a linear combination of $p_1(x), p_2(x), p_3(x)$.

Consider a linear combination
$a_1p_1(x)+a_2 p_2(x)+a_3p_3(x)+a_4p_4(x)=0 \tag{*}.$ By taking coordinate vectors, we obtain
$a_1\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}+a_2\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix}+a_3\begin{bmatrix} 0 \\ 0 \\ 2 \end{bmatrix}+a_4\begin{bmatrix} 1 \\ -1 \\ 1 \end{bmatrix}=\begin{bmatrix}0\\0\\0 \end{bmatrix}.$

The augmented matrix is
$\left[\begin{array}{rrrr|r} 1 & 1 & 0 & 1 &0\\ 0 &1 & 0 & -1 &0\\ 0 & 1 & 2 & 1 &0 \end{array} \right].$ Note that this is the matrix we considered in part (b) except for the last zero column.
Thus by the same elementary row operations, we obtain the reduced row echelon form of this matrix
$\left[\begin{array}{rrrr|r} 1 & 0 & 0 & 2 &0\\ 0 &1 & 0 & -1 &0 \\ 0 & 0 & 1 & 1&0 \end{array} \right].$

Therefore we obtain the solutions
\begin{align*}
a_1&=-2a_4\\
a_2&=a_4\\
a_3&=-a_4\\
\end{align*}
and $a_4$ is a free variable.

Setting $a_4=1$ we obtain $a_1=-2, a_2=1, a_3=-1$ from the above solutions.
We plug these values in the linear combination (*) and obtain
$-2p_1(x)+p_2(x)-p_3(x)+p_4(x)=0.$ Solving this for $p_4(x)$, the vector $p_4(x)$ can be expressed as
$p_4(x)=2p_1(x)-p_2(x)+p_3(x).$

Let $T:\R^4 \to \R^3$ be a linear transformation defined by \[ T\left (\, \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\...