Suppose $m$ is a nonnegative integer, $z_1,\cdots, z_{m+1}$ are distinct elements of $\mathbb{F}$, and $w_1, \cdots, w_{m+1} \in \mathbb{F}$. Prove there exists a unique polynomial $p\in P_{m}(\mathbb{F})$ such that $p(z_j) = w_j$ for $j = 1, \cdots, m+1$.
When I attempted this I really had no idea where to start, then I saw a proof online that did this:
Define $T: P_{m}(\mathbb{F}) \rightarrow \mathbb{F^{m+1}}$ by: $$Tp = (p(z_{1}),\cdots,p(z_{m+1}))$$
From here we have to show that the map is linear and bijective. I have no issue with that portion. My question is the IDEA of coming up with a linear map to prove this problem. Where did the motivation to attempt something like that come from? It has me perplexed.
Note: I know there are other forms of proving this, but I am focusing on the linear algebra form.
The condition $p(z_j) = w_j$ for $j = 1,\ldots,m+1$ is equivalent to the single equation $$(p(z_1), \ldots, p(z_{m+1})) = (w_1, \ldots, w_{m+1}).$$ So it's fairly natural to define $T(p)$ to be the left hand side of this equation, and the problem is equivalent to showing that $T \colon P_m(\mathbb{F}) \to \mathbb{F}^{m+1}$ is bijective. The observation that $T$ is linear just makes it much easier to prove (e.g. one can just show that its image contains a basis of $\mathbb{F}^{m+1}$, so that it's surjective, and therefore bijective since the dimensions are equal).