# Showing dimension of a subspace

Let $W$ is a set of functions with degree at most 1, and so $$W_1=\{a_0 +a_1 \cdot x | a_0,a_1 \in \mathbb{R} \}$$

I know that the basis of this is the set $B_1 = \{1,x\}$. But I am having trouble showing linearly independance. I know we choose scalers $c_1, c_2$ such that $c_1(1) + c_2(x) = 0$ but I dont know where to go from here. Also I know the dimension is 2 but why is this? Is this because the number of elements in the basis is 2 or because dim(W) = n+1 for polynomials.

-
"A set of functions", or "a set of polynomials with real coefficients"? (Not the same thing!) –  Arturo Magidin Sep 29 '11 at 19:43
The dimension of a vector space is the number of vectors in a basis for that space. The reason that $\dim W_n=n+1$ is that $\{1,x,x^2,\dots,x^n\}$ is a basis for $W_n$ that has $n+1$ members. –  Brian M. Scott Sep 29 '11 at 19:52

The expression $c_1(1) + c_2(x) = 0$ is an equality of two polynomials. But two polynomials are equal if and only if they are identical; that is, $$a_0 + a_1x + \cdots + a_nx^n = b_0+b_1x + \cdots b_nx^n$$ if and only if $a_0=b_0$, $a_1=b_1,\ldots,a_n=b_n$.

Here you have $c_1(1) + c_2(x) = 0 = 0(1) + 0(x)$, so $c_1=c_2=0$.

To prove they span $W$, let $a+bx$ be an arbitrary element of $W$. Then $a+bx = a(1)+b(x) \in \mathrm{span}(1,x)$, so $W\subseteq \mathrm{span}(1,x)$. Since each of $1$ and $x$ lie in $W$, $\mathrm{span}(1,x)\subseteq W$, giving equality.

-
$c_1(1) + c_2(x) = 0$ is an equality of functions. So, evaluate both sides at $x=0$ to get $c_1=0$ and then at $x=1$ to get $c_2=0$.
@Tyler: They span $W$ because $W$ is defined as the span of $1$ and $x$ (your definition). –  Fredrik Meyer Sep 29 '11 at 19:46
@Tyler, there are only 2 unknowns here: $c_1$ and $c_2$. So you only need 2 equations to find them. Actually, any two different values if $x$ will do. –  lhf Sep 30 '11 at 2:51