In this post, the trace is given as an example of dual space for the vector space composed of $2 \times 2$ real-valued matrices. Coincidentally, just today I ran across the same example for the inner product in this youtube video.
So the dual space $V^*$ is the set of linear maps or linear functionals from $V$ to the real numbers (field), $V^*:V\to \mathbb R.$ As maps, the dual space is a homomorphism, $\text{Hom}(V,\mathbb R)$, itself forming a vector space equipped with addition and scalar multiplication:
$(\varphi+\psi)(x)= \varphi(x)+\psi(x)$
$(\alpha\varphi)(x)=\alpha(\varphi(x))$
Similarly an inner product space is a pair of a vector space, $V$, paired with a function $\langle\cdot,\cdot\rangle$ from $V\times V\to \mathbb R$, fulfilling:
(i) $\langle v, w\rangle=\langle v, w\rangle$
(ii) $\langle v+y, w\rangle=\langle v, w\rangle+\langle y, w\rangle$
(iii) $\langle c\,v, w\rangle=c\langle v, w\rangle$
(iv) $\langle v, v\rangle\geq0$
Extremely similar, parallel concepts, including both vector spaces, maps to the underlying field elements ($\mathbb R)$, and, clearly, the "exotic" example of the trace of matrices.
So where do these concepts start to differ? And why are they so similar in so many ways?