# Linear Algebra Basis and dimension [closed]

Find a basis for $W$, the span of $$\{1+6x+2x^2, 3+x, 5+6x+4x^2, 5+5x+2x^2\}$$ and if $\dim(W) < \dim(P_2(\mathbb{Z}_7))$, extend the basis into a basis for $P_2(\mathbb{Z}_7).$

My answer for basis; $\{(1, 3, 5, 5), (6,1,6,5), (2,0,4,2)\}$ . But i'm not sure whether it's correct. If it's correct then our dimension is $3$. How can I extend the basis?

## closed as unclear what you're asking by Alex Provost, Shailesh, Namaste, Leucippus, Daniel W. FarlowJun 7 '17 at 0:49

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• First off, a small correction: your basis elements should be polynomials. Once you make that correction, how can you check if they form a basis? Do they span $W$? Are they linearly independent? – Christian Sykes Jun 6 '17 at 20:57
• @ChristianSykes wait, how they should be polynomials? ${x(6,1,6,5) + x^2(2,0,4,2) + c(1,3,5,5)}$ isn't it correct? – Antt Jun 6 '17 at 21:47
• You're right, that isn't correct and neither is what you started with. Basis vectors should be elements from the space you're considering, in this case $$P_2(\mathbb{Z}_7) = \{a + bx + cx^2: a,b,c\in\mathbb{Z}_7\}.$$ – Christian Sykes Jun 6 '17 at 21:53
• $(a,b,c,d)$ is not an element of $P_2(\mathbb{Z}_7)$. – Christian Sykes Jun 6 '17 at 21:55
• @ChristianSykes in this case it would be ${[1,6,2], [3,1,0], [5,6,4], [5,5,2]}$ ? and the extended basis $\begin{bmatrix}1 & 3 & 5 & 5 & 1 & 0 & 0\\ 6 & 1 & 6 & 5 & 0 & 1 & 0\\ 2 & 0 & 4 & 2 & 0 & 0 & 1\end{bmatrix}$ – Antt Jun 6 '17 at 22:13

## 1 Answer

Go to matrices! The coordinates of your vector with respect to the standard basis $\{1,x,x^2\}$ form the matrix $$\begin{bmatrix} 1 & 3 & 5 & 5 \\ 6 & 1 & 6 & 5 \\ 2 & 0 & 4 & 2 \end{bmatrix}$$ You can use standard Gaussian elimination: \begin{align} \begin{bmatrix} 1 & 3 & 5 & 5 \\ 6 & 1 & 6 & 5 \\ 2 & 0 & 4 & 2 \end{bmatrix} &\to \begin{bmatrix} 1 & 3 & 5 & 5 \\ 0 & 4 & 4 & 3 \\ 0 & 1 & 1 & 6 \end{bmatrix} &&\begin{aligned}R_2&\gets R_2-6R_1\\R_3&\gets R_3-2R_1\end{aligned} \\&\to \begin{bmatrix} 1 & 3 & 5 & 5 \\ 0 & 1 & 1 & 6 \\ 0 & 1 & 1 & 6 \end{bmatrix} &&R_2\gets 2R_2 \\&\to \begin{bmatrix} 1 & 3 & 5 & 5 \\ 0 & 1 & 1 & 6 \\ 0 & 0 & 0 & 0 \end{bmatrix} &&R_3\gets R_3-R_2 \end{align} This means that the first two columns determine a basis of $W$, because they correspond to the pivot columns. This works because vectors are linearly independent if and only if so are their coordinate vectors. We convert these columns to their corresponding polynomials in $P_2(\mathbb{Z}_7)$ to obtain $\{1+6x+2x^2, 3+x\}$ as a basis for $W$.

How do we extend it to a basis of $P_2(\mathbb{Z}_7)$?

Do Gaussian elimination on $$\begin{bmatrix} 1 & 3 & 1 & 0 & 0 \\ 6 & 1 & 0 & 1 & 0 \\ 2 & 0 & 0 & 0 & 1 \end{bmatrix}$$ Find the pivot columns and you're done. Note that the first two columns will necessarily be pivot ones.

• This is a good answer, but the OP seems confused about the distinction between the coordinate vectors representing the basis polynomials and those polynomials themselves. You might make it more clear to them by making the association explicit. – Christian Sykes Jun 6 '17 at 23:47
• @egreg but wait there is a mistake in the elimination isn't it? – Antt Jun 8 '17 at 23:12
• @Antt Where? Remember we're working modulo $7$. – egreg Jun 8 '17 at 23:19