I have the following question from a linear algebra textbook:

Let $V = CPL \left\{0,1,2,3 \right\}$, where this denotes the continuous piecewise linear functions on $[0,3]$, ie. the set of continuous functions on $[0,3]$ that are linear in each interval $I_i = [x_i, x_{i+1}]$, where $x_0 = 0, x_1=1, x_2=2$ and $x_3=3$. Show that $\left\{1,t,|t-1|,|t-2| \right\}$ is a basis for $V$.

Showing linear independence is easy enough, but I'm stuck on how to show these vectors span $V$. Since it isn't easy (for me at least) to represent any piecewise linear function on this domain in a single expression, this is where I'm having trouble. I also tried considering each vector restricted to the interval $I_i$, e.g. in the interval $[1,2]$ the vectors will be $\left\{ 1,t, t-1, 2-t\right\}$ but this doesn't appear to shed any light on the situation where we have a general piecewise linear function on $[0,3]$. If anyone can provide a general outline of how this proof is supposed to look, I should be able to fill in the details. Thanks very much.


Note that this essentially comes down to prove that $CPL\{0,1,2,3\}$ has dimension 4 (because 4 linearly independant vectors in a 4-dimensional space form a basis of this space, and you proved already they were linearly independant)

Consider the map $T : CPL\{0,1,2,3\} \to \mathbb{R}^4$ such that $T(f) = (f(0),f(1),f(2),f(3))$. It is clear that this map is linear. And it should not be too hard to prove that it is an isomorphism.

Essentially, what I did was choosing an easier basis to work with than the one you provided (I chose the basis $f_0,f_1,f_2,f_3$ such that $f_0(0) = 1$ and $f_0(i) = 0$ for $i = 1,2,3$, etc, for example $f_0$ is given by $1-t$ on $[0,1]$ and $0$ on $[1,2]$ and $[2,3]$). If you wish to do so, you can do the necessary matrix computations in order to get an explicit way of expressing any $f \in CPL\{0,1,2,3\}$ as a linear combination of $1,t,|t-1|,|t-2|$ :

$f(t) = a + bt + c|t-1| + d|t-2|$

and $a,b,c,d$ can be expressed as linear combinations of $f(0),f(1),f(2),f(3)$. If you find it not clear how to do it, I can add more details.

EDIT : the details.

So first, we apply $T$ to the 4 functions you provided

$T(1) = (1,1,1,1) \quad T(t) = (0,1,2,3) \quad T(|t-1|) = (1,0,1,2) \quad T(|t-2|) = (2,1,0,1)$.

The fact that $T$ is an isomorphism is equivalent to the fact that this is a basis of $\mathbb{R}^4$. The idea now is that we want to express a function $f \in CPL\{0,1,2,3\}$ as a linear combinations of the previous functions $1,t,|t-1|,|t-2|$. To do this we want to compute the inverse the matrix

$M = \begin{pmatrix}1&0&1&2 \\ 1&1&0&1 \\ 1&2&1&0 \\ 1&3&2&1 \end{pmatrix}$

made up of the images of $1,t,|t-1|,|t-2|$ by $T$. Now you can check that the inverse of this matrix is given by

$N = \frac{1}{2}\begin{pmatrix}1&0&3&-2 \\ -1&1&-1&1 \\ 1&-2&1&0 \\ 0&1&-2&1\end{pmatrix}$

This tells us that for any $f \in CPL\{0,1,2,3\}$, we have $f(t) = \frac{1}{2}\left((f(0) + 3f(2) - 2f(3))\times 1 + (-f(0) + f(1) - f(2) + f(3))\times t + (f(0) - 2f(1) + f(2))\times |t-1| + (f(1) - 2f(2) + f(3))\times |t-2|\right)$

  • $\begingroup$ Thank you, yes can you add the details? $\endgroup$ – Elliot Herrington Jun 25 at 0:18
  • $\begingroup$ Great, thanks so much for your time and effort $\endgroup$ – Elliot Herrington Jun 26 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.