Dimension of the set of affine continuous functions

affine-geometrygeometrylinear algebrareal-analysisvector-spaces

I came across the following statement while reading a paper.

Suppose $a=x_0 < x_1<…<x_{n-1}<x_n=b$. Then, the vector space of continuous functions on $(a,b)$ that are affine on each interval $[x_i , x_{i+1}],$ for $i=0,1,…,n-1$, has dimension $n+1$.

I'm not able to see why the dimension is $n+1$. Can someone explain this?

Best Answer

For each such function $f$, you have $n+1$ choices: the values that $f$ takes at $x_0,x_1,\ldots,x_n$. So, the dimension is $n+1$.

To be more precise: if $a_k=f(x_k)$ ($k\in\{1,2,\ldots,n\}$), then $f$ is completely determined. It is the only function from $[a,b]$ into $\Bbb R$ such that its restriction to $[x_{k-1},x_k]$ is defined by$$f(x)=a_{k-1}+\frac{x-x_{k-1}}{x_k-x_{k-1}}(a_k-a_{k-1}).$$If, for each $j\in\{0,1,\ldots,n\}$, you define $f_j\colon[a,b]\longrightarrow\Bbb R$ as the only function whose restriction to each interval $[x_{k-1},x_k]$ is affine, such that $f_j(x_j)=1$ and that $f_j(x_k)=0$ if $k\ne j$, then the set $\{f_0,f_1,\ldots,f_n\}$ will be a basis of your space.