In Linear Algebra Done Right we have a theorem that states
Riesz Representation Theorem : Suppose $V$ is finite-dimensional and $A$ is a linear functional on $V$. Then there is a unique vector $u$ such that for every $v$ : $ A(v)=\langle u , v\rangle$
However then the existence of adjoint transformation is cited using this theorem
$\langle T v, w\rangle=\left\langle v, T^{*} w\right\rangle$
To see why the definition above makes sense, suppose $T \in \mathcal{L}(V, W)$. Fix $w \in W$. Consider the linear functional on $V$ that maps $v \in V \text { to }\langle T v, w\rangle$; this linear functional depends on $T$ and $w$. By the Riesz Representation Theorem , there exists a unique vector in V such that this linear functional is given by taking the inner product with it. We call this unique vector $T^{*} w$
I don't understand how the two situations are alike. First we didn't have a transformation prior to inner product and now we do. How does the guarantee still exist? Not only that but $v$ and $w$ could belong to different dimension spaces and $T$ transforms $V$ to $W$. How does Riesz Representation Theorem hold for this case at well? The two seem a bit disconnected to me.
Riesz representation theorem does not mention transforming input by T. By applying this theorem exactly as it is stated, there exists a $w$ for the functional acting on $Tv$, so now we have $⟨𝑇𝑣,𝑤⟩$. I don't see ahead of that.