Fix a field
\(k\) and let
\(\mathsf{Vect}_k\) denote the category of
\(k\)-vector spaces and linear transformations. The
forgetful functor \(U\colon \mathsf{Vect}_k\to \mathsf{Set}\) takes a vector space
\(V\) to its
underlying set
\(UV\) and a linear transformation
\(f\colon V\to W\) to its underlying function
\(Uf=f\text{.}\)
The free functor \(\operatorname{Free}_k\colon \mathsf{Set}\to \mathsf{Vect}_k\) takes a set \(S\) to the \(k\)-vector space
\begin{equation*}
\operatorname{Free}_kS := kS := \bigoplus_{s\in S} k\{s\}
\end{equation*}
of (finite) formal \(k\)-linear combinations of elements of \(S\text{.}\) Given a function \(g\colon S\to T\text{,}\) the linear transformation
\begin{equation*}
\operatorname{Free}_kg\colon kS\longrightarrow kT
\end{equation*}
takes \(\sum_s \lambda_ss\) to \(\sum_s \lambda_sg(s)\text{.}\) (Please recall a sufficient quantity of linear algebra to confirm that this construction is well-defined.)
These functors participate in an adjunction \(\operatorname{Free}_k\dashv U\text{.}\) This means that we have a natural bijection
\begin{equation*}
\mathsf{Vect}_k(\operatorname{Free}_kS,V)\xrightarrow{\cong} \mathsf{Set}(S,UV)
\end{equation*}
given by restricting linear transformations \(f\colon \operatorname{Free}_kS\to V\) to \(S\text{,}\) i.e., \(\hat f := f|_S\text{.}\) The inverse assignment takes a function \(g\colon S\to UV\) to the linear transformation
\begin{align*}
\hat g\colon \operatorname{Free}_kS\amp \longrightarrow V\\
\sum_{s} \lambda_ss\amp\longmapsto \sum_s \lambda_s g(s).
\end{align*}
If
\(B\) is a basis of vector space
\(V\text{,}\) then
\(V\cong \operatorname{Free}_k B\text{,}\) and this adjunction tells us that linear transformations from
\(V\) are determined by their action on a basis. This is typical of "free
\(\dashv\) forgetful" adjunctions, in which maps out of free objects in a category are determined by underlying functions on a generating set. The category of vector spaces is quite special, though, in that every object is free. This is part of what makes linear algebra much easier than, say, group theory.