Does anyone know or can anyone give a reference explaining how the concepts of a linear functional and particularly that of a dual space developed? I know Riesz published his famous representation theorem in the first decade of the $1900$s, but did he use these concepts then?
My main reason for asking this question is motivation: These two concepts seem to arise out of thin air in all linear algebra books that I have looked at. It would be nice to find a motivating (non-contrived) example that forces you to look at the dual space of a vector space.
I can't really speak to the history, but the concept of a linear functional occurs everywhere in mathematics, not just in linear algebra, and thus it makes sense to consider the collection of all such functionals and thus arrive at the dual space. For instance, a couple of examples from analysis include:
If $X$ is any space with a complete norm the differential $df(p)$ at a point $p \in X$ of a differentiable function $f:X \rightarrow \mathbb{R}$ is a functional
If $C([a,b])$ denotes the space of all continuous real-valued functions defined on $[a,b]$ then the mapping $$ \int^b_a : C([a,b]) \rightarrow \mathbb{R} : f \mapsto \int^b_a f $$ is a functional by elementary properties of the integral
Now the Riesz theorem is very interesting because it basically says that if you are dealing with an inner product space that every linear functional can be expressed in terms of the inner product, and this fact has a wide range of applications. For instance, one can use the RRT theorem to define and guarantee the existence/uniqueness of the cross product of two vectors in terms of the determinant. It can also be used to define and guarantee the existence/uniqueness of the gradient of a function. So, the concept of duality arises in many contexts outside linear algebra. I find this pretty motivating.